casacore
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
casacore::BinaryTableExtension Class Reference

BINTABLE extension
More...

#include <hdu.h>

Public Member Functions

 BinaryTableExtension (FitsInput &, FITSErrorHandler errhandler=FITSError::defaultHandler)
 
 BinaryTableExtension (FitsKeywordList &, FITSErrorHandler errhandler=FITSError::defaultHandler)
 
 BinaryTableExtension (FITSErrorHandler errhandler=FITSError::defaultHandler)
 constructor to match write_bintbl_hdr()
More...
 
virtual ~BinaryTableExtension ()
 
Int nrows () const
 return basic elements of a table More...
 
Int ncols () const
 
uInt rowsize () const
 
Int tfields () const
 
const char * tform (int n) const
 
double tscal (int n) const
 
double tzero (int n) const
 
Bool isatnull (int n) const
 
Int tnull (int n) const
 
const char * ttype (int n) const
 
const char * tunit (int n) const
 
const char * tdisp (int n) const
 
const char * tdim (int n) const
 
const char * ctype (int n) const
 
double crpix (int n) const
 
double crota (int n) const
 
double crval (int n) const
 
double cdelt (int n) const
 
Int theap () const
 
const char * author () const
 
const char * referenc () const
 
int bind (int, FitsBase &)
 binds a FitsField to a column More...
 
BinaryTableExtensionoperator++ ()
 row selector functions More...
 
BinaryTableExtensionoperator-- ()
 
BinaryTableExtensionoperator() (int)
 
int read ()
 read entire table into memory More...
 
int read (int)
 read next N rows into memory More...
 
int set_next (int)
 prepare to write the next N rows More...
 
int write (FitsOutput &)
 write current rows More...
 
int write_binTbl_hdr (FitsOutput &, long, int, const char **, const char **, const char **, const char *, long)
 create a binary table header without using FitsKeywordList objet. More...
 
FitsBasefield (int i) const
 select a field More...
 
Int currrow () const
 get current row More...
 
- Public Member Functions inherited from casacore::ExtensionHeaderDataUnit
 ExtensionHeaderDataUnit (FitsInput &, FITSErrorHandler errhandler=FITSError::defaultHandler)
 
 ExtensionHeaderDataUnit (FitsKeywordList &, FITSErrorHandler errhandler=FITSError::defaultHandler)
 
 ~ExtensionHeaderDataUnit ()
 
char * xtension ()
 
char * extname ()
 
Int extver ()
 
Int extlevel ()
 
Int pcount ()
 
Int gcount ()
 
int read (char *addr, int nbytes)
 read next N bytes into addr More...
 
int write (FitsOutput &fout, char *addr, int nbytes)
 write next N bytes from addr to the FITS output fout More...
 
- Public Member Functions inherited from casacore::HeaderDataUnit
virtual ~HeaderDataUnit ()
 
Int dims () const
 
Int dim (int n) const
 
OFF_T fitsdatasize () const
 
FITS::ValueType datatype () const
 
Int fitsitemsize () const
 
Int localitemsize () const
 
FITS::HDUType hdutype () const
 
int err () const
 
int skip (uInt n)
 skipping one or more HDU's More...
 
int skip ()
 
int write_hdr (FitsOutput &)
 write the current header More...
 
ConstFitsKeywordListkwlist ()
 Operations on the HDU's keyword list. More...
 
Vector< Stringkwlist_str (Bool length80=False)
 return the header of the chdu as a vector of String. More...
 
void firstkw ()
 
void lastkw ()
 
const FitsKeywordnextkw ()
 
const FitsKeywordprevkw ()
 
const FitsKeywordcurrkw ()
 
const FitsKeywordkw (int n)
 
const FitsKeywordkw (const FITS::ReservedName &n)
 
const FitsKeywordnextkw (FITS::ReservedName &n)
 
const FitsKeywordkw (FITS::ReservedName &n, int i)
 
const FitsKeywordnextkw (FITS::ReservedName &n, int i)
 
const FitsKeywordkw (const char *n)
 
const FitsKeywordnextkw (const char *n)
 
void mk (FITS::ReservedName k, Bool v, const char *c=0)
 
void mk (FITS::ReservedName k, const char *v=0, const char *c=0)
 
void mk (FITS::ReservedName k, Int v, const char *c=0)
 
void mk (FITS::ReservedName k, double v, const char *c=0)
 
void mk (int n, FITS::ReservedName k, Bool v, const char *c=0)
 
void mk (int n, FITS::ReservedName k, const char *v, const char *c=0)
 
void mk (int n, FITS::ReservedName k, Int v, const char *c=0)
 
void mk (int n, FITS::ReservedName k, double v, const char *c=0)
 
void mk (const char *n, Bool v, const char *c=0)
 
void mk (const char *n, const char *v=0, const char *c=0)
 
void mk (const char *n, Int v, const char *c=0)
 
void mk (const char *n, float v, const char *c=0)
 
void mk (const char *n, double v, const char *c=0)
 
void mk (const char *n, Int r, Int i, const char *c=0)
 
void mk (const char *n, float r, float i, const char *c=0)
 
void mk (const char *n, double r, double i, const char *c=0)
 
void spaces (const char *n=0, const char *c=0)
 
void comment (const char *n=0, const char *c=0)
 
void history (const char *c=0)
 
Bool notnull (double x) const
 
Bool notnull (char *s) const
 
Bool notnull (Int l) const
 
int get_hdr (FITS::HDUType, FitsKeywordList &)
 
int read_data (char *, Int)
 
int write_data (FitsOutput &, char *, Int)
 
OFF_T read_all_data (char *)
 
int write_all_data (FitsOutput &, char *)
 

Protected Member Functions

 BinaryTableExtension (FitsInput &, FITS::HDUType, FITSErrorHandler errhandler=FITSError::defaultHandler)
 sets field addresses in the current row void set_fitsrow(Int); More...
 
 BinaryTableExtension (FitsKeywordList &, FITS::HDUType, FITSErrorHandler errhandler=FITSError::defaultHandler)
 
 BinaryTableExtension (FITS::HDUType, FITSErrorHandler errhandler=FITSError::defaultHandler)
 
virtual int readrow ()
 read and write the next FITS data row More...
 
virtual int writerow (FitsOutput &)
 
void set_fitsrow (Int)
 sets field addresses in the current row More...
 
- Protected Member Functions inherited from casacore::ExtensionHeaderDataUnit
 ExtensionHeaderDataUnit (FitsInput &, FITS::HDUType, FITSErrorHandler errhandler=FITSError::defaultHandler)
 
 ExtensionHeaderDataUnit (FitsKeywordList &, FITS::HDUType, FITSErrorHandler errhandler=FITSError::defaultHandler)
 
 ExtensionHeaderDataUnit (FITS::HDUType, FITSErrorHandler errhandler=FITSError::defaultHandler)
 This constructor is used for writing only required keywords. More...
 
- Protected Member Functions inherited from casacore::HeaderDataUnit
 HeaderDataUnit (FitsInput &, FITS::HDUType, FITSErrorHandler errhandler=FITSError::defaultHandler)
 For input – ~ should delete the keyword list: kwflag = 1. More...
 
 HeaderDataUnit (FitsKeywordList &, FITS::HDUType, FITSErrorHandler errhandler=FITSError::defaultHandler, FitsInput *=0)
 For output – ~ should not delete keyword list: kwflag = 0 07/21/98 AKH Clarification: HeaderDataUnit has a copy of the FitsKeywordList, and should delete it. More...
 
 HeaderDataUnit (FITS::HDUType, FITSErrorHandler errhandler=FITSError::defaultHandler, FitsInput *=0)
 constructor for objects that write only required keyword to fits file. More...
 
bool init_data_unit (FITS::HDUType t)
 for write required keywords only to use. More...
 
void posEnd ()
 
void errmsg (HDUErrs, const char *)
 
char * assign (FITS::ReservedName)
 
char * assign (FITS::ReservedName, int)
 
double asgdbl (FITS::ReservedName, double)
 
double asgdbl (FITS::ReservedName, int, double)
 

Protected Attributes

Int tfields_x
 
char ** tform_x
 
double * tscal_x
 
double * tzero_x
 
Boolisatnull_x
 
Inttnull_x
 
char ** ttype_x
 
char ** tunit_x
 
char ** tdisp_x
 
char ** tdim_x
 
char ** ctype_x
 
double * crpix_x
 
double * crota_x
 
double * crval_x
 
double * cdelt_x
 
Int nAxis
 
Int theap_x
 
char * author_x
 
char * referenc_x
 
unsigned char * fitsrow
 
uIntfits_offset
 
uInt fitsrowsize
 
Bool isoptimum
 
unsigned char * table
 
uInt tablerowsize
 
uInt alloc_row
 
Int beg_row
 
Int end_row
 
Int curr_row
 
FitsBase ** fld
 
uInttable_offset
 
void ** data_addr
 data addresses of fields of current row More...
 
- Protected Attributes inherited from casacore::ExtensionHeaderDataUnit
char * xtension_x
 
char * extname_x
 
Int extver_x
 
Int extlevel_x
 
Int pcount_x
 
Int gcount_x
 
- Protected Attributes inherited from casacore::HeaderDataUnit
FitsKeywordListkwlist_
 
ConstFitsKeywordList constkwlist_
 
FitsInputfin
 
FITSErrorHandler errfn
 
HDUErrs err_status
 
Int no_dims
 
Intdimn
 
OFF_T fits_data_size
 uInt fits_data_size; // size in bytes of total amount of data More...
 
FITS::ValueType data_type
 
Int fits_item_size
 
Int local_item_size
 
FITS::HDUType hdu_type
 
char pad_char
 
double double_null
 
char char_null
 
Int Int_null
 

Private Member Functions

void bt_assign ()
 

Additional Inherited Members

- Public Types inherited from casacore::HeaderDataUnit
enum  HDUErrs {
  OK ,
  NOMEM ,
  MISSKEY ,
  BADBITPIX ,
  NOAXISN ,
  NOPCOUNT ,
  NOGCOUNT ,
  BADPCOUNT ,
  BADGCOUNT ,
  NOGROUPS ,
  BADNAXIS ,
  BADREC ,
  BADTYPE ,
  BADRULES ,
  BADSIZE ,
  BADOPER ,
  BADCONV ,
  BADIO
}
 error handling and error codes that can be returned More...
 
- Static Public Member Functions inherited from casacore::HeaderDataUnit
static Bool determine_type (FitsKeywordList &, FITS::HDUType &, FITS::ValueType &, FITSErrorHandler, HDUErrs &)
 Determines the HDU type and the data type Parameterss: keyword list, hdu type, data type, error handler and error status. More...
 
static Bool compute_size (FitsKeywordList &, OFF_T &, Int &, FITS::HDUType &, FITS::ValueType &, FITSErrorHandler, HDUErrs &)
 Compute the total size of the data associated with an HDU. More...
 

Detailed Description

BINTABLE extension

Definition at line 1035 of file hdu.h.

Constructor & Destructor Documentation

◆ BinaryTableExtension() [1/6]

casacore::BinaryTableExtension::BinaryTableExtension ( FitsInput ,
FITSErrorHandler  errhandler = FITSError::defaultHandler 
)

◆ BinaryTableExtension() [2/6]

casacore::BinaryTableExtension::BinaryTableExtension ( FitsKeywordList ,
FITSErrorHandler  errhandler = FITSError::defaultHandler 
)

◆ BinaryTableExtension() [3/6]

casacore::BinaryTableExtension::BinaryTableExtension ( FITSErrorHandler  errhandler = FITSError::defaultHandler)

constructor to match write_bintbl_hdr()

◆ ~BinaryTableExtension()

virtual casacore::BinaryTableExtension::~BinaryTableExtension ( )
virtual

◆ BinaryTableExtension() [4/6]

casacore::BinaryTableExtension::BinaryTableExtension ( FitsInput ,
FITS::HDUType  ,
FITSErrorHandler  errhandler = FITSError::defaultHandler 
)
protected

sets field addresses in the current row void set_fitsrow(Int);

◆ BinaryTableExtension() [5/6]

casacore::BinaryTableExtension::BinaryTableExtension ( FitsKeywordList ,
FITS::HDUType  ,
FITSErrorHandler  errhandler = FITSError::defaultHandler 
)
protected

◆ BinaryTableExtension() [6/6]

casacore::BinaryTableExtension::BinaryTableExtension ( FITS::HDUType  ,
FITSErrorHandler  errhandler = FITSError::defaultHandler 
)
protected

Member Function Documentation

◆ author()

const char* casacore::BinaryTableExtension::author ( ) const
inline

Definition at line 1068 of file hdu.h.

References author_x.

◆ bind()

int casacore::BinaryTableExtension::bind ( int  ,
FitsBase  
)

binds a FitsField to a column

◆ bt_assign()

void casacore::BinaryTableExtension::bt_assign ( )
private

◆ cdelt()

double casacore::BinaryTableExtension::cdelt ( int  n) const
inline

Definition at line 1066 of file hdu.h.

References cdelt_x.

◆ crota()

double casacore::BinaryTableExtension::crota ( int  n) const
inline

Definition at line 1064 of file hdu.h.

References crota_x.

◆ crpix()

double casacore::BinaryTableExtension::crpix ( int  n) const
inline

Definition at line 1063 of file hdu.h.

References crpix_x.

◆ crval()

double casacore::BinaryTableExtension::crval ( int  n) const
inline

Definition at line 1065 of file hdu.h.

References crval_x.

◆ ctype()

const char* casacore::BinaryTableExtension::ctype ( int  n) const
inline

Definition at line 1062 of file hdu.h.

References ctype_x.

◆ currrow()

Int casacore::BinaryTableExtension::currrow ( ) const
inline

get current row

Definition at line 1097 of file hdu.h.

References curr_row.

◆ field()

FitsBase& casacore::BinaryTableExtension::field ( int  i) const
inline

select a field

Definition at line 1095 of file hdu.h.

References fld.

◆ isatnull()

Bool casacore::BinaryTableExtension::isatnull ( int  n) const
inline

Definition at line 1056 of file hdu.h.

References isatnull_x.

◆ ncols()

Int casacore::BinaryTableExtension::ncols ( ) const
inline

Definition at line 1050 of file hdu.h.

References tfields_x.

◆ nrows()

Int casacore::BinaryTableExtension::nrows ( ) const
inline

return basic elements of a table

Definition at line 1049 of file hdu.h.

References casacore::HeaderDataUnit::dim().

Referenced by casacore::FITSTable::nrow().

◆ operator()()

BinaryTableExtension& casacore::BinaryTableExtension::operator() ( int  )

◆ operator++()

BinaryTableExtension& casacore::BinaryTableExtension::operator++ ( )

row selector functions

◆ operator--()

BinaryTableExtension& casacore::BinaryTableExtension::operator-- ( )

◆ read() [1/2]

int casacore::BinaryTableExtension::read ( )

read entire table into memory

◆ read() [2/2]

int casacore::BinaryTableExtension::read ( int  )

read next N rows into memory

◆ readrow()

virtual int casacore::BinaryTableExtension::readrow ( )
protectedvirtual

read and write the next FITS data row

Reimplemented in casacore::AsciiTableExtension.

◆ referenc()

const char* casacore::BinaryTableExtension::referenc ( ) const
inline

Definition at line 1069 of file hdu.h.

References referenc_x.

◆ rowsize()

uInt casacore::BinaryTableExtension::rowsize ( ) const
inline

Definition at line 1051 of file hdu.h.

References fitsrowsize.

◆ set_fitsrow()

void casacore::BinaryTableExtension::set_fitsrow ( Int  )
protected

sets field addresses in the current row

◆ set_next()

int casacore::BinaryTableExtension::set_next ( int  )

prepare to write the next N rows

◆ tdim()

const char* casacore::BinaryTableExtension::tdim ( int  n) const
inline

Definition at line 1061 of file hdu.h.

References tdim_x.

◆ tdisp()

const char* casacore::BinaryTableExtension::tdisp ( int  n) const
inline

Definition at line 1060 of file hdu.h.

References tdisp_x.

◆ tfields()

Int casacore::BinaryTableExtension::tfields ( ) const
inline

Definition at line 1052 of file hdu.h.

References tfields_x.

◆ tform()

const char* casacore::BinaryTableExtension::tform ( int  n) const
inline

Definition at line 1053 of file hdu.h.

References tform_x.

◆ theap()

Int casacore::BinaryTableExtension::theap ( ) const
inline

Definition at line 1067 of file hdu.h.

References theap_x.

◆ tnull()

Int casacore::BinaryTableExtension::tnull ( int  n) const
inline

Definition at line 1057 of file hdu.h.

References tnull_x.

◆ tscal()

double casacore::BinaryTableExtension::tscal ( int  n) const
inline

Definition at line 1054 of file hdu.h.

References tscal_x.

◆ ttype()

const char* casacore::BinaryTableExtension::ttype ( int  n) const
inline

Definition at line 1058 of file hdu.h.

References ttype_x.

◆ tunit()

const char* casacore::BinaryTableExtension::tunit ( int  n) const
inline

Definition at line 1059 of file hdu.h.

References tunit_x.

◆ tzero()

double casacore::BinaryTableExtension::tzero ( int  n) const
inline

Definition at line 1055 of file hdu.h.

References tzero_x.

◆ write()

int casacore::BinaryTableExtension::write ( FitsOutput )

write current rows

◆ write_binTbl_hdr()

int casacore::BinaryTableExtension::write_binTbl_hdr ( FitsOutput ,
long  ,
int  ,
const char **  ,
const char **  ,
const char **  ,
const char *  ,
long   
)

create a binary table header without using FitsKeywordList objet.

◆ writerow()

virtual int casacore::BinaryTableExtension::writerow ( FitsOutput )
protectedvirtual

Reimplemented in casacore::AsciiTableExtension.

Member Data Documentation

◆ alloc_row

uInt casacore::BinaryTableExtension::alloc_row
protected

Definition at line 1144 of file hdu.h.

◆ author_x

char* casacore::BinaryTableExtension::author_x
protected

Definition at line 1126 of file hdu.h.

Referenced by author().

◆ beg_row

Int casacore::BinaryTableExtension::beg_row
protected

Definition at line 1145 of file hdu.h.

◆ cdelt_x

double* casacore::BinaryTableExtension::cdelt_x
protected

Definition at line 1123 of file hdu.h.

Referenced by cdelt().

◆ crota_x

double* casacore::BinaryTableExtension::crota_x
protected

Definition at line 1121 of file hdu.h.

Referenced by crota().

◆ crpix_x

double* casacore::BinaryTableExtension::crpix_x
protected

Definition at line 1120 of file hdu.h.

Referenced by crpix().

◆ crval_x

double* casacore::BinaryTableExtension::crval_x
protected

Definition at line 1122 of file hdu.h.

Referenced by crval().

◆ ctype_x

char** casacore::BinaryTableExtension::ctype_x
protected

Definition at line 1119 of file hdu.h.

Referenced by ctype().

◆ curr_row

Int casacore::BinaryTableExtension::curr_row
protected

Definition at line 1147 of file hdu.h.

Referenced by currrow().

◆ data_addr

void** casacore::BinaryTableExtension::data_addr
protected

data addresses of fields of current row

Definition at line 1151 of file hdu.h.

◆ end_row

Int casacore::BinaryTableExtension::end_row
protected

Definition at line 1146 of file hdu.h.

◆ fits_offset

uInt* casacore::BinaryTableExtension::fits_offset
protected

Definition at line 1135 of file hdu.h.

◆ fitsrow

unsigned char* casacore::BinaryTableExtension::fitsrow
protected

Definition at line 1134 of file hdu.h.

◆ fitsrowsize

uInt casacore::BinaryTableExtension::fitsrowsize
protected

Definition at line 1136 of file hdu.h.

Referenced by rowsize().

◆ fld

FitsBase** casacore::BinaryTableExtension::fld
protected

Definition at line 1148 of file hdu.h.

Referenced by field().

◆ isatnull_x

Bool* casacore::BinaryTableExtension::isatnull_x
protected

Definition at line 1113 of file hdu.h.

Referenced by isatnull().

◆ isoptimum

Bool casacore::BinaryTableExtension::isoptimum
protected

Definition at line 1137 of file hdu.h.

◆ nAxis

Int casacore::BinaryTableExtension::nAxis
protected

Definition at line 1124 of file hdu.h.

◆ referenc_x

char* casacore::BinaryTableExtension::referenc_x
protected

Definition at line 1127 of file hdu.h.

Referenced by referenc().

◆ table

unsigned char* casacore::BinaryTableExtension::table
protected

Definition at line 1142 of file hdu.h.

◆ table_offset

uInt* casacore::BinaryTableExtension::table_offset
protected

Definition at line 1149 of file hdu.h.

◆ tablerowsize

uInt casacore::BinaryTableExtension::tablerowsize
protected

Definition at line 1143 of file hdu.h.

◆ tdim_x

char** casacore::BinaryTableExtension::tdim_x
protected

Definition at line 1118 of file hdu.h.

Referenced by tdim().

◆ tdisp_x

char** casacore::BinaryTableExtension::tdisp_x
protected

Definition at line 1117 of file hdu.h.

Referenced by tdisp().

◆ tfields_x

Int casacore::BinaryTableExtension::tfields_x
protected

Definition at line 1109 of file hdu.h.

Referenced by ncols(), and tfields().

◆ tform_x

char** casacore::BinaryTableExtension::tform_x
protected

Definition at line 1110 of file hdu.h.

Referenced by tform().

◆ theap_x

Int casacore::BinaryTableExtension::theap_x
protected

Definition at line 1125 of file hdu.h.

Referenced by theap().

◆ tnull_x

Int* casacore::BinaryTableExtension::tnull_x
protected

Definition at line 1114 of file hdu.h.

Referenced by tnull().

◆ tscal_x

double* casacore::BinaryTableExtension::tscal_x
protected

Definition at line 1111 of file hdu.h.

Referenced by tscal().

◆ ttype_x

char** casacore::BinaryTableExtension::ttype_x
protected

Definition at line 1115 of file hdu.h.

Referenced by ttype().

◆ tunit_x

char** casacore::BinaryTableExtension::tunit_x
protected

Definition at line 1116 of file hdu.h.

Referenced by tunit().

◆ tzero_x

double* casacore::BinaryTableExtension::tzero_x
protected

Definition at line 1112 of file hdu.h.

Referenced by tzero().


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