casacore
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>

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

§ FitsInput() [1/2]

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

§ FitsInput() [2/2]

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

§ ~FitsInput()

casacore::FitsInput::~FitsInput ( )

Member Function Documentation

§ blockno()

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

number of physical blocks read/written

Definition at line 186 of file fitsio.h.

§ current_hdu_type()

bool casacore::FitsInput::current_hdu_type ( FITS::HDUType )
private

§ errmsg()

virtual void casacore::FitsInput::errmsg ( FitsErrs  ,
const char *   
)
privatevirtual

set error message that belongs to one of the enumerated types

Implements casacore::FitsIO.

§ get_data_type()

bool casacore::FitsInput::get_data_type ( FITS::ValueType )
private

§ getfin()

BlockInput& casacore::FitsInput::getfin ( )
inline

Definition at line 190 of file fitsio.h.

§ getnumhdu()

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

the number of hdu in this fits file

Definition at line 193 of file fitsio.h.

§ init()

void casacore::FitsInput::init ( )
private

§ kwlist_str()

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).

§ make_input()

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

§ process_header()

int casacore::FitsInput::process_header ( FITS::HDUType  ,
FitsKeywordList  
)
private

Special interface to class HeaderDataUnit.

special way to process header

§ read()

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

read N bytes into address

§ read_all()

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

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

§ read_header_rec()

void casacore::FitsInput::read_header_rec ( )
private

§ read_sp()

char* casacore::FitsInput::read_sp ( )

int skip_hdu2(); read special or unrecognizable records

§ recno()

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

number of logical records read/written

Definition at line 189 of file fitsio.h.

§ skip()

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

skip N bytes

§ skip_all()

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

skip all remaining data

§ skip_hdu()

int casacore::FitsInput::skip_hdu ( )

Friends And Related Function Documentation

§ HeaderDataUnit::get_hdr

§ HeaderDataUnit::read_all_data

OFF_T HeaderDataUnit::read_all_data ( char *  )
friend

§ HeaderDataUnit::read_data

int HeaderDataUnit::read_data ( char *  ,
Int   
)
friend

§ HeaderDataUnit::skip [1/2]

int HeaderDataUnit::skip ( uInt  )
friend

§ HeaderDataUnit::skip [2/2]

int HeaderDataUnit::skip ( )
friend

Member Data Documentation

§ m_fin

BlockInput& casacore::FitsInput::m_fin
private

Definition at line 196 of file fitsio.h.

§ m_got_rec

Bool casacore::FitsInput::m_got_rec
private

flag used for read control in errors

Definition at line 201 of file fitsio.h.

§ m_thdunum

int casacore::FitsInput::m_thdunum
private

total number of hdu in this fits file

Definition at line 203 of file fitsio.h.


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