casacore
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
casacore::MSDataDescColumns Class Reference

More...

#include <MSDataDescColumns.h>

Public Member Functions

 MSDataDescColumns (const MSDataDescription &msDataDesc)
 Create a columns object that accesses the data in the specified Table. More...
 
 ~MSDataDescColumns ()
 The destructor does nothing special. More...
 
ScalarColumn< Bool > & flagRow ()
 Access to required columns. More...
 
ScalarColumn< Int > & polarizationId ()
 
ScalarColumn< Int > & spectralWindowId ()
 
const ScalarColumn< Bool > & flagRow () const
 Const access to required columns. More...
 
const ScalarColumn< Int > & polarizationId () const
 
const ScalarColumn< Int > & spectralWindowId () const
 
ScalarColumn< Int > & lagId ()
 Access to optional columns. More...
 
const ScalarColumn< Int > & lagId () const
 Const access to optional columns. More...
 
rownr_t nrow () const
 Convenience function that returns the number of rows in any of the columns. More...
 
Int64 match (uInt spwId, uInt polId, Int64 tryRow=-1)
 returns the last row that contains the specified entries in the SPECTRAL_WINDOW_ID & POLARIZATION_ID columns. More...
 

Protected Member Functions

 MSDataDescColumns ()
 
void attach (const MSDataDescription &msDataDesc)
 

Private Member Functions

 MSDataDescColumns (const MSDataDescColumns &)
 
MSDataDescColumnsoperator= (const MSDataDescColumns &)
 
void attachOptionalCols (const MSDataDescription &msDataDesc)
 

Private Attributes

ScalarColumn< BoolflagRow_p
 
ScalarColumn< IntpolarizationId_p
 
ScalarColumn< IntspectralWindowId_p
 
ScalarColumn< IntlagId_p
 

Detailed Description

A class to provide easy access to MSDataDescription columns

Intended use:

Public interface

Review Status

Reviewed By:
Bob Garwood
Date Reviewed:
1997/02/01

Prerequisite

Etymology

MSDataDescColumns stands for MeasurementSet DataDescription Table columns.

Synopsis

This class provides 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 MSColumns 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;

Motivation

See MSColumns for the motivation.

Definition at line 74 of file MSDataDescColumns.h.

Constructor & Destructor Documentation

◆ MSDataDescColumns() [1/3]

casacore::MSDataDescColumns::MSDataDescColumns ( const MSDataDescription msDataDesc)

Create a columns object that accesses the data in the specified Table.

◆ ~MSDataDescColumns()

casacore::MSDataDescColumns::~MSDataDescColumns ( )

The destructor does nothing special.

◆ MSDataDescColumns() [2/3]

casacore::MSDataDescColumns::MSDataDescColumns ( )
protected

◆ MSDataDescColumns() [3/3]

casacore::MSDataDescColumns::MSDataDescColumns ( const MSDataDescColumns )
private

Member Function Documentation

◆ attach()

void casacore::MSDataDescColumns::attach ( const MSDataDescription msDataDesc)
protected

◆ attachOptionalCols()

void casacore::MSDataDescColumns::attachOptionalCols ( const MSDataDescription msDataDesc)
private

◆ flagRow() [1/2]

ScalarColumn<Bool>& casacore::MSDataDescColumns::flagRow ( )
inline

Access to required columns.

Definition at line 85 of file MSDataDescColumns.h.

References flagRow_p.

◆ flagRow() [2/2]

const ScalarColumn<Bool>& casacore::MSDataDescColumns::flagRow ( ) const
inline

Const access to required columns.

Definition at line 92 of file MSDataDescColumns.h.

References flagRow_p.

◆ lagId() [1/2]

ScalarColumn<Int>& casacore::MSDataDescColumns::lagId ( )
inline

Access to optional columns.

Definition at line 99 of file MSDataDescColumns.h.

References lagId_p.

◆ lagId() [2/2]

const ScalarColumn<Int>& casacore::MSDataDescColumns::lagId ( ) const
inline

Const access to optional columns.

Definition at line 104 of file MSDataDescColumns.h.

References lagId_p.

◆ match()

Int64 casacore::MSDataDescColumns::match ( uInt  spwId,
uInt  polId,
Int64  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).

◆ nrow()

rownr_t casacore::MSDataDescColumns::nrow ( ) const
inline

Convenience function that returns the number of rows in any of the columns.

Definition at line 108 of file MSDataDescColumns.h.

References flagRow_p, and casacore::TableColumn::nrow().

◆ operator=()

MSDataDescColumns& casacore::MSDataDescColumns::operator= ( const MSDataDescColumns )
private

◆ polarizationId() [1/2]

ScalarColumn<Int>& casacore::MSDataDescColumns::polarizationId ( )
inline

Definition at line 86 of file MSDataDescColumns.h.

References polarizationId_p.

◆ polarizationId() [2/2]

const ScalarColumn<Int>& casacore::MSDataDescColumns::polarizationId ( ) const
inline

Definition at line 93 of file MSDataDescColumns.h.

References polarizationId_p.

◆ spectralWindowId() [1/2]

ScalarColumn<Int>& casacore::MSDataDescColumns::spectralWindowId ( )
inline

Definition at line 87 of file MSDataDescColumns.h.

References spectralWindowId_p.

◆ spectralWindowId() [2/2]

const ScalarColumn<Int>& casacore::MSDataDescColumns::spectralWindowId ( ) const
inline

Definition at line 94 of file MSDataDescColumns.h.

References spectralWindowId_p.

Member Data Documentation

◆ flagRow_p

ScalarColumn<Bool> casacore::MSDataDescColumns::flagRow_p
private

Definition at line 136 of file MSDataDescColumns.h.

Referenced by flagRow(), and nrow().

◆ lagId_p

ScalarColumn<Int> casacore::MSDataDescColumns::lagId_p
private

Definition at line 140 of file MSDataDescColumns.h.

Referenced by lagId().

◆ polarizationId_p

ScalarColumn<Int> casacore::MSDataDescColumns::polarizationId_p
private

Definition at line 137 of file MSDataDescColumns.h.

Referenced by polarizationId().

◆ spectralWindowId_p

ScalarColumn<Int> casacore::MSDataDescColumns::spectralWindowId_p
private

Definition at line 138 of file MSDataDescColumns.h.

Referenced by spectralWindowId().


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