GammaLib  2.1.0.dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GFitsTableCol Class Referenceabstract

Abstract interface for FITS table column. More...

#include <GFitsTableCol.hpp>

Inheritance diagram for GFitsTableCol:
GBase GFitsTableBitCol GFitsTableBoolCol GFitsTableByteCol GFitsTableCDoubleCol GFitsTableCFloatCol GFitsTableDoubleCol GFitsTableFloatCol GFitsTableLongCol GFitsTableLongLongCol GFitsTableShortCol GFitsTableStringCol GFitsTableULongCol GFitsTableUShortCol

Public Member Functions

 GFitsTableCol (void)
 Void constructor. More...
 
 GFitsTableCol (const std::string &name, const int &nrows, const int &number, const int &width)
 Column constructor. More...
 
 GFitsTableCol (const GFitsTableCol &column)
 Copy constructor. More...
 
virtual ~GFitsTableCol (void)
 Destructor. More...
 
GFitsTableColoperator= (const GFitsTableCol &column)
 Assignment operator. More...
 
virtual void clear (void)=0
 Clear object. More...
 
virtual GFitsTableColclone (void) const =0
 Clones object. More...
 
virtual std::string classname (void) const =0
 Return class name. More...
 
virtual std::string string (const int &row, const int &inx=0) const =0
 
virtual double real (const int &row, const int &inx=0) const =0
 
virtual int integer (const int &row, const int &inx=0) const =0
 
virtual void insert (const int &row, const int &nrows)=0
 
virtual void remove (const int &row, const int &nrows)=0
 
virtual bool is_loaded (void) const =0
 
void name (const std::string &name)
 Set column name. More...
 
const std::string & name (void) const
 Returns column name. More...
 
void unit (const std::string &unit)
 Set column unit. More...
 
const std::string & unit (void) const
 Returns column unit. More...
 
void dim (const std::vector< int > &dim)
 Set column dimension. More...
 
const std::vector< int > & dim (void) const
 Returns column dimension. More...
 
void colnum (const int &colnum)
 Set column number. More...
 
const int & colnum (void) const
 Returns column number in FITS file (starting from 1) More...
 
void type (const int &type)
 Set type code. More...
 
const int & type (void) const
 Returns CFITSIO column type. More...
 
void repeat (const int &repeat)
 Set repeat value. More...
 
const int & repeat (void) const
 Returns column repeat value (only used for binary tables) More...
 
void width (const int &width)
 Set width in Bytes of one column element. More...
 
const int & width (void) const
 Return width in Bytes of one column element. More...
 
void number (const int &number)
 Set number of elements in column. More...
 
const int & number (void) const
 Returns number of elements in column. More...
 
void elements (const int &row, const int &elements)
 Set number of column elements for specific row. More...
 
int elements (const int &row) const
 Returns number of elements in column for specific row. More...
 
void nrows (const int &nrows)
 Set number of rows in column. More...
 
const int & nrows (void) const
 Returns number of rows in column. More...
 
void is_variable (const bool &variable)
 Set variable-length flag. More...
 
const bool & is_variable (void) const
 Signals if column is of variable length. More...
 
void anynul (const int &anynul)
 Set number of NULLs encountered. More...
 
const int & anynul (void) const
 Return number of NULLs encountered. More...
 
void tscale (const double &tscale)
 Set TSCALE value. More...
 
const double & tscale (void) const
 Return TSCALE value. More...
 
std::string tform_binary (void) const
 Returns TFORM code for binary table column. More...
 
std::string print (const GChatter &chatter=NORMAL) const
 Print column information. More...
 
- Public Member Functions inherited from GBase
virtual ~GBase (void)
 Destructor. More...
 

Protected Member Functions

void init_members (void)
 Initialise class members. More...
 
void copy_members (const GFitsTableCol &column)
 Copy class members. More...
 
void free_members (void)
 Delete class members. More...
 
void connect (void *vptr)
 Connect table column to FITS file. More...
 
virtual void alloc_data (void)=0
 
virtual void init_data (void)=0
 
virtual void fetch_data (void) const =0
 
virtual void resize_data (const int &index, const int &number)=0
 
virtual void release_data (void)=0
 
virtual void * ptr_data (const int &index=0)=0
 
virtual void * ptr_nulval (void)=0
 
virtual std::string ascii_format (void) const =0
 
virtual void save (void)
 Save table column into FITS file. More...
 
virtual void load_column (void)
 Load table column from FITS file. More...
 
virtual void load_column_fixed (void)
 Load fixed-length column from FITS file. More...
 
virtual void load_column_variable (void)
 Load variable-length column from FITS file. More...
 
virtual void save_column (void)
 Save table column into FITS file. More...
 
virtual void save_column_fixed (void)
 Save table column into FITS file. More...
 
virtual void save_column_variable (void)
 Save table column into FITS file. More...
 
virtual int offset (const int &row, const int &inx) const
 Compute offset of column element in memory. More...
 

Protected Attributes

std::string m_name
 Column name. More...
 
std::string m_unit
 Column unit. More...
 
std::vector< int > m_dim
 Column dimension. More...
 
int m_colnum
 Column number (starting from 1). This parameter is used to signal if a table column corresponds to a FITS file column. If it is set to 0 there is no correspondence. More...
 
int m_type
 Column type. More...
 
int m_repeat
 Repeat value of column. More...
 
int m_width
 Width in Bytes of single column element. More...
 
int m_number
 Number of elements in column. More...
 
int m_length
 Length of column (number of rows) More...
 
bool m_variable
 Signals if column is variable length. More...
 
int m_varlen
 Maximum number of elements in variable-length. More...
 
std::vector< int > m_rowstart
 Start index of each row. More...
 
int m_size
 Size of allocated data area (0 if not loaded) More...
 
int m_anynul
 Number of NULLs encountered. More...
 
void * m_fitsfile
 FITS file pointer associated with column. More...
 
double m_tscale
 Optional scaling factor (1 = no scaling) More...
 

Friends

class GFitsTable
 

Detailed Description

Abstract interface for FITS table column.

This class provides an abstract base class for all FITS table columns. The class supports both fixed-length and variable-length vector columns.

Definition at line 44 of file GFitsTableCol.hpp.

Constructor & Destructor Documentation

GFitsTableCol::GFitsTableCol ( void  )

Void constructor.

Definition at line 64 of file GFitsTableCol.cpp.

References init_members().

GFitsTableCol::GFitsTableCol ( const std::string &  name,
const int &  nrows,
const int &  number,
const int &  width 
)

Column constructor.

Parameters
[in]nameName of column.
[in]nrowsNumber of rows in column.
[in]numberNumber of elements in column (negative for variable-length).
[in]widthWidth of one column element.

Construct column instance from name, nrows, number of elements and width (or size) of one element. If number is negative, a variable-length column will be allocated. The repeat value, which is required for binary tables, is computed internally by multiplying the number by the width.

Definition at line 88 of file GFitsTableCol.cpp.

References init_members(), m_length, m_name, m_number, m_repeat, m_rowstart, m_variable, m_width, name(), nrows(), number(), and width().

GFitsTableCol::GFitsTableCol ( const GFitsTableCol column)

Copy constructor.

Parameters
[in]columnColumn.

Definition at line 126 of file GFitsTableCol.cpp.

References copy_members(), and init_members().

GFitsTableCol::~GFitsTableCol ( void  )
virtual

Destructor.

Definition at line 142 of file GFitsTableCol.cpp.

References free_members().

Member Function Documentation

void GFitsTableCol::anynul ( const int &  anynul)
inline

Set number of NULLs encountered.

Parameters
[in]anynulNumber of NULLs encountered.

Definition at line 472 of file GFitsTableCol.hpp.

References anynul(), and m_anynul.

const int & GFitsTableCol::anynul ( void  ) const
inline

Return number of NULLs encountered.

Returns
Number of NULLs encountered

Definition at line 488 of file GFitsTableCol.hpp.

References m_anynul.

Referenced by anynul(), and load_column_variable().

virtual std::string GFitsTableCol::classname ( void  ) const
pure virtual

Return class name.

Returns
String containing the class name.

Returns the class name for non-abstract classes in a human readable way.

Implements GBase.

Implemented in GFitsTableBoolCol, GFitsTableBitCol, GFitsTableCDoubleCol, GFitsTableCFloatCol, GFitsTableByteCol, GFitsTableDoubleCol, GFitsTableFloatCol, GFitsTableLongCol, GFitsTableLongLongCol, GFitsTableShortCol, GFitsTableStringCol, GFitsTableULongCol, and GFitsTableUShortCol.

virtual void GFitsTableCol::clear ( void  )
pure virtual

Clear object.

Sets the object to a clean initial state. After calling the method the object will be in the same state as it were if an empty instance of the object would have been created.

Implements GBase.

Implemented in GFitsTableBoolCol, GFitsTableBitCol, GFitsTableCDoubleCol, GFitsTableCFloatCol, GFitsTableByteCol, GFitsTableDoubleCol, GFitsTableFloatCol, GFitsTableLongCol, GFitsTableLongLongCol, GFitsTableShortCol, GFitsTableStringCol, GFitsTableULongCol, and GFitsTableUShortCol.

virtual GFitsTableCol* GFitsTableCol::clone ( void  ) const
pure virtual
void GFitsTableCol::colnum ( const int &  colnum)
inline

Set column number.

Parameters
[in]colnumColumn number.

Definition at line 251 of file GFitsTableCol.hpp.

References colnum(), and m_colnum.

Referenced by GFitsTable::data_open(), GFitsTable::data_save(), GVOTable::field_from_fits_column(), GFitsTable::insert(), and GFitsTable::remove().

const int & GFitsTableCol::colnum ( void  ) const
inline

Returns column number in FITS file (starting from 1)

Returns
Column number in FITS file (starting from 1).

Definition at line 267 of file GFitsTableCol.hpp.

References m_colnum.

Referenced by colnum().

void GFitsTableCol::connect ( void *  vptr)
protected

Connect table column to FITS file.

Parameters
[in]vptrColumn file void pointer.

A table column is connected to a FITS file when the m_fitsfile holds a FITS file pointer. In that way, the column knows to which file it belongs.

Definition at line 1047 of file GFitsTableCol.cpp.

References FPTR_COPY, and m_fitsfile.

Referenced by GFitsTable::data_connect(), and GFitsTable::data_open().

void GFitsTableCol::copy_members ( const GFitsTableCol column)
protected

Copy class members.

Parameters
[in]columnColumn to be copied.

Definition at line 988 of file GFitsTableCol.cpp.

References FPTR_COPY, m_anynul, m_colnum, m_dim, m_fitsfile, m_length, m_name, m_number, m_repeat, m_rowstart, m_size, m_tscale, m_type, m_unit, m_variable, m_varlen, and m_width.

Referenced by GFitsTableCol(), and operator=().

void GFitsTableCol::dim ( const std::vector< int > &  dim)
inline

Set column dimension.

Parameters
[in]dimVector of column dimensions.

Sets the column dimension is a integer vector dim.

Todo:
Implement dimension check.

Definition at line 222 of file GFitsTableCol.hpp.

References dim(), and m_dim.

Referenced by GFitsTable::data_open(), GCTAResponseTable::read_tables(), GObservations::likelihood::save_fits(), GFitsTable::update_header(), and GCTAResponseTable::write().

const std::vector< int > & GFitsTableCol::dim ( void  ) const
inline

Returns column dimension.

Returns
Column dimensions (specified by TDIM keyword).

Definition at line 238 of file GFitsTableCol.hpp.

References m_dim.

Referenced by dim(), and print().

void GFitsTableCol::elements ( const int &  row,
const int &  elements 
)

Set number of column elements for specific row.

Parameters
[in]rowRow number.
[in]elementsNumber of elements in row.
Exceptions
GException::out_of_rangeInvalid row index specified.
GException::invalid_argumentInvalid number of elements specified.

Sets the number of elements in column for a specific row.

Definition at line 204 of file GFitsTableCol.cpp.

References G_ELEMENTS1, is_variable(), m_rowstart, m_varlen, nrows(), resize_data(), and gammalib::str().

Referenced by GCaldb::filename(), load_column_variable(), offset(), print(), and save_column_variable().

int GFitsTableCol::elements ( const int &  row) const

Returns number of elements in column for specific row.

Parameters
[in]rowRow index.
Returns
Number of elements in column at row.
Exceptions
GException::out_of_rangeRow index out of valid range.

Returns the number of elements in the column for a specific row. For a fixed-length column the returned number is independent of the row. For a variable-length column the returned number is then length of the column for the specified row.

Definition at line 276 of file GFitsTableCol.cpp.

References G_ELEMENTS2, m_number, m_rowstart, m_variable, nrows(), and number().

void GFitsTableCol::is_variable ( const bool &  variable)
inline

Set variable-length flag.

Parameters
[in]variableVariable-length flag.

Definition at line 443 of file GFitsTableCol.hpp.

References m_variable.

Referenced by GFitsTable::data_open().

const bool & GFitsTableCol::is_variable ( void  ) const
inline

Signals if column is of variable length.

Returns
True if column is a variable length column

Definition at line 459 of file GFitsTableCol.hpp.

References m_variable.

Referenced by elements(), load_column(), offset(), print(), save_column(), and tform_binary().

void GFitsTableCol::load_column ( void  )
protectedvirtual
void GFitsTableCol::load_column_fixed ( void  )
protectedvirtual

Load fixed-length column from FITS file.

Exceptions
GException::fits_hdu_not_foundSpecified HDU not found in FITS file.
GException::fits_errorAn error occured while loading column data from FITS file.

If a FITS file is attached to the column the data are loaded into memory from the FITS file. If no FITS file is attached, memory is allocated to hold the column data and all cells are set to 0.

The method makes use of the virtual methods GFitsTableCol::alloc_data, GFitsTableCol::init_data, GFitsTableCol::ptr_data, and GFitsTableCol::ptr_nulval. These methods are implemented by the derived column classes which implement a specific storage class (i.e. float, double, short, ...).

Definition at line 575 of file GFitsTableCol.cpp.

References __ffgcv, __ffmahd, alloc_data(), FPTR, G_LOAD_COLUMN_FIXED, init_data(), m_anynul, m_colnum, m_fitsfile, m_length, m_name, m_number, m_size, m_type, ptr_data(), ptr_nulval(), and gammalib::str().

Referenced by load_column().

void GFitsTableCol::load_column_variable ( void  )
protectedvirtual

Load variable-length column from FITS file.

Exceptions
GException::fits_errorAn error occured while loading column data from FITS file.

If a FITS file is attached to the column the data are loaded into memory from the FITS file. If no FITS file is attached, memory is allocated to hold the column data and all cells are set to 0.

The method makes use of the virtual methods GFitsTableCol::alloc_data, GFitsTableCol::init_data, GFitsTableCol::ptr_data, and GFitsTableCol::ptr_nulval. These methods are implemented by the derived column classes which implement a specific storage class (i.e. float, double, short, ...).

Definition at line 652 of file GFitsTableCol.cpp.

References __ffgcv, __ffgdes, __ffmahd, abs(), alloc_data(), anynul(), elements(), FPTR, G_LOAD_COLUMN_VARIABLE, init_data(), m_anynul, m_colnum, m_fitsfile, m_length, m_rowstart, m_size, m_type, m_varlen, name(), offset(), ptr_data(), ptr_nulval(), repeat(), and gammalib::str().

Referenced by load_column().

void GFitsTableCol::name ( const std::string &  name)
inline

Set column name.

Parameters
[in]nameColumn name.

Definition at line 160 of file GFitsTableCol.hpp.

References m_name, and name().

Referenced by GFitsTable::data_open(), GFitsTable::data_save(), GVOTable::field_from_fits_column(), GFitsTable::get_ttype(), and GCTAEventList::read_events().

const std::string & GFitsTableCol::name ( void  ) const
inline

Returns column name.

Returns
Column name.

Definition at line 176 of file GFitsTableCol.hpp.

References m_name.

Referenced by GFitsTableCol(), load_column_variable(), name(), print(), save_column_fixed(), and save_column_variable().

void GFitsTableCol::nrows ( const int &  nrows)
inline
void GFitsTableCol::number ( const int &  number)
inline
int GFitsTableCol::offset ( const int &  row,
const int &  inx 
) const
protectedvirtual

Compute offset of column element in memory.

Parameters
[in]rowRow of column [0,...,m_length[.
[in]inxVector index in column row [0,...,elements(row)[.
Exceptions
GException::out_of_rangeTable row or vector index are out of valid range.

Computes the offset of a column element in the storage array from the row number and the vector index. The method also supports both variable-length and fixed-length columns.

Definition at line 910 of file GFitsTableCol.cpp.

References elements(), G_OFFSET, is_variable(), m_length, m_number, and m_rowstart.

Referenced by GFitsTableByteCol::integer(), GFitsTableDoubleCol::integer(), GFitsTableLongLongCol::integer(), GFitsTableShortCol::integer(), GFitsTableStringCol::integer(), GFitsTableULongCol::integer(), GFitsTableFloatCol::integer(), GFitsTableUShortCol::integer(), GFitsTableLongCol::integer(), GFitsTableCFloatCol::integer(), GFitsTableCDoubleCol::integer(), GFitsTableBoolCol::integer(), load_column_variable(), GFitsTableByteCol::operator()(), GFitsTableShortCol::operator()(), GFitsTableDoubleCol::operator()(), GFitsTableStringCol::operator()(), GFitsTableULongCol::operator()(), GFitsTableFloatCol::operator()(), GFitsTableUShortCol::operator()(), GFitsTableLongCol::operator()(), GFitsTableLongLongCol::operator()(), GFitsTableCDoubleCol::operator()(), GFitsTableCFloatCol::operator()(), GFitsTableBoolCol::operator()(), GFitsTableLongLongCol::real(), GFitsTableShortCol::real(), GFitsTableUShortCol::real(), GFitsTableStringCol::real(), GFitsTableDoubleCol::real(), GFitsTableULongCol::real(), GFitsTableFloatCol::real(), GFitsTableByteCol::real(), GFitsTableLongCol::real(), GFitsTableCDoubleCol::real(), GFitsTableCFloatCol::real(), GFitsTableBoolCol::real(), GFitsTableLongCol::string(), GFitsTableULongCol::string(), GFitsTableByteCol::string(), GFitsTableLongLongCol::string(), GFitsTableDoubleCol::string(), GFitsTableShortCol::string(), GFitsTableUShortCol::string(), GFitsTableFloatCol::string(), GFitsTableStringCol::string(), GFitsTableCFloatCol::string(), GFitsTableCDoubleCol::string(), and GFitsTableBoolCol::string().

std::string GFitsTableCol::print ( const GChatter chatter = NORMAL) const
virtual

Print column information.

Parameters
[in]chatterChattiness.
Returns
String containing column information.
Todo:
Format and cfitsio information is mainly for debugging. This could vanish in a more stable version of the code, or it could be compiled-in conditionally using a debug option. Alternatively, a higher chatter level may be required to see this information.

Implements GBase.

Definition at line 389 of file GFitsTableCol.cpp.

References ascii_format(), dim(), elements(), fetch_data(), is_loaded(), is_variable(), m_colnum, m_rowstart, m_size, m_varlen, name(), nrows(), number(), gammalib::parformat(), repeat(), gammalib::right(), SILENT, gammalib::str(), tform_binary(), tscale(), unit(), and width().

Referenced by GFitsTable::data_save().

void GFitsTableCol::repeat ( const int &  repeat)
inline

Set repeat value.

Parameters
[in]repeatRepeat value.

Definition at line 327 of file GFitsTableCol.hpp.

References m_repeat, and repeat().

Referenced by GFitsTable::data_open().

const int & GFitsTableCol::repeat ( void  ) const
inline

Returns column repeat value (only used for binary tables)

Definition at line 341 of file GFitsTableCol.hpp.

References m_repeat.

Referenced by load_column_variable(), print(), repeat(), and tform_binary().

virtual void GFitsTableCol::resize_data ( const int &  index,
const int &  number 
)
protectedpure virtual
void GFitsTableCol::save ( void  )
protectedvirtual

Save table column into FITS file.

Refer to GFitsTableCol::save_column() for more information.

Reimplemented in GFitsTableBoolCol, and GFitsTableStringCol.

Definition at line 511 of file GFitsTableCol.cpp.

References save_column().

Referenced by GFitsTable::data_save().

void GFitsTableCol::save_column ( void  )
protectedvirtual

Save table column into FITS file.

Save table column into FITS file by calling the save_column_variable() method for variable-length columns and save_column_fixed() for fixed- length columns.

Reimplemented in GFitsTableBitCol.

Definition at line 769 of file GFitsTableCol.cpp.

References is_variable(), save_column_fixed(), and save_column_variable().

Referenced by GFitsTableStringCol::save(), GFitsTableBoolCol::save(), and save().

void GFitsTableCol::save_column_fixed ( void  )
protectedvirtual

Save table column into FITS file.

Exceptions
GException::fits_errorError occured during writing of the column data.

The table column is only saved if it is linked to a FITS file and if the data are indeed present in the class instance. This avoids saving of data that have not been modified.

The method make use of the virtual methods GFitsTableCol::ptr_data and GFitsTableCol::ptr_nulval. These methods are implemented by the derived column classes which implement a specific storage class (i.e. float, double, short, ...).

Definition at line 800 of file GFitsTableCol.cpp.

References __ffmahd, __ffpcn, FPTR, G_SAVE_COLUMN_FIXED, m_colnum, m_fitsfile, m_size, m_type, name(), ptr_data(), ptr_nulval(), and gammalib::str().

Referenced by save_column().

void GFitsTableCol::save_column_variable ( void  )
protectedvirtual

Save table column into FITS file.

Exceptions
GException::fits_hdu_not_foundSpecified HDU not found in FITS file.
GException::fits_errorError occured during writing of the column data.

The table column is only saved if it is linked to a FITS file and if the data are indeed present in the class instance. This avoids saving of data that have not been modified.

The method make use of the virtual methods GFitsTableCol::ptr_data and GFitsTableCol::ptr_nulval. These methods are implemented by the derived column classes which implement a specific storage class (i.e. float, double, short, ...).

Definition at line 851 of file GFitsTableCol.cpp.

References __ffmahd, __ffpcn, abs(), elements(), FPTR, G_SAVE_COLUMN_VARIABLE, m_colnum, m_fitsfile, m_length, m_rowstart, m_type, name(), ptr_data(), ptr_nulval(), and gammalib::str().

Referenced by save_column().

std::string GFitsTableCol::tform_binary ( void  ) const

Returns TFORM code for binary table column.

Constructs the TFORM code for a binary table column, supporting fixed-length and variable-length column types.

Definition at line 299 of file GFitsTableCol.cpp.

References __TBIT, __TBYTE, __TCOMPLEX, __TDBLCOMPLEX, __TDOUBLE, __TFLOAT, __TINT, __TLOGICAL, __TLONG, __TLONGLONG, __TSHORT, __TSTRING, __TUINT, __TULONG, __TUSHORT, abs(), is_variable(), m_varlen, number(), repeat(), gammalib::str(), type(), and width().

Referenced by GFitsTable::get_tform(), and print().

void GFitsTableCol::tscale ( const double &  tscale)
inline

Set TSCALE value.

Parameters
[in]tscaleTSCALE value

Definition at line 501 of file GFitsTableCol.hpp.

References m_tscale, and tscale().

Referenced by GFitsTable::data_open().

const double & GFitsTableCol::tscale ( void  ) const
inline

Return TSCALE value.

Returns
TSCALE value (1 if unscaled).

Definition at line 517 of file GFitsTableCol.hpp.

References m_tscale.

Referenced by print(), and tscale().

void GFitsTableCol::type ( const int &  type)
inline

Set type code.

Parameters
[in]typeType code.

Definition at line 280 of file GFitsTableCol.hpp.

References m_type, and type().

Referenced by GFitsTable::data_open(), and GVOTable::field_from_fits_column().

const int & GFitsTableCol::type ( void  ) const
inline

Returns CFITSIO column type.

Returns one of the following: 1 (TBIT) 11 (TBYTE) 12 (TSBYTE) 14 (TLOGICAL) 16 (TSTRING) 20 (TUSHORT) 21 (TSHORT) 30 (TUINT) 31 (TINT) 40 (TULONG) 41 (TLONG) 42 (TFLOAT) 81 (TLONGLONG) 82 (TDOUBLE) 83 (TCOMPLEX) 163 (TDBLCOMPLEX)

If the type value is negative, the column is a variable-length column.

Definition at line 314 of file GFitsTableCol.hpp.

References m_type.

Referenced by tform_binary(), and type().

const std::string & GFitsTableCol::unit ( void  ) const
inline

Returns column unit.

Returns
Column unit.

Definition at line 205 of file GFitsTableCol.hpp.

References m_unit.

Referenced by print(), and unit().

void GFitsTableCol::width ( const int &  width)
inline

Set width in Bytes of one column element.

Parameters
[in]widthWidth in Bytes of one column element.

Definition at line 354 of file GFitsTableCol.hpp.

References m_width, and width().

Referenced by GFitsTable::data_open(), GFitsBinTable::init_table_header(), GFitsAsciiTable::init_table_header(), and GFitsTable::update_header().

const int & GFitsTableCol::width ( void  ) const
inline

Return width in Bytes of one column element.

Returns
Width in Bytes of one column element.

Definition at line 370 of file GFitsTableCol.hpp.

References m_width.

Referenced by GFitsTableCol(), print(), tform_binary(), and width().

Friends And Related Function Documentation

friend class GFitsTable
friend

Definition at line 47 of file GFitsTableCol.hpp.

Member Data Documentation

int GFitsTableCol::m_anynul
protected

Number of NULLs encountered.

Definition at line 148 of file GFitsTableCol.hpp.

Referenced by anynul(), copy_members(), init_members(), GFitsTableBitCol::load_column(), load_column_fixed(), and load_column_variable().

int GFitsTableCol::m_colnum
protected

Column number (starting from 1). This parameter is used to signal if a table column corresponds to a FITS file column. If it is set to 0 there is no correspondence.

Definition at line 134 of file GFitsTableCol.hpp.

Referenced by colnum(), copy_members(), init_members(), GFitsTableBitCol::load_column(), load_column(), load_column_fixed(), load_column_variable(), print(), GFitsTableBitCol::save_column(), save_column_fixed(), and save_column_variable().

std::vector<int> GFitsTableCol::m_dim
protected

Column dimension.

Definition at line 133 of file GFitsTableCol.hpp.

Referenced by copy_members(), dim(), and init_members().

void* GFitsTableCol::m_fitsfile
protected
std::string GFitsTableCol::m_name
protected
int GFitsTableCol::m_repeat
protected

Repeat value of column.

Definition at line 140 of file GFitsTableCol.hpp.

Referenced by copy_members(), GFitsTableCol(), init_members(), and repeat().

int GFitsTableCol::m_size
mutableprotected

Size of allocated data area (0 if not loaded)

Definition at line 147 of file GFitsTableCol.hpp.

Referenced by GFitsTableStringCol::alloc_buffer(), GFitsTableBoolCol::alloc_buffer(), GFitsTableLongCol::alloc_data(), GFitsTableLongLongCol::alloc_data(), GFitsTableShortCol::alloc_data(), GFitsTableByteCol::alloc_data(), GFitsTableDoubleCol::alloc_data(), GFitsTableULongCol::alloc_data(), GFitsTableFloatCol::alloc_data(), GFitsTableUShortCol::alloc_data(), GFitsTableCDoubleCol::alloc_data(), GFitsTableCFloatCol::alloc_data(), GFitsTableStringCol::alloc_data(), GFitsTableBitCol::alloc_data(), GFitsTableBoolCol::alloc_data(), GFitsTableLongCol::copy_members(), GFitsTableLongLongCol::copy_members(), GFitsTableByteCol::copy_members(), GFitsTableShortCol::copy_members(), GFitsTableStringCol::copy_members(), GFitsTableULongCol::copy_members(), GFitsTableDoubleCol::copy_members(), GFitsTableUShortCol::copy_members(), GFitsTableFloatCol::copy_members(), GFitsTableCFloatCol::copy_members(), GFitsTableCDoubleCol::copy_members(), GFitsTableBitCol::copy_members(), GFitsTableBoolCol::copy_members(), copy_members(), GFitsTableStringCol::fetch_data(), GFitsTableBoolCol::fetch_data(), GFitsTableStringCol::free_buffer(), GFitsTableLongCol::free_members(), GFitsTableLongLongCol::free_members(), GFitsTableShortCol::free_members(), GFitsTableStringCol::free_members(), GFitsTableDoubleCol::free_members(), GFitsTableFloatCol::free_members(), GFitsTableCFloatCol::free_members(), GFitsTableCDoubleCol::free_members(), GFitsTableBitCol::free_members(), GFitsTableBoolCol::free_members(), GFitsTableFloatCol::init_data(), GFitsTableLongCol::init_data(), GFitsTableLongLongCol::init_data(), GFitsTableShortCol::init_data(), GFitsTableByteCol::init_data(), GFitsTableULongCol::init_data(), GFitsTableDoubleCol::init_data(), GFitsTableUShortCol::init_data(), GFitsTableCDoubleCol::init_data(), GFitsTableCFloatCol::init_data(), GFitsTableStringCol::init_data(), GFitsTableBitCol::init_data(), GFitsTableBoolCol::init_data(), init_members(), GFitsTableLongCol::insert(), GFitsTableLongLongCol::insert(), GFitsTableShortCol::insert(), GFitsTableByteCol::insert(), GFitsTableStringCol::insert(), GFitsTableDoubleCol::insert(), GFitsTableULongCol::insert(), GFitsTableUShortCol::insert(), GFitsTableFloatCol::insert(), GFitsTableCFloatCol::insert(), GFitsTableCDoubleCol::insert(), GFitsTableBitCol::insert(), GFitsTableBoolCol::insert(), GFitsTableBitCol::load_column(), load_column_fixed(), load_column_variable(), print(), GFitsTableFloatCol::release_data(), GFitsTableDoubleCol::release_data(), GFitsTableUShortCol::release_data(), GFitsTableLongCol::release_data(), GFitsTableShortCol::release_data(), GFitsTableByteCol::release_data(), GFitsTableULongCol::release_data(), GFitsTableLongLongCol::release_data(), GFitsTableCDoubleCol::release_data(), GFitsTableCFloatCol::release_data(), GFitsTableStringCol::release_data(), GFitsTableBitCol::release_data(), GFitsTableBoolCol::release_data(), GFitsTableByteCol::remove(), GFitsTableLongLongCol::remove(), GFitsTableStringCol::remove(), GFitsTableShortCol::remove(), GFitsTableULongCol::remove(), GFitsTableUShortCol::remove(), GFitsTableLongCol::remove(), GFitsTableDoubleCol::remove(), GFitsTableFloatCol::remove(), GFitsTableCFloatCol::remove(), GFitsTableCDoubleCol::remove(), GFitsTableBitCol::remove(), GFitsTableBoolCol::remove(), GFitsTableUShortCol::resize_data(), GFitsTableDoubleCol::resize_data(), GFitsTableFloatCol::resize_data(), GFitsTableLongLongCol::resize_data(), GFitsTableShortCol::resize_data(), GFitsTableByteCol::resize_data(), GFitsTableLongCol::resize_data(), GFitsTableULongCol::resize_data(), GFitsTableCDoubleCol::resize_data(), GFitsTableCFloatCol::resize_data(), GFitsTableStringCol::resize_data(), GFitsTableBoolCol::resize_data(), GFitsTableStringCol::save(), GFitsTableBoolCol::save(), GFitsTableBitCol::save_column(), and save_column_fixed().

double GFitsTableCol::m_tscale
protected

Optional scaling factor (1 = no scaling)

Definition at line 150 of file GFitsTableCol.hpp.

Referenced by copy_members(), init_members(), load_column(), and tscale().

std::string GFitsTableCol::m_unit
protected

Column unit.

Definition at line 132 of file GFitsTableCol.hpp.

Referenced by copy_members(), init_members(), and unit().

bool GFitsTableCol::m_variable
protected

Signals if column is variable length.

Definition at line 144 of file GFitsTableCol.hpp.

Referenced by copy_members(), elements(), GFitsTableCol(), init_members(), and is_variable().


The documentation for this class was generated from the following files: