casacore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
casacore::FitsInput Class Reference

fixed-length sequential blocked FITS input More...

#include <fitsio.h>

Inheritance diagram for casacore::FitsInput:
casacore::FitsIO

Public Member Functions

 FitsInput (const char *, const FITS::FitsDevice &, int=10, FITSErrorHandler errhandler=FITSError::defaultHandler)
 
 FitsInput (FITSErrorHandler errhandler=FITSError::defaultHandler)
 
 ~FitsInput ()
 
int skip_hdu ()
 
void skip_all (FITS::HDUType)
 skip all remaining data More...
 
char * read_sp ()
 int skip_hdu2(); read special or unrecognizable records More...
 
Vector< Stringkwlist_str (Bool length80=False)
 get hdu header image cards as strings. More...
 
int blockno () const
 number of physical blocks read/written More...
 
int recno () const
 number of logical records read/written More...
 
BlockInputgetfin ()
 
int getnumhdu () const
 the number of hdu in this fits file More...
 
- Public Member Functions inherited from casacore::FitsIO
virtual ~FitsIO ()
 
int err () const
 
int fitsrecsize () const
 record size, in bytes, of a FITS block. More...
 
Bool isafits () const
 is it a valid fits file (SIMPLE==T). More...
 
Bool isextend () const
 see if there may be FITS extensions present (EXTENT==T) More...
 
Bool eof () const
 test if end of file has been reached More...
 
FITS::FitsRecType rectype () const
 the FITS record type More...
 
FITS::HDUType hdutype () const
 Header Data Unit type (e.g. More...
 
FITS::ValueType datatype () const
 
OFF_T datasize () const
 return the datasize of the current HDU. More...
 
Int itemsize () const
 data characteristics More...
 
OFF_T currsize () const
 for input, size of remaining data for output, size of data written More...
 
FitsKeyCardTranslatorgetkc ()
 get FitsKeyCardTranslator More...
 
fitsfile * getfptr () const
 get the fitsfile pointer More...
 
OFF_T getskipsize () const
 get the size of the last skipped HDU More...
 

Private Member Functions

BlockInputmake_input (const char *, const FITS::FitsDevice &, int, FITSErrorHandler errhandler=FITSError::defaultHandler)
 
virtual void errmsg (FitsErrs, const char *)
 set error message that belongs to one of the enumerated types More...
 
void init ()
 
void read_header_rec ()
 
bool current_hdu_type (FITS::HDUType &)
 
bool get_data_type (FITS::ValueType &)
 
int process_header (FITS::HDUType, FitsKeywordList &)
 Special interface to class HeaderDataUnit. More...
 
OFF_T read_all (FITS::HDUType, char *)
 read all data into a given address - all responsibility is given to the user More...
 
int read (FITS::HDUType, char *, int)
 read N bytes into address More...
 
int skip (FITS::HDUType, OFF_T)
 skip N bytes More...
 

Private Attributes

BlockInputm_fin
 
Bool m_got_rec
 flag used for read control in errors More...
 
int m_thdunum
 total number of hdu in this fits file More...
 

Friends

int HeaderDataUnit::get_hdr (FITS::HDUType, FitsKeywordList &)
 
OFF_T HeaderDataUnit::read_all_data (char *)
 
int HeaderDataUnit::read_data (char *, Int)
 
int HeaderDataUnit::skip (uInt)
 
int HeaderDataUnit::skip ()
 

Additional Inherited Members

- Public Types inherited from casacore::FitsIO
enum  FitsErrs {
  OK,
  IOERR,
  MISSKEY,
  BADBEGIN,
  EMPTYFILE,
  NOPRIMARY,
  BADOPER,
  BADEOF,
  MEMERR,
  BADBITPIX,
  NOAXISN,
  NOPCOUNT,
  NOGCOUNT,
  BADPCOUNT,
  BADGCOUNT,
  NOGROUPS,
  BADNAXIS,
  BADPRIMARY,
  BADSIZE,
  HDUERR
}
 error return code. More...
 
- Protected Member Functions inherited from casacore::FitsIO
 FitsIO (FITSErrorHandler)
 
- Protected Attributes inherited from casacore::FitsIO
fitsfile * m_fptr
 
const int m_recsize
 
Bool m_valid_fits
 
Bool m_extend
 
Bool m_isaprimary
 
Bool m_header_done
 
FITS::FitsRecType m_rec_type
 
FITS::HDUType m_hdu_type
 
FITSErrorHandler m_errfn
 
FitsErrs m_err_status
 
FitsKeyCardTranslator m_kc
 
FitsKeywordList m_kw
 
char * m_curr
 
int m_bytepos
 
Int m_item_size
 
FITS::ValueType m_data_type
 
OFF_T m_data_size
 uInt m_data_size; More...
 
OFF_T m_curr_size
 
for input, size of remaining data

for output, size of data written uInt m_curr_size; More...

 
OFF_T m_skipHDU_size
 for size of the last HDU skipped More...
 

Detailed Description

fixed-length sequential blocked FITS input

Definition at line 156 of file fitsio.h.

Constructor & Destructor Documentation

casacore::FitsInput::FitsInput ( const char *  ,
const FITS::FitsDevice ,
int  = 10,
FITSErrorHandler  errhandler = FITSError::defaultHandler 
)
casacore::FitsInput::FitsInput ( FITSErrorHandler  errhandler = FITSError::defaultHandler)
casacore::FitsInput::~FitsInput ( )

Member Function Documentation

int casacore::FitsInput::blockno ( ) const
inline

number of physical blocks read/written

Definition at line 186 of file fitsio.h.

References casacore::BlockIO::blockno(), and m_fin.

bool casacore::FitsInput::current_hdu_type ( FITS::HDUType )
private
virtual void casacore::FitsInput::errmsg ( FitsErrs  ,
const char *   
)
privatevirtual

set error message that belongs to one of the enumerated types

Implements casacore::FitsIO.

bool casacore::FitsInput::get_data_type ( FITS::ValueType )
private
BlockInput& casacore::FitsInput::getfin ( )
inline

Definition at line 190 of file fitsio.h.

References m_fin.

int casacore::FitsInput::getnumhdu ( ) const
inline

the number of hdu in this fits file

Definition at line 193 of file fitsio.h.

References m_thdunum.

void casacore::FitsInput::init ( )
private
Vector<String> casacore::FitsInput::kwlist_str ( Bool  length80 = False)

get hdu header image cards as strings.

By default the strings will be of variable length. You can optionally ask for them to be length 80 (padded with spaces).

BlockInput& casacore::FitsInput::make_input ( const char *  ,
const FITS::FitsDevice ,
int  ,
FITSErrorHandler  errhandler = FITSError::defaultHandler 
)
private
int casacore::FitsInput::process_header ( FITS::HDUType  ,
FitsKeywordList  
)
private

Special interface to class HeaderDataUnit.

special way to process header

int casacore::FitsInput::read ( FITS::HDUType  ,
char *  ,
int   
)
private

read N bytes into address

OFF_T casacore::FitsInput::read_all ( FITS::HDUType  ,
char *   
)
private

read all data into a given address - all responsibility is given to the user

void casacore::FitsInput::read_header_rec ( )
private
char* casacore::FitsInput::read_sp ( )

int skip_hdu2(); read special or unrecognizable records

int casacore::FitsInput::recno ( ) const
inline

number of logical records read/written

Definition at line 189 of file fitsio.h.

References m_fin, and casacore::BlockIO::recno().

int casacore::FitsInput::skip ( FITS::HDUType  ,
OFF_T   
)
private

skip N bytes

void casacore::FitsInput::skip_all ( FITS::HDUType  )

skip all remaining data

int casacore::FitsInput::skip_hdu ( )

Friends And Related Function Documentation

OFF_T HeaderDataUnit::read_all_data ( char *  )
friend
int HeaderDataUnit::read_data ( char *  ,
Int   
)
friend
int HeaderDataUnit::skip ( uInt  )
friend
int HeaderDataUnit::skip ( )
friend

Member Data Documentation

BlockInput& casacore::FitsInput::m_fin
private

Definition at line 196 of file fitsio.h.

Referenced by blockno(), getfin(), and recno().

Bool casacore::FitsInput::m_got_rec
private

flag used for read control in errors

Definition at line 201 of file fitsio.h.

int casacore::FitsInput::m_thdunum
private

total number of hdu in this fits file

Definition at line 203 of file fitsio.h.

Referenced by getnumhdu().


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