GammaLib
2.1.0.dev
|
FITS binary table class. More...
#include <GFitsBinTable.hpp>
Public Member Functions | |
GFitsBinTable (void) | |
Void constructor. More... | |
GFitsBinTable (const int &nrows) | |
Table constructor. More... | |
GFitsBinTable (const GFitsBinTable &table) | |
Copy constructor. More... | |
virtual | ~GFitsBinTable (void) |
Destructor. More... | |
GFitsBinTable & | operator= (const GFitsBinTable &table) |
Assignment operator. More... | |
virtual void | clear (void) |
Clear binary table. More... | |
virtual GFitsBinTable * | clone (void) const |
Clone binary table. More... | |
virtual std::string | classname (void) const |
Return class name. More... | |
HDUType | exttype (void) const |
Return extension type. More... | |
Public Member Functions inherited from GFitsTable | |
GFitsTable (void) | |
Void constructor. More... | |
GFitsTable (const int &nrows) | |
Table constructor. More... | |
GFitsTable (const GFitsTable &table) | |
Copy constructor. More... | |
virtual | ~GFitsTable (void) |
Destructor. More... | |
GFitsTable & | operator= (const GFitsTable &table) |
Assignment operator. More... | |
GFitsTableCol * | operator[] (const int &colnum) |
Returns pointer to table column. More... | |
const GFitsTableCol * | operator[] (const int &colnum) const |
Returns pointer to table column (const version) More... | |
GFitsTableCol * | operator[] (const std::string &colname) |
Returns pointer to table column. More... | |
const GFitsTableCol * | operator[] (const std::string &colname) const |
Returns pointer to table column (const version) More... | |
GFitsTableCol * | set (const int &colnum, const GFitsTableCol &column) |
Set column. More... | |
GFitsTableCol * | set (const std::string &colname, const GFitsTableCol &column) |
Set column. More... | |
GFitsTableCol * | append (const GFitsTableCol &column) |
Append column to the table. More... | |
GFitsTableCol * | insert (int colnum, const GFitsTableCol &column) |
Insert column into the table. More... | |
GFitsTableCol * | insert (const std::string &colname, const GFitsTableCol &column) |
Insert column into the table. More... | |
void | remove (const int &colnum) |
Remove column from the table. More... | |
void | remove (const std::string &colname) |
Remove column from the table. More... | |
void | append_rows (const int &nrows) |
Append rows to the table. More... | |
void | insert_rows (const int &row, const int &nrows) |
Insert rows into the table. More... | |
void | remove_rows (const int &row, const int &nrows) |
Remove rows from the table. More... | |
const int & | nrows (void) const |
Return number of rows in table. More... | |
const int & | ncols (void) const |
Return number of columns in table. More... | |
bool | contains (const std::string &colname) const |
Checks the presence of a column in table. More... | |
std::string | print (const GChatter &chatter=NORMAL) const |
Print table information. More... | |
Public Member Functions inherited from GFitsHDU | |
GFitsHDU (void) | |
Void constructor. More... | |
GFitsHDU (const GFitsHDU &hdu) | |
Copy constructor. More... | |
virtual | ~GFitsHDU (void) |
Destructor. More... | |
GFitsHDU & | operator= (const GFitsHDU &hdu) |
Assignment operator. More... | |
int | cards (void) const |
Return number of cards in HDU header. More... | |
const std::string & | extname (void) const |
Return extension name. More... | |
void | extname (const std::string &extname) |
Set HDU extension name (EXTNAME keyword) More... | |
const int & | extno (void) const |
Return extension number. More... | |
void | extno (const int &extno) |
Set extension number. More... | |
const GFitsHeader & | header (void) const |
Return extension header. More... | |
void | header (const GFitsHeader &header) |
Set extension header. More... | |
bool | has_card (const int &cardno) const |
Check existence of header card. More... | |
bool | has_card (const std::string &keyname) const |
Checks for presence of header card. More... | |
GFitsHeaderCard & | card (const int &cardno) |
Return header card. More... | |
const GFitsHeaderCard & | card (const int &cardno) const |
Return header card (const version) More... | |
GFitsHeaderCard & | card (const std::string &keyname) |
Return header card. More... | |
const GFitsHeaderCard & | card (const std::string &keyname) const |
Return header card (const version) More... | |
void | card (const GFitsHeaderCard &card) |
Append or update header card. More... | |
void | card (const std::string &keyname, const std::string &value, const std::string &comment) |
Append or update string value header card. More... | |
void | card (const std::string &keyname, const double &value, const std::string &comment) |
Append or update double precision value header card. More... | |
void | card (const std::string &keyname, const int &value, const std::string &comment) |
Append or update integer value header card. More... | |
void | card (const std::string &keyname, const bool &value, const std::string &comment) |
Append or update boolean value header card. More... | |
void | card (const std::string &keyname, const char *value, const std::string &comment) |
Append or update character value header card. More... | |
std::string | string (const std::string &keyname) const |
Return card value as string. More... | |
double | real (const std::string &keyname) const |
Return card value as double precision. More... | |
int | integer (const std::string &keyname) const |
Return card value as integer. More... | |
Public Member Functions inherited from GBase | |
virtual | ~GBase (void) |
Destructor. More... | |
Private Member Functions | |
void | init_members (void) |
Initialise class members. More... | |
void | copy_members (const GFitsBinTable &table) |
Copy class members. More... | |
void | free_members (void) |
Delete class members. More... | |
void | init_table_header (void) |
Initialise binary table header. More... | |
Additional Inherited Members | |
Public Types inherited from GFitsHDU | |
enum | HDUType { HT_IMAGE = 0, HT_ASCII_TABLE = 1, HT_BIN_TABLE = 2 } |
Protected Member Functions inherited from GFitsTable | |
void | init_members (void) |
Initialise class members. More... | |
void | copy_members (const GFitsTable &table) |
Copy class members. More... | |
void | free_members (void) |
Free class members. More... | |
void | free_columns (void) |
Free column pointers. More... | |
void | update_header (void) |
Update header after row or column manipulations. More... | |
void | data_open (void *vptr) |
Open Table. More... | |
void | data_save (void) |
Save table into FITS file. More... | |
void | data_close (void) |
Close table. More... | |
void | data_connect (void *vptr) |
Connect table data to FITS file. More... | |
char * | get_ttype (const int &colnum) const |
Returns pointer to column type. More... | |
char * | get_tform (const int &colnum) const |
Returns pointer to column format. More... | |
char * | get_tunit (const int &colnum) const |
Returns pointer to column unit. More... | |
Protected Member Functions inherited from GFitsHDU | |
void | init_members (void) |
Initialise class members. More... | |
void | copy_members (const GFitsHDU &hdu) |
Copy class members. More... | |
void | free_members (void) |
Delete class members. More... | |
void | connect (void *fptr) |
Connect HDU to FITS file. More... | |
void | move_to_hdu (void) |
Move FITS file pointer to HDU. More... | |
HDUType | get_hdu_type (void) const |
Get HDU type from FITS file. More... | |
void | open (void *vptr, int hdunum) |
Open HDU. More... | |
void | save (void) |
Saves HDU. More... | |
std::string | print_hdu (const GChatter &chatter=NORMAL) const |
Print basic HDU information. More... | |
std::string | typecode (int type) const |
Return typecode as string. More... | |
Protected Attributes inherited from GFitsTable | |
int | m_type |
Table type (1=ASCII, 2=Binary) More... | |
int | m_rows |
Number of rows in table. More... | |
int | m_cols |
Number of columns in table. More... | |
GFitsTableCol ** | m_columns |
Array of table columns. More... | |
Protected Attributes inherited from GFitsHDU | |
void * | m_fitsfile |
FITS file pointer pointing on actual HDU. More... | |
int | m_hdunum |
HDU number (starting from 0) More... | |
std::string | m_name |
HDU name (extname) More... | |
GFitsHeader | m_header |
HDU header. More... | |
FITS binary table class.
Definition at line 39 of file GFitsBinTable.hpp.
GFitsBinTable::GFitsBinTable | ( | void | ) |
Void constructor.
Definition at line 53 of file GFitsBinTable.cpp.
References init_members().
Referenced by clone().
|
explicit |
Table constructor.
[in] | nrows | Number of rows in table |
Definition at line 68 of file GFitsBinTable.cpp.
References init_members(), and init_table_header().
GFitsBinTable::GFitsBinTable | ( | const GFitsBinTable & | table | ) |
Copy constructor.
[in] | table | Binary table. |
Definition at line 86 of file GFitsBinTable.cpp.
References copy_members(), and init_members().
|
virtual |
|
inlinevirtual |
Return class name.
Implements GFitsTable.
Definition at line 72 of file GFitsBinTable.hpp.
|
virtual |
Clear binary table.
This method properly resets the object to an initial state.
Implements GFitsTable.
Definition at line 159 of file GFitsBinTable.cpp.
References free_members(), GFitsTable::free_members(), GFitsHDU::free_members(), init_members(), GFitsTable::init_members(), and GFitsHDU::init_members().
Referenced by GCOMDri::init_members(), and GCOMDris::vetorate_finish().
|
virtual |
Clone binary table.
Implements GFitsTable.
Definition at line 181 of file GFitsBinTable.cpp.
References GFitsBinTable().
|
private |
Copy class members.
[in] | table | Table to copy |
Definition at line 211 of file GFitsBinTable.cpp.
Referenced by GFitsBinTable(), and operator=().
|
inlinevirtual |
Return extension type.
Implements GFitsTable.
Definition at line 84 of file GFitsBinTable.hpp.
References GFitsHDU::HT_BIN_TABLE.
|
private |
Delete class members.
Definition at line 221 of file GFitsBinTable.cpp.
Referenced by clear(), operator=(), and ~GFitsBinTable().
|
private |
Initialise class members.
Definition at line 196 of file GFitsBinTable.cpp.
References GFitsTable::m_type.
Referenced by clear(), GFitsBinTable(), and operator=().
|
private |
Initialise binary table header.
Initialises the table header by setting the default header cards.
Definition at line 233 of file GFitsBinTable.cpp.
References GFitsHeader::append(), GFitsTable::m_columns, GFitsHDU::m_header, GFitsTable::ncols(), GFitsTable::nrows(), and GFitsTableCol::width().
Referenced by GFitsBinTable().
GFitsBinTable & GFitsBinTable::operator= | ( | const GFitsBinTable & | table | ) |
Assignment operator.
[in] | table | Binary table. |
Definition at line 124 of file GFitsBinTable.cpp.
References copy_members(), free_members(), init_members(), and GFitsTable::operator=().