casa
$Rev:20696$
|
A class to provide easy read-only access to MSDataDesc columns. More...
#include <MSDataDescColumns.h>
Public Member Functions | |
ROMSDataDescColumns (const MSDataDescription &msDataDesc) | |
Create a columns object that accesses the data in the specified Table. | |
~ROMSDataDescColumns () | |
The destructor does nothing special. | |
const ROScalarColumn< Bool > & | flagRow () const |
Access to required columns. | |
const ROScalarColumn< Int > & | polarizationId () const |
const ROScalarColumn< Int > & | spectralWindowId () const |
const ROScalarColumn< Int > & | lagId () const |
Access to optional columns. | |
uInt | nrow () const |
Convenience function that returns the number of rows in any of the columns. | |
Int | match (uInt spwId, uInt polId, Int tryRow=-1) |
returns the last row that contains the specified entries in the SPECTRAL_WINDOW_ID & POLARIZATION_ID columns. | |
Protected Member Functions | |
ROMSDataDescColumns () | |
void | attach (const MSDataDescription &msDataDesc) |
Private Member Functions | |
ROMSDataDescColumns (const ROMSDataDescColumns &) | |
ROMSDataDescColumns & | operator= (const ROMSDataDescColumns &) |
void | attachOptionalCols (const MSDataDescription &msDataDesc) |
Private Attributes | |
ROScalarColumn< Bool > | flagRow_p |
ROScalarColumn< Int > | polarizationId_p |
ROScalarColumn< Int > | spectralWindowId_p |
ROScalarColumn< Int > | lagId_p |
A class to provide easy read-only access to MSDataDesc columns.
Public interface
ROMSDataDescColumns stands for Read-Only MeasurementSet DataDesc Table columns.
This class provides read-only access to the columns in the MSDataDesc Table. It does the declaration of all the Scalar and ArrayColumns with the correct types, so the application programmer doesn't have to worry about getting those right. There is an access function for every predefined column. Access to non-predefined columns will still have to be done with explicit declarations. See ROMSColumns for an example;
Warning: The Table that is used to construct this class must not be destroyed (or go out of scope) before this class does; Otherwise the scalar and array columns use by this class will be left dangling;
See MSColumns for the motivation.
Definition at line 74 of file MSDataDescColumns.h.
casa::ROMSDataDescColumns::ROMSDataDescColumns | ( | const MSDataDescription & | msDataDesc | ) |
Create a columns object that accesses the data in the specified Table.
The destructor does nothing special.
casa::ROMSDataDescColumns::ROMSDataDescColumns | ( | ) | [protected] |
casa::ROMSDataDescColumns::ROMSDataDescColumns | ( | const ROMSDataDescColumns & | ) | [private] |
void casa::ROMSDataDescColumns::attach | ( | const MSDataDescription & | msDataDesc | ) | [protected] |
void casa::ROMSDataDescColumns::attachOptionalCols | ( | const MSDataDescription & | msDataDesc | ) | [private] |
const ROScalarColumn<Bool>& casa::ROMSDataDescColumns::flagRow | ( | ) | const [inline] |
Access to required columns.
Reimplemented in casa::MSDataDescColumns.
Definition at line 85 of file MSDataDescColumns.h.
References flagRow_p.
const ROScalarColumn<Int>& casa::ROMSDataDescColumns::lagId | ( | ) | const [inline] |
Access to optional columns.
Reimplemented in casa::MSDataDescColumns.
Definition at line 93 of file MSDataDescColumns.h.
References lagId_p.
Int casa::ROMSDataDescColumns::match | ( | uInt | spwId, |
uInt | polId, | ||
Int | tryRow = -1 |
||
) |
returns the last row that contains the specified entries in the SPECTRAL_WINDOW_ID & POLARIZATION_ID columns.
Returns -1 if no match could be found. Flagged rows can never match. If tryRow is non-negative, then that row is tested to see if it matches before any others are tested. Setting tryRow to a positive value greater than the table length will throw an exception (AipsError).
uInt casa::ROMSDataDescColumns::nrow | ( | ) | const [inline] |
Convenience function that returns the number of rows in any of the columns.
Definition at line 97 of file MSDataDescColumns.h.
References flagRow_p.
ROMSDataDescColumns& casa::ROMSDataDescColumns::operator= | ( | const ROMSDataDescColumns & | ) | [private] |
const ROScalarColumn<Int>& casa::ROMSDataDescColumns::polarizationId | ( | ) | const [inline] |
Reimplemented in casa::MSDataDescColumns.
Definition at line 86 of file MSDataDescColumns.h.
References polarizationId_p.
const ROScalarColumn<Int>& casa::ROMSDataDescColumns::spectralWindowId | ( | ) | const [inline] |
Reimplemented in casa::MSDataDescColumns.
Definition at line 87 of file MSDataDescColumns.h.
References spectralWindowId_p.
Reimplemented in casa::MSDataDescColumns.
Definition at line 125 of file MSDataDescColumns.h.
ROScalarColumn<Int> casa::ROMSDataDescColumns::lagId_p [private] |
Reimplemented in casa::MSDataDescColumns.
Definition at line 129 of file MSDataDescColumns.h.
Referenced by lagId().
Reimplemented in casa::MSDataDescColumns.
Definition at line 126 of file MSDataDescColumns.h.
Referenced by polarizationId().
Reimplemented in casa::MSDataDescColumns.
Definition at line 127 of file MSDataDescColumns.h.
Referenced by spectralWindowId().