Loading...
Searching...
No Matches
casacore::FITSMultiTable Class Reference
FITS_module_internal_classes

More...

`#include <FITSMultiTable.h>`

## Public Member Functions

| 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.
| ~FITSMultiTable ()
virtual Bool | isValid () const
| isValid() returns False if this object isn't a valid Tabular data structure.
virtual const TableRecord & | keywords () const
| Returns keywords which are associated with the underlying FITS files.
virtual const RecordDesc & | description () const
| Returns the description of the underlying FITS table.
virtual const Record & | units () const
| Returns any TUNITnnn associated with a column (the field names are the column names, each field value is the TUNITnnn value for that field).
virtual const Record & | displayFormats () const
| Returns any TDISPnnn associated with a column (the field names are the column names, each field value is the TDISPnnn value for that field).
virtual const Record & | nulls () const
| Returns any TNULLnnn associated with a column (the field names are the column names, each field value is the TNULLnnn value for that field).
virtual const String & | name () const
| return the name
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
| Return the currentRow.
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
Public Member Functions inherited from casacore::FITSTabular
virtual | ~FITSTabular ()
virtual Bool | reopen (const String &)
| Reopen the table, default behavior is to do nothing, return False.

## Static Public Member Functions

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.
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
Static Public Member Functions inherited from casacore::FITSTabular
static TableRecord | keywordsFromHDU (HeaderDataUnit &hdu, Bool allKeywords=False)
| Helper function for retrieving keywords from a native-FITS hdu.
static RecordDesc | descriptionFromHDU (BinaryTableExtension &hdu)
| Helper function for retrieving a description from a native-FITS hdu.
static Record | subStringShapeFromHDU (BinaryTableExtension &hdu)
| Help function for retrieving any shape information from String columns using the SubString convention.
static Record | unitsFromHDU (BinaryTableExtension &hdu)
| Helper function for retrieving the TUNITnnn from a native-FITS hdu.
static Record | displayFormatsFromHDU (BinaryTableExtension &hdu)
| Helper function for retrieving the TDISPnnn from a native-FITS hdu.
static Record | nullsFromHDU (BinaryTableExtension &hdu)
| Helper function for retrieving the TNULLnnn from a native-FITS hdu.
static TableDesc | tableDesc (const FITSTabular &fitstabular)
| Get a TableDesc appropriate to hold a FITSTabular the keywords, description, units, displayFormats, and nulls are all used.

## Private Member Functions

| FITSMultiTable ()
| Undefined and inaccessible.
| FITSMultiTable (const FITSMultiTable &other)
FITSMultiTable & | operator= (const FITSMultiTable &other)
FITSTabular * | defaultMaker (const String &fileName)

## Private Attributes

FITSTabular * | table_p
Vector< String > | file_names_p
uInt | nfiles_p
uInt | which_file_p
Bool | hasChanged_p
Record | row_p

## Detailed Description

View multiple FITS files as a single table

### Intended use:

Internal

### Review Status

Date Reviewed:
  yyyy/mm/dd

### 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

Definition at line 62 of file FITSMultiTable.h.

## Constructor & Destructor Documentation

## FITSMultiTable() [1/3]

casacore::FITSMultiTable::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.

References fileNames().

Referenced by FITSMultiTable(), and operator=().

## ~FITSMultiTable()

casacore::FITSMultiTable::~FITSMultiTable | ( |  | ) |

## FITSMultiTable() [2/3]

casacore::FITSMultiTable::FITSMultiTable | ( |  | ) |

private

Undefined and inaccessible.

## FITSMultiTable() [3/3]

casacore::FITSMultiTable::FITSMultiTable | ( | const FITSMultiTable & | other | ) |

private

References FITSMultiTable().

## Member Function Documentation

## currentRow()

virtual const Record & casacore::FITSMultiTable::currentRow | ( |  | ) | const

virtual

Return the currentRow.

This is guaranteed to be valid so long as only member functions of this base class are called (so you can safely attach RecordFieldPtr objects to it. The result is undefined if pastEnd() is True.

Implements casacore::FITSTabular.

References casacore::Record().

## defaultMaker()

FITSTabular * casacore::FITSMultiTable::defaultMaker | ( | const String & | fileName | ) |

private

## description()

virtual const RecordDesc & casacore::FITSMultiTable::description | ( |  | ) | const

virtual

Returns the description of the underlying FITS table.

Implements casacore::FITSTabular.

## displayFormats()

virtual const Record & casacore::FITSMultiTable::displayFormats | ( |  | ) | const

virtual

Returns any TDISPnnn associated with a column (the field names are the column names, each field value is the TDISPnnn value for that field).

Note that only those columns with a non-empty TDISPnnn have an entry in the displayFormats() Record.

Implements casacore::FITSTabular.

References casacore::Record().

## fileNames()

const Vector< String > & casacore::FITSMultiTable::fileNames | ( |  | ) | const

inline

get the list of file names

Definition at line 90 of file FITSMultiTable.h.

References file_names_p.

Referenced by FITSMultiTable().

## filesInTimeRange()

Vector< String > casacore::FITSMultiTable::filesInTimeRange | ( | const String & | directoryName,
|  | const Time & | startTime,
|  | const Time & | endTime,
|  | Bool | verboseErrors = False,
|  | Bool | verboseStatus = False )

static

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.

References casacore::False.

## hasChanged()

virtual Bool casacore::FITSMultiTable::hasChanged | ( |  | ) | const

inline virtual

Has the descriptor changed from when the file was opened.

Reimplemented from casacore::FITSTabular.

Definition at line 93 of file FITSMultiTable.h.

References hasChanged_p.

## isValid()

virtual Bool casacore::FITSMultiTable::isValid | ( |  | ) | const

virtual

isValid() returns False if this object isn't a valid Tabular data structure.

Implements casacore::FITSTabular.

## keywords()

virtual const TableRecord & casacore::FITSMultiTable::keywords | ( |  | ) | const

virtual

Returns keywords which are associated with the underlying FITS files.

Implements casacore::FITSTabular.

## name()

virtual const String & casacore::FITSMultiTable::name | ( |  | ) | const

inline virtual

return the name

Implements casacore::FITSTabular.

Definition at line 80 of file FITSMultiTable.h.

References table_p.

## next()

virtual void casacore::FITSMultiTable::next | ( |  | ) |

virtual

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

Implements casacore::FITSTabular.

## nulls()

virtual const Record & casacore::FITSMultiTable::nulls | ( |  | ) | const

virtual

Returns any TNULLnnn associated with a column (the field names are the column names, each field value is the TNULLnnn value for that field).

Note that only those columns with a specific entry for TNULLnnn and which have not been promoted to doubles due TSCAL and TZERO values will have an entry in the nulls() Record. The meaning of TNULL is only defined for integer and byte columns. When a column is promoted to a double because of scaling, any TNULL values will be assigned a value of NaN.

Implements casacore::FITSTabular.

References casacore::Record().

## operator=()

FITSMultiTable & casacore::FITSMultiTable::operator= | ( | const FITSMultiTable & | other | ) |

private

References FITSMultiTable().

## pastEnd()

virtual Bool casacore::FITSMultiTable::pastEnd | ( |  | ) | const

virtual

Only returns True when all files are exhausted.

Implements casacore::FITSTabular.

## resetChangedFlag()

void casacore::FITSMultiTable::resetChangedFlag | ( |  | ) |

inline virtual

set hasChanged to False - used after hasChanged has been checked

Reimplemented from casacore::FITSTabular.

Definition at line 96 of file FITSMultiTable.h.

References casacore::False, and hasChanged_p.

## timeFromFile()

Time casacore::FITSMultiTable::timeFromFile | ( | const String & | fileName | ) |

static

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

## units()

virtual const Record & casacore::FITSMultiTable::units | ( |  | ) | const

virtual

Returns any TUNITnnn associated with a column (the field names are the column names, each field value is the TUNITnnn value for that field).

Note that only those columns with a non-empty TUNITnnn have an entry in the units() Record.

Implements casacore::FITSTabular.

References casacore::Record().

## Member Data Documentation

## file_names_p

Vector<String> casacore::FITSMultiTable::file_names_p

private

Definition at line 122 of file FITSMultiTable.h.

Referenced by fileNames().

## hasChanged_p

Bool casacore::FITSMultiTable::hasChanged_p

private

Definition at line 125 of file FITSMultiTable.h.

Referenced by hasChanged(), and resetChangedFlag().

## nfiles_p

uInt casacore::FITSMultiTable::nfiles_p

private

Definition at line 123 of file FITSMultiTable.h.

## row_p

Record casacore::FITSMultiTable::row_p

private

Definition at line 127 of file FITSMultiTable.h.

## table_p

FITSTabular* casacore::FITSMultiTable::table_p

private

Definition at line 120 of file FITSMultiTable.h.

Referenced by name().

## which_file_p

uInt casacore::FITSMultiTable::which_file_p

private

Definition at line 124 of file FITSMultiTable.h.

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

- fits/FITS/FITSMultiTable.h