FITSMultiTable.h

Classes

FITSMultiTable -- View multiple FITS files as a single table (full description)

class FITSMultiTable : public FITSTabular

Interface

Public Members
FITSMultiTable(const Vector<String> &fileNames, FITSTabular* (*tabMaker)(const String &) = 0)
~FITSMultiTable()
virtual Bool isValid() const
virtual const TableRecord &keywords() const
virtual const RecordDesc &description() const
virtual const Record &units() const
virtual const Record &displayFormats() const
virtual const Record &nulls() const
virtual const String &name() const
virtual Bool pastEnd() const
virtual void next()
virtual const Record &currentRow() const
const Vector<String>& fileNames() const
virtual Bool hasChanged() const
void resetChangedFlag()
static Vector<String> filesInTimeRange(const String &directoryName, const Time &startTime, const Time &endTime, Bool verboseErrors = False, Bool verboseStatus = False)
static Time timeFromFile(const String &fileName)
Private Members
FITSMultiTable()
FITSMultiTable(const FITSMultiTable &other)
FITSMultiTable &operator=(const FITSMultiTable &other)
FITSTabular* defaultMaker(const String& fileName)

Description

or

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

Synopsis

A FITSMultiTable is used to view a collection of FITS files on disk as a single Table. That is, when next() is called, when one Table ends the next is reopened until all files are exhausted. The FITS files must all have the same description. Something clever should be done about the keywords.

Example

Motivation

To Do

Member Description

FITSMultiTable(const Vector<String> &fileNames, FITSTabular* (*tabMaker)(const String &) = 0)

The FITS files associated with the fileNames must all have the same description, the second argument is a function to generate the FITSTabular If not specified, a generic FITSTable is assumed. The returned pointer IS controlled by this object.

~FITSMultiTable()

virtual Bool isValid() const

virtual const TableRecord &keywords() const

virtual const RecordDesc &description() const

virtual const Record &units() const

virtual const Record &displayFormats() const

virtual const Record &nulls() const

virtual const String &name() const

virtual Bool pastEnd() const

Only returns True when all files are exhausted.

virtual void next()

When end of data is hit on the current file, the next file is opened automatically.

virtual const Record &currentRow() const

const Vector<String>& fileNames() const

get the list of file names

virtual Bool hasChanged() const

Has the descriptor changed from when the file was opened

void resetChangedFlag()

set hasChanged to False - used after hasChanged has been checked

static Vector<String> filesInTimeRange(const String &directoryName, const Time &startTime, const Time &endTime, Bool verboseErrors = False, Bool verboseStatus = False)

A helper function to generate a list of fileNames. This function returns all the files in "directoryName" which have the form yyyy_mm_dd_hh:mm:ss_*.fits and which are (even partially) in the time range specified by startTime and endTime. It is used to generate a set of file names for use in the FITSMultiTable constructor. If verboseStatus is True, some status messages appear on cout. If verboseErrors is True improperly named files names (not matching the above pattern) are named on cerrt.

static Time timeFromFile(const String &fileName)

return the time as found in the given string using the form given above There are no sanity checks in this subroutine

FITSMultiTable()

Undefined and inaccessible

FITSMultiTable(const FITSMultiTable &other)

FITSMultiTable &operator=(const FITSMultiTable &other)

FITSTabular* defaultMaker(const String& fileName)