casacore
|
Table type, subtype and further info. More...
#include <TableInfo.h>
Public Types | |
enum | Type { PAGEDIMAGE, PAGEDARRAY, MEASUREMENTSET, ANTENNA, ARRAY, FEED, FIELD, OBSERVATION, OBSLOG, SOURCE, SPECTRALWINDOW, SYSCAL, WEATHER, ME_CALIBRATION, LOG, COMPONENTLIST } |
enum for various standard Table types. More... | |
Public Member Functions | |
TableInfo () | |
Create an empty object. More... | |
TableInfo (const String &fileName) | |
Create the object reading it from the given file name. More... | |
TableInfo (Type which) | |
Create a TableInfo object of one of the predefined types. More... | |
TableInfo (const TableInfo &that) | |
Copy constructor (copy semantics). More... | |
TableInfo & | operator= (const TableInfo &that) |
Assignment (copy semantics). More... | |
~TableInfo () | |
const String & | type () const |
Get the table (sub)type. More... | |
const String & | subType () const |
const String & | readme () const |
Get the readme. More... | |
void | setType (const String &type) |
Set the table (sub)type. More... | |
void | setSubType (const String &subType) |
void | readmeClear () |
Clear the readme. More... | |
void | readmeAddLine (const String &readmeLine) |
Add a line to the readme. More... | |
void | flush (const String &fileName) |
Write the TableInfo object. More... | |
Static Public Member Functions | |
static String | type (Type tableType) |
Convert the Type enumerator to a type and subType string. More... | |
static String | subType (Type tableType) |
Private Attributes | |
String | type_p |
String | subType_p |
String | readme_p |
Bool | writeIt_p |
Table type, subtype and further info.
Internal
TableInfo holds information (like type) about a table.
TableInfo holds information about a table. It contains the following information:
This information is stored in the file table.info
in the table directory. Regular tables as well as reference tables (results of sort/select) have their own table.info file.
The initial table-info of a regular table is blank. It has to be set explicitly by the user.
The initial table-info of a reference table is a copy of the table-info of its parent table. The user can add lines to the readme information to describe the table in more detail. Of course, the type and/or subtype can be changed at will.
The type and subtype information are stored at the beginning of the first two lines of the file as:
These lines in the table.info file can be used by external programs (like the filebrowser) to determine the type of table being handled.
The third line in the file is blank. The line(s) thereafter contain the possible readme information (note that multiple readme lines are possible). They can be added using the function readmeAddLine
.
Existing tables do not have a table.info file yet. The table system will handle them correctly and use a blank type, subtype and readme string. A table.info file will be created when the table is opened for update.
To be sure that different table types have unique names, it can be useful to use enum's and to define them in one common file. For Casacore tables this enum is defined in this file.
External programs need to be able to determine the type of a table.
Definition at line 130 of file TableInfo.h.
enum for various standard Table types.
Underscores in the enumerator indicate different sub-types
Enumerator | |
---|---|
PAGEDIMAGE |
a PagedImage is a PagedArray with coordinates and Masking (opt.) |
PAGEDARRAY |
a PagedArray (.../Lattices/PagedArray.h) |
MEASUREMENTSET |
MeasurementSet main Table. |
ANTENNA |
MeasurementSet Antenna table. |
ARRAY |
MeasurementSet Array table. |
FEED |
MeasurementSet Feed characteristics table. |
FIELD |
MeasurementSet Field table. |
OBSERVATION |
MeasurementSet Observation information table. |
OBSLOG |
MeasurementSet Oserving Log table. |
SOURCE |
MeasurementSet Source table. |
SPECTRALWINDOW |
MeasurementSet Spectral Window table. |
SYSCAL |
MeasurementSet System Calibration table. |
WEATHER |
MeasurementSet Weather table. |
ME_CALIBRATION |
Measurement Equation Calibration table. |
LOG |
Casacore Log table. |
COMPONENTLIST |
A ComponentList table contains parameterised representations of the sky brightness. |
Definition at line 135 of file TableInfo.h.
casacore::TableInfo::TableInfo | ( | ) |
Create an empty object.
|
explicit |
Create the object reading it from the given file name.
If the file does not exist, type, subtype and readme are initialized to a blank string.
casacore::TableInfo::TableInfo | ( | Type | which | ) |
casacore::TableInfo::TableInfo | ( | const TableInfo & | that | ) |
Copy constructor (copy semantics).
casacore::TableInfo::~TableInfo | ( | ) |
|
inline |
void casacore::TableInfo::readmeAddLine | ( | const String & | readmeLine | ) |
Add a line to the readme.
It will itself add a newline character ('
') to the end of the line.
void casacore::TableInfo::readmeClear | ( | ) |
Clear the readme.
void casacore::TableInfo::setSubType | ( | const String & | subType | ) |
void casacore::TableInfo::setType | ( | const String & | type | ) |
Set the table (sub)type.
|
inline |
Definition at line 233 of file TableInfo.h.
References subType_p.
|
inline |
Convert the Type enumerator to a type and subType string.
|
private |
Definition at line 223 of file TableInfo.h.
Referenced by readme().
|
private |
Definition at line 222 of file TableInfo.h.
Referenced by subType().
|
private |
Definition at line 221 of file TableInfo.h.
Referenced by type().
|
private |
Definition at line 224 of file TableInfo.h.