Loading...
Searching...
No Matches
casacore::FitsOutput Class Reference
fits package (libcasa_fits) » FITS_module

fixed-length sequential blocked FITS output More...

`#include <fitsio.h>`

## Public Member Functions

| FitsOutput (const char *, const FITS::FitsDevice &, int=10, FITSErrorHandler errhandler=FITSError::defaultHandler)
| FitsOutput (FITSErrorHandler errhandler=FITSError::defaultHandler)
| ~FitsOutput ()
void | set_data_info (FitsKeywordList &kwl, FITS::HDUType t, FITS::ValueType dt, OFF_T ds, Int is)
| used by PrimaryArray, BinaryTabelExtention etc to work with the constructor without keyword list.
int | write_sp (char *rec)
| write a special record.
int | hdu_complete ()
| check if the current hdu is done.
BlockOutput & | getfout ()
void | setfptr (fitsfile *ffp)
Bool | required_keys_only ()
Public Member Functions inherited from casacore::FitsIO
virtual | ~FitsIO ()
int | err () const
int | fitsrecsize () const
| record size, in bytes, of a FITS block.
Bool | isafits () const
| is it a valid fits file (SIMPLE==T).
Bool | isextend () const
| see if there may be FITS extensions present (EXTENT==T)
Bool | eof () const
| test if end of file has been reached
FITS::FitsRecType | rectype () const
| the FITS record type
FITS::HDUType | hdutype () const
| Header Data Unit type (e.g.
FITS::ValueType | datatype () const
OFF_T | datasize () const
| return the datasize of the current HDU.
Int | itemsize () const
| data characteristics
OFF_T | currsize () const
| for input, size of remaining data for output, size of data written
FitsKeyCardTranslator & | getkc ()
| get FitsKeyCardTranslator
fitsfile * | getfptr () const
| get the fitsfile pointer
OFF_T | getskipsize () const
| get the size of the last skipped HDU

## Private Member Functions

BlockOutput & | make_output (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
int | hdu_inprogress ()
int | write_hdr (FitsKeywordList &, FITS::HDUType, FITS::ValueType, OFF_T, Int)
| Special interface to class HeaderDataUnit.
int | write_all (FITS::HDUType, char *, char)
| write all data from address
int | write (FITS::HDUType, char *, Int, char)
| write N bytes from address

## Private Attributes

BlockOutput & | m_fout
Bool | m_required_keys_only

## Friends

int | HeaderDataUnit::write_hdr (FitsOutput &)
int | HeaderDataUnit::write_all_data (FitsOutput &, char *)
int | HeaderDataUnit::write_data (FitsOutput &, char *, Int)

## 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;
OFF_T | m_curr_size
| for input, size of remaining data for output, size of data written uInt m_curr_size;
OFF_T | m_skipHDU_size
| for size of the last HDU skipped

## Detailed Description

fixed-length sequential blocked FITS output

Definition at line 226 of file fitsio.h.

## Constructor & Destructor Documentation

## FitsOutput() [1/2]

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

References casacore::FITSError::defaultHandler().

Referenced by HeaderDataUnit::write_all_data, HeaderDataUnit::write_data, and HeaderDataUnit::write_hdr.

## FitsOutput() [2/2]

casacore::FitsOutput::FitsOutput | ( | FITSErrorHandler | errhandler = FITSError::defaultHandler | ) |

References casacore::FITSError::defaultHandler().

## ~FitsOutput()

casacore::FitsOutput::~FitsOutput | ( |  | ) |

## Member Function Documentation

## errmsg()

virtual void casacore::FitsOutput::errmsg | ( | FitsErrs | ,
|  | const char * | )

private virtual

set error message that belongs to one of the enumerated types

Implements casacore::FitsIO.

## getfout()

BlockOutput & casacore::FitsOutput::getfout | ( |  | ) |

inline

Definition at line 247 of file fitsio.h.

References m_fout.

## hdu_complete()

int casacore::FitsOutput::hdu_complete | ( |  | ) |

inline

check if the current hdu is done.

It was private.

Definition at line 244 of file fitsio.h.

References casacore::FITS::HDURecord, casacore::FitsIO::m_data_size, and casacore::FitsIO::m_rec_type.

## hdu_inprogress()

int casacore::FitsOutput::hdu_inprogress | ( |  | ) |

inline private

Definition at line 259 of file fitsio.h.

References casacore::FITS::HDURecord, casacore::FitsIO::m_curr_size, casacore::FitsIO::m_data_size, and casacore::FitsIO::m_rec_type.

## make_output()

BlockOutput & casacore::FitsOutput::make_output | ( | const char * | ,
|  | const FITS::FitsDevice & | ,
|  | int | ,
|  | FITSErrorHandler | errhandler = FITSError::defaultHandler )

private

References casacore::FITSError::defaultHandler().

## required_keys_only()

Bool casacore::FitsOutput::required_keys_only | ( |  | ) |

inline

Definition at line 249 of file fitsio.h.

References m_required_keys_only.

## set_data_info()

void casacore::FitsOutput::set_data_info | ( | FitsKeywordList & | kwl,
|  | FITS::HDUType | t,
|  | FITS::ValueType | dt,
|  | OFF_T | ds,
|  | Int | is )

used by PrimaryArray, BinaryTabelExtention etc to work with the constructor without keyword list.

## setfptr()

void casacore::FitsOutput::setfptr | ( | fitsfile * | ffp | ) |

## write()

int casacore::FitsOutput::write | ( | FITS::HDUType | ,
|  | char * | ,
|  | Int | ,
|  | char | )

private

write N bytes from address

## write_all()

int casacore::FitsOutput::write_all | ( | FITS::HDUType | ,
|  | char * | ,
|  | char | )

private

write all data from address

## write_hdr()

int casacore::FitsOutput::write_hdr | ( | FitsKeywordList & | ,
|  | FITS::HDUType | ,
|  | FITS::ValueType | ,
|  | OFF_T | ,
|  | Int | )

private

Special interface to class HeaderDataUnit.

## write_sp()

int casacore::FitsOutput::write_sp | ( | char * | rec | ) |

write a special record.

For this the record type must also be to set to FITS::SpecialRecord

## Friends And Related Symbol Documentation

## HeaderDataUnit::write_all_data

int HeaderDataUnit::write_all_data | ( | FitsOutput & | ,
|  | char * | )

friend

References FitsOutput().

## HeaderDataUnit::write_data

int HeaderDataUnit::write_data | ( | FitsOutput & | ,
|  | char * | ,
|  | Int | )

friend

References FitsOutput().

## HeaderDataUnit::write_hdr

int HeaderDataUnit::write_hdr | ( | FitsOutput & |  | ) |

friend

References FitsOutput().

## Member Data Documentation

## m_fout

BlockOutput& casacore::FitsOutput::m_fout

private

Definition at line 252 of file fitsio.h.

Referenced by getfout().

## m_required_keys_only

Bool casacore::FitsOutput::m_required_keys_only

private

Definition at line 253 of file fitsio.h.

Referenced by required_keys_only().

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

- fits/FITS/fitsio.h