casacore
|
Virtual column engine to return derived MS values. More...
#include <DerivedMSCal.h>
Public Member Functions | |
DerivedMSCal () | |
Create the data manager. More... | |
DerivedMSCal (const Record &spec) | |
Create a Lofar storage manager with the given name. More... | |
~DerivedMSCal () | |
virtual DataManager * | clone () const |
Clone this object. More... | |
virtual void | prepare () |
Prepare the object. More... | |
virtual String | dataManagerType () const |
Get the type name of the data manager (i.e. More... | |
virtual Record | dataManagerSpec () const |
Record a record containing data manager specifications. More... | |
virtual Bool | canAddColumn () const |
Columns can be added. More... | |
virtual Bool | canRemoveColumn () const |
Columns can be removed. More... | |
Public Member Functions inherited from casacore::VirtualColumnEngine | |
VirtualColumnEngine () | |
Create the object. More... | |
virtual | ~VirtualColumnEngine () |
Public Member Functions inherited from casacore::DataManager | |
DataManager () | |
Default constructor. More... | |
virtual | ~DataManager () |
virtual String | dataManagerName () const |
Return the name of the data manager. More... | |
void | dataManagerInfo (Record &info) const |
Add SEQNR and SPEC (the DataManagerSpec subrecord) to the info. More... | |
virtual Record | getProperties () const |
Get data manager properties that can be modified. More... | |
virtual void | setProperties (const Record &spec) |
Modify data manager properties given in record fields. More... | |
virtual Bool | canReallocateColumns () const |
Tell if the data manager wants to reallocate the data manager column objects. More... | |
virtual DataManagerColumn * | reallocateColumn (DataManagerColumn *column) |
Reallocate the column object if it is part of this data manager. More... | |
uInt | sequenceNr () const |
Get the (unique) sequence nr of this data manager. More... | |
uInt | ncolumn () const |
Get the nr of columns in this data manager (can be zero). More... | |
Bool | asBigEndian () const |
Have the data to be stored in big or little endian canonical format? More... | |
const TSMOption & | tsmOption () const |
Get the TSM option. More... | |
MultiFileBase * | multiFile () |
Get the MultiFile pointer (can be 0). More... | |
String | keywordName (const String &keyword) const |
Compose a keyword name from the given keyword appended with the sequence number (e.g. More... | |
String | fileName () const |
Compose a unique filename from the table name and sequence number. More... | |
ByteIO::OpenOption | fileOption () const |
Get the AipsIO option of the underlying file. More... | |
virtual Bool | isRegular () const |
Is this a regular storage manager? It is regular if it allows addition of rows and writing data in them. More... | |
Table & | table () const |
Get the table this object is associated with. More... | |
virtual void | reopenRW () |
Reopen the data manager for read/write access. More... | |
virtual Bool | canRenameColumn () const |
Does the data manager allow to rename columns? (default yes) More... | |
virtual void | setMaximumCacheSize (uInt nMiB) |
Set the maximum cache size (in bytes) to be used by a storage manager. More... | |
virtual void | showCacheStatistics (std::ostream &) const |
Show the data manager's IO statistics. More... | |
DataManagerColumn * | createScalarColumn (const String &columnName, int dataType, const String &dataTypeId) |
Create a column in the data manager on behalf of a table column. More... | |
DataManagerColumn * | createDirArrColumn (const String &columnName, int dataType, const String &dataTypeId) |
Create a direct array column. More... | |
DataManagerColumn * | createIndArrColumn (const String &columnName, int dataType, const String &dataTypeId) |
Create an indirect array column. More... | |
DataManager * | getClone () const |
Has the object already been cloned? More... | |
void | setClone (DataManager *clone) const |
Set the pointer to the clone. More... | |
Static Public Member Functions | |
static DataManager * | makeObject (const String &dataManName, const Record &spec) |
Make the object from the type name string. More... | |
static void | registerClass () |
Register the class name and the static makeObject "constructor". More... | |
Static Public Member Functions inherited from casacore::DataManager | |
static void | registerCtor (const String &type, DataManagerCtor func) |
Register a mapping of a data manager type to its static construction function. More... | |
static DataManagerCtor | getCtor (const String &dataManagerType) |
Get the "constructor" of a data manager (thread-safe). More... | |
static Bool | isRegistered (const String &dataManagerType) |
Test if a data manager is registered (thread-safe). More... | |
static DataManager * | unknownDataManager (const String &dataManagerType, const Record &spec) |
Serve as default function for theirRegisterMap, which catches all unknown data manager types. More... | |
Private Member Functions | |
DerivedMSCal (const DerivedMSCal &that) | |
Copy constructor cannot be used. More... | |
DerivedMSCal & | operator= (const DerivedMSCal &that) |
Assignment cannot be used. More... | |
virtual void | addColumn (DataManagerColumn *) |
Do the final addition of a column. More... | |
virtual void | removeColumn (DataManagerColumn *) |
Remove a column from the data file. More... | |
virtual DataManagerColumn * | makeScalarColumn (const String &aName, int aDataType, const String &aDataTypeID) |
Create a column in the storage manager on behalf of a table column. More... | |
virtual DataManagerColumn * | makeIndArrColumn (const String &aName, int aDataType, const String &aDataTypeID) |
Create an indirect array column. More... | |
Private Attributes | |
MSCalEngine | itsEngine |
vector< DataManagerColumn * > | itsColumns |
Additional Inherited Members | |
Static Public Attributes inherited from casacore::DataManager | |
static rownr_t | MAXROWNR32 |
Define the highest row number that can be represented as signed 32-bit. More... | |
Protected Member Functions inherited from casacore::DataManager | |
void | decrementNcolumn () |
Decrement number of columns (in case a column is deleted). More... | |
void | setEndian (Bool bigEndian) |
Tell the data manager if big or little endian format is needed. More... | |
void | setTsmOption (const TSMOption &tsmOption) |
Tell the data manager which TSM option to use. More... | |
void | setMultiFile (MultiFileBase *mfile) |
Tell the data manager that MultiFile can be used. More... | |
virtual Bool | hasMultiFileSupport () const |
Does the data manager support use of MultiFile? A derived class has to return True if it can use the MultiFile. More... | |
void | throwDataTypeOther (const String &columnName, int dataType) const |
Throw an exception in case data type is TpOther, because the storage managers (and maybe other data managers) do not support such columns. More... | |
Virtual column engine to return derived MS values.
Public interface
DerivedMSCal makes it possible to have virtual columns for the derived MeasurementSet values hourangle, parallactic angle, azimuth/elevation, and local sidereal time. In this way such derived values appear to be ordinary columns with the exception that no values can be put into them.
The following columns can be defined:
All columns have data type double and unit radian (except UVW). The HADEC, AZEL, ITRF and UVW columns are array columnns while the others are scalar columns.
This engine is meant for a MeasurementSet, but can be used for any table containing an ANTENNA and FIELD subtable and the relevant columns in the main table (ANTENNA1 and/or ANTENNA2, FIELD_ID, and TIME).
In principle the array center is the Observatory position, which is taken from the Measures Observatory table using the telescope name found in the OBSERVATION subtable. However, if the subtable is not defined or empty or if the telescope name is unknown, the position of the first antenna is used as the array position.
The engine can also be used for a CASA Calibration Table. It understands how it references the MeasurementSets. Because calibration tables contain no ANTENNA2 columns, columns XX2 are the same as XX1.
It makes it possible to use generic table software (like querying, plotting, tablebrowser) on these values.
The following example shows how to add such columns to an MS and use them thereafter.
Definition at line 133 of file DerivedMSCal.h.
casacore::DerivedMSCal::DerivedMSCal | ( | ) |
Create the data manager.
|
explicit |
Create a Lofar storage manager with the given name.
The specifications are part of the record (as created by dataManagerSpec).
casacore::DerivedMSCal::~DerivedMSCal | ( | ) |
|
private |
Copy constructor cannot be used.
|
privatevirtual |
|
virtual |
Columns can be added.
Reimplemented from casacore::DataManager.
|
virtual |
Columns can be removed.
Reimplemented from casacore::DataManager.
|
virtual |
Clone this object.
Implements casacore::DataManager.
|
virtual |
Record a record containing data manager specifications.
Reimplemented from casacore::DataManager.
|
virtual |
|
privatevirtual |
Create an indirect array column.
Reimplemented from casacore::VirtualColumnEngine.
|
static |
Make the object from the type name string.
This function gets registered in the DataManager "constructor" map. The caller has to delete the object. The dataManName is not used.
|
privatevirtual |
Create a column in the storage manager on behalf of a table column.
The caller has to delete the newly created object.
Create a scalar column.
Reimplemented from casacore::VirtualColumnEngine.
|
private |
Assignment cannot be used.
|
virtual |
Prepare the object.
It sets the Table object in the engine.
Reimplemented from casacore::VirtualColumnEngine.
|
static |
Register the class name and the static makeObject "constructor".
This will make the engine known to the table system.
|
privatevirtual |
|
private |
Definition at line 204 of file DerivedMSCal.h.
|
private |
Definition at line 203 of file DerivedMSCal.h.