casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
casa::CTColumns Class Reference

A class to provide easy read-write access to NewCalTable columns. More...

#include <CTColumns.h>

Inheritance diagram for casa::CTColumns:
casa::CTMainColumns

Public Member Functions

 CTColumns (NewCalTable &caltable)
 Create a columns object that accesses the data in the specified caltable. More...
 
 ~CTColumns ()
 The destructor does nothing special. More...
 
CTObservationColumnsobservation ()
 Read-write access to required subtables. More...
 
CTAntennaColumnsantenna ()
 
CTFieldColumnsfield ()
 
CTHistoryColumnshistory ()
 
CTSpWindowColumnsspectralWindow ()
 
const ROCTObservationColumnsobservation () const
 Read-write access to optional subtables. More...
 
const ROCTAntennaColumnsantenna () const
 
const ROCTFieldColumnsfield () const
 
const ROCTHistoryColumnshistory () const
 
const ROCTSpWindowColumnsspectralWindow () const
 
- Public Member Functions inherited from casa::CTMainColumns
 CTMainColumns (NewCalTable &calTable)
 Construct from a calibration table. More...
 
virtual ~CTMainColumns ()
 Default destructor. More...
 
casacore::ScalarColumn
< casacore::Double > & 
time ()
 Read-write column accessors. More...
 
casacore::ScalarQuantColumn
< casacore::Double > & 
timeQuant ()
 
casacore::ScalarMeasColumn
< casacore::MEpoch > & 
timeMeas ()
 
casacore::ScalarColumn
< casacore::Double > & 
timeEP ()
 
casacore::ScalarQuantColumn
< casacore::Double > & 
timeEPQuant ()
 
casacore::ScalarColumn
< casacore::Double > & 
interval ()
 
casacore::ScalarQuantColumn
< casacore::Double > & 
intervalQuant ()
 
casacore::ScalarColumn
< casacore::Int > & 
fieldId ()
 
casacore::ScalarColumn
< casacore::Int > & 
spwId ()
 
casacore::ScalarColumn
< casacore::Int > & 
antenna1 ()
 
casacore::ScalarColumn
< casacore::Int > & 
antenna2 ()
 
casacore::ScalarColumn
< casacore::Int > & 
scanNo ()
 
casacore::ScalarColumn
< casacore::Int > & 
obsId ()
 
casacore::ArrayColumn
< casacore::Complex > & 
cparam ()
 
casacore::ArrayColumn
< casacore::Float > & 
fparam ()
 
casacore::ArrayColumn
< casacore::Float > & 
paramerr ()
 
casacore::ArrayColumn
< casacore::Bool > & 
flag ()
 
casacore::ArrayColumn
< casacore::Float > & 
snr ()
 
casacore::ArrayColumn
< casacore::Float > & 
weight ()
 

Private Attributes

CTObservationColumns observation_p
 protected: friend class NewCalTable; More...
 
CTAntennaColumns antenna_p
 
CTFieldColumns field_p
 
CTHistoryColumns history_p
 
CTSpWindowColumns spectralWindow_p
 

Additional Inherited Members

- Protected Member Functions inherited from casa::CTMainColumns
 CTMainColumns ()
 Prohibit public use of the null constructor, which does not produce a usable object. More...
 
void attach (NewCalTable &calTable, casacore::TableColumn &tabCol, CTEnums::colDef colEnum, const casacore::Bool &optional=false)
 Return a CalTable as a casacore::Table reference. More...
 
void attach (NewCalTable &calTable, casacore::ArrayMeasColumn< casacore::MEpoch > &tabCol, CTEnums::colDef colEnum, const casacore::Bool &optional=false)
 
void attach (NewCalTable &calTable, casacore::ArrayMeasColumn< casacore::MFrequency > &tabCol, CTEnums::colDef colEnum, const casacore::Bool &optional=false)
 
void attach (NewCalTable &calTable, casacore::ArrayMeasColumn< casacore::MDirection > &tabCol, CTEnums::colDef colEnum, const casacore::Bool &optional=false)
 
void attach (NewCalTable &calTable, casacore::ScalarMeasColumn< casacore::MEpoch > &tabCol, CTEnums::colDef colEnum, const casacore::Bool &optional=false)
 
void attach (NewCalTable &calTable, casacore::ScalarQuantColumn< casacore::Double > &tabCol, CTEnums::colDef colEnum, const casacore::Bool &optional=false)
 

Detailed Description

A class to provide easy read-write access to NewCalTable columns.

Intended use:

Public interface

Prerequisite

Etymology

CTColumns stands for NewCalTable columns.

Synopsis

This class provides access to all the subtables and direct access to all the columns in the NewCalTable. 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.

Example

// use as follows
NewCalTable newcalt("mynewcalt",casacore::Table::Update);
CTColumns nctc(newcalt);
// show time from row 5
cout << nctc.time()(5);
// change name of antenna on row 3 in antenna table
nctc.antenna().name().put(3,"NewAnt-3");

Motivation

Having to type long lists of Scalar and casacore::Array column declarations gets very tedious. This class attempts to relieve some of that tedium, while at the same time concentrating all the declarations in one place, making Type errors in the column declaration (only caught at run-time) less probable. Type errors in the use of the columns is caught at compile time.

Definition at line 179 of file CTColumns.h.

Constructor & Destructor Documentation

casa::CTColumns::CTColumns ( NewCalTable caltable)

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

casa::CTColumns::~CTColumns ( )

The destructor does nothing special.

Member Function Documentation

CTAntennaColumns& casa::CTColumns::antenna ( void  )
inline

Definition at line 191 of file CTColumns.h.

References antenna_p.

const ROCTAntennaColumns& casa::CTColumns::antenna ( void  ) const
inline

Definition at line 205 of file CTColumns.h.

References antenna_p.

CTFieldColumns& casa::CTColumns::field ( void  )
inline

Definition at line 192 of file CTColumns.h.

References field_p.

const ROCTFieldColumns& casa::CTColumns::field ( void  ) const
inline

Definition at line 206 of file CTColumns.h.

References field_p.

CTHistoryColumns& casa::CTColumns::history ( )
inline

Definition at line 193 of file CTColumns.h.

References history_p.

const ROCTHistoryColumns& casa::CTColumns::history ( ) const
inline

Definition at line 207 of file CTColumns.h.

References history_p.

CTObservationColumns& casa::CTColumns::observation ( )
inline

Read-write access to required subtables.

Definition at line 190 of file CTColumns.h.

References observation_p.

const ROCTObservationColumns& casa::CTColumns::observation ( ) const
inline

Read-write access to optional subtables.

Read-only access to required subtables

Definition at line 204 of file CTColumns.h.

References observation_p.

CTSpWindowColumns& casa::CTColumns::spectralWindow ( )
inline

Definition at line 194 of file CTColumns.h.

References spectralWindow_p.

const ROCTSpWindowColumns& casa::CTColumns::spectralWindow ( ) const
inline

Definition at line 208 of file CTColumns.h.

References spectralWindow_p.

Member Data Documentation

CTAntennaColumns casa::CTColumns::antenna_p
private

Definition at line 217 of file CTColumns.h.

Referenced by antenna().

CTFieldColumns casa::CTColumns::field_p
private

Definition at line 218 of file CTColumns.h.

Referenced by field().

CTHistoryColumns casa::CTColumns::history_p
private

Definition at line 219 of file CTColumns.h.

Referenced by history().

CTObservationColumns casa::CTColumns::observation_p
private

protected: friend class NewCalTable;

Access to subtables

Definition at line 216 of file CTColumns.h.

Referenced by observation().

CTSpWindowColumns casa::CTColumns::spectralWindow_p
private

Definition at line 220 of file CTColumns.h.

Referenced by spectralWindow().


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