29 #ifndef FITS_FITSTABLE_H
30 #define FITS_FITSTABLE_H
33 #include <casacore/casa/aips.h>
34 #include <casacore/casa/Arrays/ArrayFwd.h>
35 #include <casacore/casa/Containers/Record.h>
36 #include <casacore/tables/Tables/TableRecord.h>
37 #include <casacore/casa/Containers/Block.h>
38 #include <casacore/fits/FITS/hdu.h>
39 #include <casacore/fits/FITS/fitsio.h>
40 #include <casacore/casa/iosfwd.h>
45 class FITSFieldCopier;
379 const Record &extraKeywords,
457 const Record &extraKeywords,
Int nrows() const
return basic elements of a table
Simplified interface to create and write to FITS random groups.
void write()
Write the current group (row()).
FITSGroupWriter(const FITSGroupWriter &)
FITSGroupWriter & operator=(const FITSGroupWriter &)
PrimaryGroup< Float > * group_p
FITSGroupWriter(const String &fileName, const RecordDesc &description, uInt nrows, const Record &extraKeywords, Bool freeOutput=True)
Since this must always be the first HDU, there is no point in constructing it with a FitsOutput.
RecordInterface & row()
Set the values for the current group.
void check_error(const char *extra_info=0)
Checks error status of writer_p and group_p.
FITSGroupWriter()
Undefined and inaccessible.
FitsOutput * writer()
Don't delete this out from under us!
Simplified interface to create and write to a FITS Binary Table.
void write()
Write the current row()
FITSTableWriter(FitsOutput *file, const RecordDesc &description, const Record &maxLengths, uInt nrows, const Record &extraKeywords, const Record &units, Bool freeOutput=True, const Record &variableShapes=Record())
You MUST have already written a first HDU to FitsOutput.
static FitsOutput * makeWriter(const String &fileName)
Returns a writer, with the first HDU filled in (set to null).
PtrBlock< FITSFieldCopier * > copiers_p
FITSTableWriter()
Undefined and inaccessible.
RecordInterface & row()
use this to set the value of the current row to be written
FITSTableWriter & operator=(const FITSTableWriter &)
FitsOutput * writer()
Don't delete this out from under us!
FITSTableWriter(const FITSTableWriter &)
BinaryTableExtension * bintable_p
Attach a FITSTabular to a binary or ASCII table.
TableRecord primaryKeys_p
Block< void * > row_fields_p
virtual void move(Int torow)
and it should be possible to move to a desired row the rownr() member can be used to verify that a mo...
virtual Bool pastEnd() const
Returns True if we have advanced past the end of data.
VADescFitsField * va_p
I had trouble making a Block<VADescFitsField>
void reopenAtFirstHDU(const String &name)
It is necessary to read the PDA to get the primary keywords.
BinaryTableExtension * raw_table_p
FITSTable & operator=(const FITSTable &)
virtual const Record & nulls() const
Returns any TNULLnnn associated with a column (the field names are the column names,...
virtual const TableRecord & keywords() const
Returns keywords which are associated with the underlying FITS files.
virtual Bool reopen(const String &fileName)
Attach this FITSTable to a new file name, same HDU# as at open time.
virtual void next()
Advance the row if possible (guaranteed harmless if pastEnd() is True.
virtual Bool eof() const
Has the end of file been reached yet.
virtual Int rownr() const
these tables should also know where they are
FITSTable(uInt whichHDU=1, Bool allKeywords=False)
this creates an invalid (isValid() return False) FITSTable Its primary purpose is so that FITSTables ...
virtual const Record & displayFormats() const
Returns any TDISPnnn associated with a column (the field names are the column names,...
virtual const String & name() const
return the name
FITSTable(const FITSTable &)
Undefined and inaccessible.
Bool virtualColumns(const Vector< String > &keyNames)
SDFITSTable needs to make some keywords appear as columns, this requires access to description_p,...
virtual const TableRecord & primaryKeywords() const
the keywords from the Primary HDU
virtual const Record & currentRow() const
Return the currentRow.
Block< Int > field_types_p
virtual const Record & units() const
Returns any TUNITnnn associated with a column (the field names are the column names,...
virtual Bool isValid() const
isValid() returns False if this object isn't a valid Tabular data structure.
FITSTable(const String &fileName, uInt whichHDU=1, Bool allKeywords=False)
0-relative HDU.
uInt nfields_p
One per field in row_p, of the right type.
virtual const RecordDesc & description() const
Returns the description of the underlying FITS table.
virtual uInt nrow() const
single FITS tables know how many rows there are unlike general FITSTabulars, which may not know (e....
Block< Int > vatypes_p
these are used by VADESC columns
virtual const Record & currentRow() const =0
Return the currentRow.
virtual Bool hasChanged() const
Has the description changed since construction, default is False.
virtual Bool pastEnd() const =0
Returns True if we have advanced past the end of data.
virtual const Record & units() const =0
Returns any TUNITnnn associated with a column (the field names are the column names,...
static Record displayFormatsFromHDU(BinaryTableExtension &hdu)
Helper function for retrieving the TDISPnnn from a native-FITS hdu.
virtual Bool isValid() const =0
isValid() returns False if this object isn't a valid Tabular data structure.
virtual const TableRecord & keywords() const =0
Returns keywords which are associated with the underlying FITS files.
static Record nullsFromHDU(BinaryTableExtension &hdu)
Helper function for retrieving the TNULLnnn from a native-FITS hdu.
static RecordDesc descriptionFromHDU(BinaryTableExtension &hdu)
Helper function for retrieving a description from a native-FITS hdu.
virtual const Record & displayFormats() const =0
Returns any TDISPnnn associated with a column (the field names are the column names,...
virtual const Record & nulls() const =0
Returns any TNULLnnn associated with a column (the field names are the column names,...
virtual void next()=0
Advance the row if possible (guaranteed harmless if pastEnd() is True.
virtual Bool reopen(const String &)
Reopen the table, default behavior is to do nothing, return False.
static TableRecord keywordsFromHDU(HeaderDataUnit &hdu, Bool allKeywords=False)
Helper function for retrieving keywords from a native-FITS hdu.
virtual const RecordDesc & description() const =0
Returns the description of the underlying FITS table.
virtual void resetChangedFlag()
reset the changed flag, default do nothing
static Record unitsFromHDU(BinaryTableExtension &hdu)
Helper function for retrieving the TUNITnnn from a native-FITS hdu.
static TableDesc tableDesc(const FITSTabular &fitstabular)
Get a TableDesc appropriate to hold a FITSTabular the keywords, description, units,...
static Record subStringShapeFromHDU(BinaryTableExtension &hdu)
Help function for retrieving any shape information from String columns using the SubString convention...
virtual const String & name() const =0
return the name
helper class Note: Note that FitsField does not allocate space for the data; Space is external to Fi...
Bool eof() const
test if end of file has been reached
fixed-length sequential blocked FITS output
A drop-in replacement for Block<T*>.
String: the storage and methods of handling collections of characters.
this file contains all the compiler specific defines
bool Bool
Define the standard types used by Casacore.