- OK
- IOERR
- MISSKEY
- BADBEGIN
- EMPTYFILE
- NOPRIMARY
- BADOPER
- BADEOF
- MEMERR
- BADBITPIX
- NOAXISN
- NOPCOUNT
- NOGCOUNT
- BADPCOUNT
- BADGCOUNT
- NOGROUPS
- BADNAXIS
- BADPRIMARY
- BADSIZE
- HDUERR
error return code. Should be one of an
enumerated type:
record size, in bytes, of a FITS block.
Normally set at 2880, unless some form of blocking was used.
is it a valid fits file (SIMPLE==T). If not, the only
safest operation is to skip the data portion of the
current HeaderDataUnit
see if there may be FITS extensions present (EXTENT==T)
test if end of file has been reached
the FITS record type
Header Data Unit type (e.g.
return the datasize of the current HDU. This excludes
the trailing end of the blocked data portion.
data characteristics
for input, size of remaining data
for output, size of data written
set error message that belongs to one of the enumerated types
number of physical blocks read/written
number of logical records read/written
Special interface to class HeaderDataUnit
special way to process header
Special interface to class HeaderDataUnit
read all data into a given address - all responsibility is given
to the user
Special interface to class HeaderDataUnit
read N bytes into address
Special interface to class HeaderDataUnit
skip N bytes
Special interface to class HeaderDataUnit
skip all remaining data
write a special record. For this the record type must also
be to set to FITS::SpecialRecord
Special interface to class HeaderDataUnit
write all data from address
Special interface to class HeaderDataUnit
write N bytes from address
Special interface to class HeaderDataUnit
Synopsis
FitsIO is a base class that handles all the sequential blocked
FITS I/O. Special derived classes do the input and output.
No interpretation of the data is attempted here, there are
special FITS classes that handle syntax and interpretation.
Example
FitsInput fin("myfile.fits",FITS::Disk); // open disk file for FITS input
if (fin.err() == FitsIO::IOERR) { // check if open succeeded
cout << "Could not open FITS input\n";
exit(0);
}
if (fin.rectype() == FITS::HDURecord && // test for primary array
fin.hdutype() == FITS::PrimaryArrayHDU) {
}
Member Description
virtual ~FitsIO()
enum FitsErrs
int err() const
enum FitsErrs { OK, IOERR, MISSKEY, BADBEGIN, EMPTYFILE,
NOPRIMARY, BADOPER, BADEOF, MEMERR, BADBITPIX, NOAXISN,
NOPCOUNT, NOGCOUNT, BADPCOUNT, BADGCOUNT, NOGROUPS,
BADNAXIS, BADPRIMARY, BADSIZE, HDUERR };
int fitsrecsize() const
Bool isafits() const
Bool isextend() const
Bool eof() const
FITS::FitsRecType rectype() const
FITS::HDUType hdutype() const
FITS::ValueType datatype() const
uInt datasize() const
Int itemsize() const
uInt currsize() const
FitsIO(FITSErrorHandler)
virtual void errmsg(FitsErrs, char *) = 0
class FitsInput : public FitsIO
Interface
Description
Member Description
friend int HeaderDataUnit::get_hdr(HeaderDataUnit::HDUType, FitsKeywordList &)
friend int HeaderDataUnit::read_all_data(char *)
friend int HeaderDataUnit::read_data(char *, int)
friend int HeaderDataUnit::skip(int)
friend int HeaderDataUnit::skip()
FitsInput(const char *, const FITS::FitsDevice &, int = 10, FITSErrorHandler errhandler = FITSError::defaultHandler)
FitsInput(FITSErrorHandler errhandler = FITSError::defaultHandler)
~FitsInput()
int skip_hdu()
char *read_sp()
read special or unrecognizable records
int blockno() const
int recno() const
BlockInput &make_input(const char *, const FITS::FitsDevice &, int, FITSErrorHandler errhandler = FITSError::defaultHandler)
virtual void errmsg(FitsErrs, char *)
void init()
void read_header_rec()
int process_header(FITS::HDUType, FitsKeywordList &)
uInt read_all(FITS::HDUType, char *)
int read(FITS::HDUType, char *, int)
int skip(FITS::HDUType, int)
void skip_all(FITS::HDUType)
class FitsOutput : public FitsIO
Interface
Description
Member Description
friend int HeaderDataUnit::write_hdr(FitsOutput &)
friend int HeaderDataUnit::write_all_data(FitsOutput &, char *)
friend int HeaderDataUnit::write_data(FitsOutput &, char *, int)
FitsOutput(const char *, const FITS::FitsDevice &, int = 10, FITSErrorHandler errhandler = FITSError::defaultHandler)
FitsOutput(FITSErrorHandler errhandler = FITSError::defaultHandler)
~FitsOutput()
int write_sp(char *rec)
BlockOutput &make_output(const char *, const FITS::FitsDevice &, int, FITSErrorHandler errhandler = FITSError::defaultHandler)
virtual void errmsg(FitsErrs, char *)
int hdu_complete()
int hdu_inprogress()
int write_all(FITS::HDUType, char *, char)
int write(FITS::HDUType, char *, int, char)
int write_hdr(FitsKeywordList &, FITS::HDUType, FITS::ValueType, Int, Int)
class FitsDiskInput : public BlockInput
Interface
Description
Member Description
FitsDiskInput(const char *, int, int = 1, FITSErrorHandler errhandler = FITSError::defaultHandler)
~FitsDiskInput()
char *skip(int)
implements skip in terms of lseek
class FitsDiskOutput : public BlockOutput
Interface
Description
Member Description
FitsDiskOutput(const char *, int, int = 1, FITSErrorHandler errhandler = FITSError::defaultHandler)
~FitsDiskOutput()
class FitsStdInput : public BlockInput
Interface
Description
Member Description
FitsStdInput(int, FITSErrorHandler errhandler = FITSError::defaultHandler)
~FitsStdInput()
class FitsStdOutput : public BlockOutput
Interface
Description
Member Description
FitsStdOutput(int, FITSErrorHandler errhandler = FITSError::defaultHandler)
~FitsStdOutput()
class FitsTape9Input : public BlockInput
Interface
Description
Member Description
FitsTape9Input(const char *, int, int = 10, FITSErrorHandler errhandler = FITSError::defaultHandler)
~FitsTape9Input()
class FitsTape9Output : public BlockOutput
Interface
Description
Member Description
FitsTape9Output(const char *, int, int = 10, FITSErrorHandler errhandler = FITSError::defaultHandler)
~FitsTape9Output()