26#ifndef FITS_FITSTABLE_H
27#define FITS_FITSTABLE_H
30#include <casacore/casa/aips.h>
31#include <casacore/casa/Arrays/ArrayFwd.h>
32#include <casacore/casa/Containers/Record.h>
33#include <casacore/tables/Tables/TableRecord.h>
34#include <casacore/casa/Containers/Block.h>
35#include <casacore/fits/FITS/hdu.h>
36#include <casacore/fits/FITS/fitsio.h>
37#include <casacore/casa/iosfwd.h>
376 const Record &extraKeywords,
454 const Record &extraKeywords,
Int nrows() const
return basic elements of a table
Simplified interface to create and write to FITS random groups.
RecordInterface & row()
Set the values for the current group.
void write()
Write the current group (row()).
FITSGroupWriter(const FITSGroupWriter &)
PrimaryGroup< Float > * group_p
FitsOutput * writer()
Don't delete this out from under us!
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.
FITSGroupWriter & operator=(const FITSGroupWriter &)
void check_error(const char *extra_info=0)
Checks error status of writer_p and group_p.
FITSGroupWriter()
Undefined and inaccessible.
Simplified interface to create and write to a FITS Binary Table.
RecordInterface & row()
use this to set the value of the current row to be written
void write()
Write the current row()
FITSTableWriter & operator=(const FITSTableWriter &)
static FitsOutput * makeWriter(const String &fileName)
Returns a writer, with the first HDU filled in (set to null).
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.
PtrBlock< FITSFieldCopier * > copiers_p
FitsOutput * writer()
Don't delete this out from under us!
FITSTableWriter()
Undefined and inaccessible.
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
virtual const Record & currentRow() const
Return the currentRow.
virtual Bool reopen(const String &fileName)
Attach this FITSTable to a new file name, same HDU# as at open time.
virtual const RecordDesc & description() const
Returns the description of the underlying FITS table.
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 ...
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 & keywords() const
Returns keywords which are associated with the underlying FITS files.
Block< Int > field_types_p
virtual const TableRecord & primaryKeywords() const
the keywords from the Primary HDU
virtual const String & name() const
return the name
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.
virtual const Record & nulls() const
Returns any TNULLnnn associated with a column (the field names are the column names,...
FITSTable & operator=(const FITSTable &)
virtual const Record & units() const
Returns any TUNITnnn associated with a column (the field names are the column names,...
uInt nfields_p
One per field in row_p, of the right type.
virtual const Record & displayFormats() const
Returns any TDISPnnn associated with a column (the field names are the column names,...
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 Bool hasChanged() const
Has the description changed since construction, default is False.
virtual const Record & currentRow() const =0
Return the currentRow.
virtual Bool pastEnd() const =0
Returns True if we have advanced past the end of data.
virtual const TableRecord & keywords() const =0
Returns keywords which are associated with the underlying FITS files.
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 Record & nulls() const =0
Returns any TNULLnnn associated with a column (the field names are the column names,...
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 RecordDesc & description() const =0
Returns the description of the underlying FITS table.
virtual const String & name() const =0
return the name
virtual const Record & units() const =0
Returns any TUNITnnn 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 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 Record & displayFormats() const =0
Returns any TDISPnnn associated with a column (the field names are the column names,...
Bool eof() const
test if end of file has been reached
fixed-length sequential blocked FITS output
Random Group datastructure.
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
FitsField< FitsVADesc > VADescFitsField
bool Bool
Define the standard types used by Casacore.