casacore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
casacore::MSSourceColumns Class Reference

A class to provide easy access to MSSource columns. More...

#include <MSSourceColumns.h>

Public Member Functions

 MSSourceColumns (const MSSource &msSource)
 Construct from the supplied Table. More...
 
 ~MSSourceColumns ()
 The destructor does nothing special. More...
 
Bool isNull () const
 Is this object defined? (MSSource table is optional) More...
 
ScalarColumn< Int > & calibrationGroup ()
 Access to required columns. More...
 
ScalarColumn< String > & code ()
 
ArrayColumn< Double > & direction ()
 
ArrayQuantColumn< Double > & directionQuant ()
 
ScalarMeasColumn< MDirection > & directionMeas ()
 
ScalarColumn< Double > & interval ()
 
ScalarQuantColumn< Double > & intervalQuant ()
 
ScalarColumn< String > & name ()
 
ScalarColumn< Int > & numLines ()
 
ArrayColumn< Double > & properMotion ()
 
ArrayQuantColumn< Double > & properMotionQuant ()
 
ScalarColumn< Int > & sourceId ()
 
ScalarColumn< Int > & spectralWindowId ()
 
ScalarColumn< Double > & time ()
 
ScalarQuantColumn< Double > & timeQuant ()
 
ScalarMeasColumn< MEpoch > & timeMeas ()
 
ArrayColumn< Double > & position ()
 Access to optional columns. More...
 
ArrayQuantColumn< Double > & positionQuant ()
 
ScalarMeasColumn< MPosition > & positionMeas ()
 
ScalarColumn< Int > & pulsarId ()
 
ArrayColumn< Double > & restFrequency ()
 
ArrayQuantColumn< Double > & restFrequencyQuant ()
 
ArrayMeasColumn< MFrequency > & restFrequencyMeas ()
 
ScalarColumn< TableRecord > & sourceModel ()
 
ArrayColumn< Double > & sysvel ()
 
ArrayQuantColumn< Double > & sysvelQuant ()
 
ArrayMeasColumn
< MRadialVelocity > & 
sysvelMeas ()
 
ArrayColumn< String > & transition ()
 
const ScalarColumn< Int > & calibrationGroup () const
 Const access to required columns. More...
 
const ScalarColumn< String > & code () const
 
const ArrayColumn< Double > & direction () const
 
const ArrayQuantColumn< Double > & directionQuant () const
 
const ScalarMeasColumn
< MDirection > & 
directionMeas () const
 
const ScalarColumn< Double > & interval () const
 
const ScalarQuantColumn< Double > & intervalQuant () const
 
const ScalarColumn< String > & name () const
 
const ScalarColumn< Int > & numLines () const
 
const ArrayColumn< Double > & properMotion () const
 
const ArrayQuantColumn< Double > & properMotionQuant () const
 
const ScalarColumn< Int > & sourceId () const
 
const ScalarColumn< Int > & spectralWindowId () const
 
const ScalarColumn< Double > & time () const
 
const ScalarQuantColumn< Double > & timeQuant () const
 
const ScalarMeasColumn< MEpoch > & timeMeas () const
 
const ArrayColumn< Double > & position () const
 Const access to optional columns. More...
 
const ArrayQuantColumn< Double > & positionQuant () const
 
const ScalarMeasColumn
< MPosition > & 
positionMeas () const
 
const ScalarColumn< Int > & pulsarId () const
 
const ArrayColumn< Double > & restFrequency () const
 
const ArrayQuantColumn< Double > & restFrequencyQuant () const
 
const ArrayMeasColumn
< MFrequency > & 
restFrequencyMeas () const
 
const ScalarColumn< TableRecord > & sourceModel () const
 
const ArrayColumn< Double > & sysvel () const
 
const ArrayQuantColumn< Double > & sysvelQuant () const
 
const ArrayMeasColumn
< MRadialVelocity > & 
sysvelMeas () const
 
const ArrayColumn< String > & transition () const
 
rownr_t nrow () const
 Convenience function that returns the number of rows in any of the columns. More...
 
void setEpochRef (MEpoch::Types ref, Bool tableMustBeEmpty=True)
 set the epoch type for the TIME column. More...
 
void setDirectionRef (MDirection::Types ref)
 set the direction type for the DIRECTION column. More...
 
void setPositionRef (MPosition::Types ref)
 set the position type for the POSITION column. More...
 
void setFrequencyRef (MFrequency::Types ref)
 set the frequency type for the REST_FREQUENCY column. More...
 
void setRadialVelocityRef (MRadialVelocity::Types ref)
 set the radial velocity type for the SYSVEL column. More...
 

Protected Member Functions

 MSSourceColumns ()
 
void attach (const MSSource &msSource)
 

Private Member Functions

 MSSourceColumns (const MSSourceColumns &)
 
MSSourceColumnsoperator= (const MSSourceColumns &)
 
void attachOptionalCols (const MSSource &msSource)
 

Private Attributes

Bool isNull_p
 
ScalarColumn< IntcalibrationGroup_p
 
ScalarColumn< Stringcode_p
 
ArrayColumn< Doubledirection_p
 
ScalarColumn< Doubleinterval_p
 
ScalarColumn< Stringname_p
 
ScalarColumn< IntnumLines_p
 
ArrayColumn< DoubleproperMotion_p
 
ScalarColumn< IntsourceId_p
 
ScalarColumn< IntspectralWindowId_p
 
ScalarColumn< Doubletime_p
 
ArrayColumn< Doubleposition_p
 
ScalarColumn< IntpulsarId_p
 
ArrayColumn< DoublerestFrequency_p
 
ScalarColumn< TableRecordsourceModel_p
 
ArrayColumn< Doublesysvel_p
 
ArrayColumn< Stringtransition_p
 
ScalarMeasColumn< MDirectiondirectionMeas_p
 
ScalarMeasColumn< MEpochtimeMeas_p
 
ScalarMeasColumn< MPositionpositionMeas_p
 
ArrayMeasColumn< MFrequencyrestFrequencyMeas_p
 
ArrayMeasColumn< MRadialVelocitysysvelMeas_p
 
ArrayQuantColumn< DoubledirectionQuant_p
 
ScalarQuantColumn< DoubleintervalQuant_p
 
ArrayQuantColumn< DoubleproperMotionQuant_p
 
ScalarQuantColumn< DoubletimeQuant_p
 
ArrayQuantColumn< DoublepositionQuant_p
 
ArrayQuantColumn< DoublerestFrequencyQuant_p
 
ArrayQuantColumn< DoublesysvelQuant_p
 

Detailed Description

A class to provide easy access to MSSource columns.

Intended use:

Public interface

Review Status

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

Prerequisite

Etymology

MSSourceColumns stands for MeasurementSet Source Table columns.

Synopsis

This class provides access to the columns in the MSSource 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.

Motivation

See MSColumns for the motivation.

Definition at line 88 of file MSSourceColumns.h.

Constructor & Destructor Documentation

casacore::MSSourceColumns::MSSourceColumns ( const MSSource msSource)

Construct from the supplied Table.

casacore::MSSourceColumns::~MSSourceColumns ( )

The destructor does nothing special.

casacore::MSSourceColumns::MSSourceColumns ( )
protected
casacore::MSSourceColumns::MSSourceColumns ( const MSSourceColumns )
private

Member Function Documentation

void casacore::MSSourceColumns::attach ( const MSSource msSource)
protected
void casacore::MSSourceColumns::attachOptionalCols ( const MSSource msSource)
private
ScalarColumn<Int>& casacore::MSSourceColumns::calibrationGroup ( )
inline

Access to required columns.

Definition at line 102 of file MSSourceColumns.h.

References calibrationGroup_p.

const ScalarColumn<Int>& casacore::MSSourceColumns::calibrationGroup ( ) const
inline

Const access to required columns.

Definition at line 139 of file MSSourceColumns.h.

References calibrationGroup_p.

ScalarColumn<String>& casacore::MSSourceColumns::code ( )
inline

Definition at line 103 of file MSSourceColumns.h.

References code_p.

const ScalarColumn<String>& casacore::MSSourceColumns::code ( ) const
inline

Definition at line 141 of file MSSourceColumns.h.

References code_p.

ArrayColumn<Double>& casacore::MSSourceColumns::direction ( )
inline

Definition at line 104 of file MSSourceColumns.h.

References direction_p.

const ArrayColumn<Double>& casacore::MSSourceColumns::direction ( ) const
inline

Definition at line 142 of file MSSourceColumns.h.

References direction_p.

ScalarMeasColumn<MDirection>& casacore::MSSourceColumns::directionMeas ( )
inline

Definition at line 106 of file MSSourceColumns.h.

References directionMeas_p.

const ScalarMeasColumn<MDirection>& casacore::MSSourceColumns::directionMeas ( ) const
inline

Definition at line 145 of file MSSourceColumns.h.

References directionMeas_p.

ArrayQuantColumn<Double>& casacore::MSSourceColumns::directionQuant ( )
inline

Definition at line 105 of file MSSourceColumns.h.

References directionQuant_p.

const ArrayQuantColumn<Double>& casacore::MSSourceColumns::directionQuant ( ) const
inline

Definition at line 143 of file MSSourceColumns.h.

References directionQuant_p.

ScalarColumn<Double>& casacore::MSSourceColumns::interval ( )
inline

Definition at line 107 of file MSSourceColumns.h.

References interval_p.

const ScalarColumn<Double>& casacore::MSSourceColumns::interval ( ) const
inline

Definition at line 147 of file MSSourceColumns.h.

References interval_p.

ScalarQuantColumn<Double>& casacore::MSSourceColumns::intervalQuant ( )
inline

Definition at line 108 of file MSSourceColumns.h.

References intervalQuant_p.

const ScalarQuantColumn<Double>& casacore::MSSourceColumns::intervalQuant ( ) const
inline

Definition at line 148 of file MSSourceColumns.h.

References intervalQuant_p.

Bool casacore::MSSourceColumns::isNull ( ) const
inline

Is this object defined? (MSSource table is optional)

Definition at line 98 of file MSSourceColumns.h.

References isNull_p.

Referenced by nrow().

ScalarColumn<String>& casacore::MSSourceColumns::name ( )
inline

Definition at line 109 of file MSSourceColumns.h.

References name_p.

const ScalarColumn<String>& casacore::MSSourceColumns::name ( ) const
inline

Definition at line 150 of file MSSourceColumns.h.

References name_p.

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

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

Returns zero if the object is null.

Definition at line 187 of file MSSourceColumns.h.

References calibrationGroup_p, isNull(), and casacore::TableColumn::nrow().

ScalarColumn<Int>& casacore::MSSourceColumns::numLines ( )
inline

Definition at line 110 of file MSSourceColumns.h.

References numLines_p.

const ScalarColumn<Int>& casacore::MSSourceColumns::numLines ( ) const
inline

Definition at line 151 of file MSSourceColumns.h.

References numLines_p.

MSSourceColumns& casacore::MSSourceColumns::operator= ( const MSSourceColumns )
private
ArrayColumn<Double>& casacore::MSSourceColumns::position ( )
inline

Access to optional columns.

Definition at line 122 of file MSSourceColumns.h.

References position_p.

const ArrayColumn<Double>& casacore::MSSourceColumns::position ( ) const
inline

Const access to optional columns.

Definition at line 165 of file MSSourceColumns.h.

References position_p.

ScalarMeasColumn<MPosition>& casacore::MSSourceColumns::positionMeas ( )
inline

Definition at line 124 of file MSSourceColumns.h.

References positionMeas_p.

const ScalarMeasColumn<MPosition>& casacore::MSSourceColumns::positionMeas ( ) const
inline

Definition at line 168 of file MSSourceColumns.h.

References positionMeas_p.

ArrayQuantColumn<Double>& casacore::MSSourceColumns::positionQuant ( )
inline

Definition at line 123 of file MSSourceColumns.h.

References positionQuant_p.

const ArrayQuantColumn<Double>& casacore::MSSourceColumns::positionQuant ( ) const
inline

Definition at line 166 of file MSSourceColumns.h.

References positionQuant_p.

ArrayColumn<Double>& casacore::MSSourceColumns::properMotion ( )
inline

Definition at line 111 of file MSSourceColumns.h.

References properMotion_p.

const ArrayColumn<Double>& casacore::MSSourceColumns::properMotion ( ) const
inline

Definition at line 152 of file MSSourceColumns.h.

References properMotion_p.

ArrayQuantColumn<Double>& casacore::MSSourceColumns::properMotionQuant ( )
inline

Definition at line 112 of file MSSourceColumns.h.

References properMotionQuant_p.

const ArrayQuantColumn<Double>& casacore::MSSourceColumns::properMotionQuant ( ) const
inline

Definition at line 153 of file MSSourceColumns.h.

References properMotionQuant_p.

ScalarColumn<Int>& casacore::MSSourceColumns::pulsarId ( )
inline

Definition at line 125 of file MSSourceColumns.h.

References pulsarId_p.

const ScalarColumn<Int>& casacore::MSSourceColumns::pulsarId ( ) const
inline

Definition at line 170 of file MSSourceColumns.h.

References pulsarId_p.

ArrayColumn<Double>& casacore::MSSourceColumns::restFrequency ( )
inline

Definition at line 126 of file MSSourceColumns.h.

References restFrequency_p.

const ArrayColumn<Double>& casacore::MSSourceColumns::restFrequency ( ) const
inline

Definition at line 171 of file MSSourceColumns.h.

References restFrequency_p.

ArrayMeasColumn<MFrequency>& casacore::MSSourceColumns::restFrequencyMeas ( )
inline

Definition at line 128 of file MSSourceColumns.h.

References restFrequencyMeas_p.

const ArrayMeasColumn<MFrequency>& casacore::MSSourceColumns::restFrequencyMeas ( ) const
inline

Definition at line 174 of file MSSourceColumns.h.

References restFrequencyMeas_p.

ArrayQuantColumn<Double>& casacore::MSSourceColumns::restFrequencyQuant ( )
inline

Definition at line 127 of file MSSourceColumns.h.

References restFrequencyQuant_p.

const ArrayQuantColumn<Double>& casacore::MSSourceColumns::restFrequencyQuant ( ) const
inline

Definition at line 172 of file MSSourceColumns.h.

References restFrequencyQuant_p.

void casacore::MSSourceColumns::setDirectionRef ( MDirection::Types  ref)

set the direction type for the DIRECTION column.

This can only be done when the table has no rows. Trying to do so at other times will throw an exception.

void casacore::MSSourceColumns::setEpochRef ( MEpoch::Types  ref,
Bool  tableMustBeEmpty = True 
)

set the epoch type for the TIME column.


Tip: In principle this function can only be used if the table is empty, otherwise already written values may thereafter have an incorrect reference, offset, or unit; However, it is possible that part of the table gets written before these values are known; In that case the reference, offset, or units can be set by using a False tableMustBeEmpty argument;

void casacore::MSSourceColumns::setFrequencyRef ( MFrequency::Types  ref)

set the frequency type for the REST_FREQUENCY column.

Does nothing if this column is not defined. This can only be done when the table has no rows. Trying to do so at other times will throw an exception.

void casacore::MSSourceColumns::setPositionRef ( MPosition::Types  ref)

set the position type for the POSITION column.

This can only be done when the table has no rows. Trying to do so at other times will throw an exception.

void casacore::MSSourceColumns::setRadialVelocityRef ( MRadialVelocity::Types  ref)

set the radial velocity type for the SYSVEL column.

Does nothing if this column is not defined. This can only be done when the table has no rows. Trying to do so at other times will throw an exception.

ScalarColumn<Int>& casacore::MSSourceColumns::sourceId ( )
inline

Definition at line 113 of file MSSourceColumns.h.

References sourceId_p.

const ScalarColumn<Int>& casacore::MSSourceColumns::sourceId ( ) const
inline

Definition at line 155 of file MSSourceColumns.h.

References sourceId_p.

ScalarColumn<TableRecord>& casacore::MSSourceColumns::sourceModel ( )
inline

Definition at line 130 of file MSSourceColumns.h.

References sourceModel_p.

const ScalarColumn<TableRecord>& casacore::MSSourceColumns::sourceModel ( ) const
inline

Definition at line 176 of file MSSourceColumns.h.

References sourceModel_p.

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

Definition at line 114 of file MSSourceColumns.h.

References spectralWindowId_p.

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

Definition at line 156 of file MSSourceColumns.h.

References spectralWindowId_p.

ArrayColumn<Double>& casacore::MSSourceColumns::sysvel ( )
inline

Definition at line 131 of file MSSourceColumns.h.

References sysvel_p.

const ArrayColumn<Double>& casacore::MSSourceColumns::sysvel ( ) const
inline

Definition at line 178 of file MSSourceColumns.h.

References sysvel_p.

ArrayMeasColumn<MRadialVelocity>& casacore::MSSourceColumns::sysvelMeas ( )
inline

Definition at line 133 of file MSSourceColumns.h.

References sysvelMeas_p.

const ArrayMeasColumn<MRadialVelocity>& casacore::MSSourceColumns::sysvelMeas ( ) const
inline

Definition at line 180 of file MSSourceColumns.h.

References sysvelMeas_p.

ArrayQuantColumn<Double>& casacore::MSSourceColumns::sysvelQuant ( )
inline

Definition at line 132 of file MSSourceColumns.h.

References sysvelQuant_p.

const ArrayQuantColumn<Double>& casacore::MSSourceColumns::sysvelQuant ( ) const
inline

Definition at line 179 of file MSSourceColumns.h.

References sysvelQuant_p.

ScalarColumn<Double>& casacore::MSSourceColumns::time ( )
inline

Definition at line 115 of file MSSourceColumns.h.

References time_p.

const ScalarColumn<Double>& casacore::MSSourceColumns::time ( ) const
inline

Definition at line 158 of file MSSourceColumns.h.

References time_p.

ScalarMeasColumn<MEpoch>& casacore::MSSourceColumns::timeMeas ( )
inline

Definition at line 117 of file MSSourceColumns.h.

References timeMeas_p.

const ScalarMeasColumn<MEpoch>& casacore::MSSourceColumns::timeMeas ( ) const
inline

Definition at line 160 of file MSSourceColumns.h.

References timeMeas_p.

ScalarQuantColumn<Double>& casacore::MSSourceColumns::timeQuant ( )
inline

Definition at line 116 of file MSSourceColumns.h.

References timeQuant_p.

const ScalarQuantColumn<Double>& casacore::MSSourceColumns::timeQuant ( ) const
inline

Definition at line 159 of file MSSourceColumns.h.

References timeQuant_p.

ArrayColumn<String>& casacore::MSSourceColumns::transition ( )
inline

Definition at line 134 of file MSSourceColumns.h.

References transition_p.

const ArrayColumn<String>& casacore::MSSourceColumns::transition ( ) const
inline

Definition at line 182 of file MSSourceColumns.h.

References transition_p.

Member Data Documentation

ScalarColumn<Int> casacore::MSSourceColumns::calibrationGroup_p
private

Definition at line 241 of file MSSourceColumns.h.

Referenced by calibrationGroup(), and nrow().

ScalarColumn<String> casacore::MSSourceColumns::code_p
private

Definition at line 242 of file MSSourceColumns.h.

Referenced by code().

ArrayColumn<Double> casacore::MSSourceColumns::direction_p
private

Definition at line 243 of file MSSourceColumns.h.

Referenced by direction().

ScalarMeasColumn<MDirection> casacore::MSSourceColumns::directionMeas_p
private

Definition at line 260 of file MSSourceColumns.h.

Referenced by directionMeas().

ArrayQuantColumn<Double> casacore::MSSourceColumns::directionQuant_p
private

Definition at line 268 of file MSSourceColumns.h.

Referenced by directionQuant().

ScalarColumn<Double> casacore::MSSourceColumns::interval_p
private

Definition at line 244 of file MSSourceColumns.h.

Referenced by interval().

ScalarQuantColumn<Double> casacore::MSSourceColumns::intervalQuant_p
private

Definition at line 269 of file MSSourceColumns.h.

Referenced by intervalQuant().

Bool casacore::MSSourceColumns::isNull_p
private

Definition at line 238 of file MSSourceColumns.h.

Referenced by isNull().

ScalarColumn<String> casacore::MSSourceColumns::name_p
private

Definition at line 245 of file MSSourceColumns.h.

Referenced by name().

ScalarColumn<Int> casacore::MSSourceColumns::numLines_p
private

Definition at line 246 of file MSSourceColumns.h.

Referenced by numLines().

ArrayColumn<Double> casacore::MSSourceColumns::position_p
private

Definition at line 252 of file MSSourceColumns.h.

Referenced by position().

ScalarMeasColumn<MPosition> casacore::MSSourceColumns::positionMeas_p
private

Definition at line 263 of file MSSourceColumns.h.

Referenced by positionMeas().

ArrayQuantColumn<Double> casacore::MSSourceColumns::positionQuant_p
private

Definition at line 273 of file MSSourceColumns.h.

Referenced by positionQuant().

ArrayColumn<Double> casacore::MSSourceColumns::properMotion_p
private

Definition at line 247 of file MSSourceColumns.h.

Referenced by properMotion().

ArrayQuantColumn<Double> casacore::MSSourceColumns::properMotionQuant_p
private

Definition at line 270 of file MSSourceColumns.h.

Referenced by properMotionQuant().

ScalarColumn<Int> casacore::MSSourceColumns::pulsarId_p
private

Definition at line 253 of file MSSourceColumns.h.

Referenced by pulsarId().

ArrayColumn<Double> casacore::MSSourceColumns::restFrequency_p
private

Definition at line 254 of file MSSourceColumns.h.

Referenced by restFrequency().

ArrayMeasColumn<MFrequency> casacore::MSSourceColumns::restFrequencyMeas_p
private

Definition at line 264 of file MSSourceColumns.h.

Referenced by restFrequencyMeas().

ArrayQuantColumn<Double> casacore::MSSourceColumns::restFrequencyQuant_p
private

Definition at line 274 of file MSSourceColumns.h.

Referenced by restFrequencyQuant().

ScalarColumn<Int> casacore::MSSourceColumns::sourceId_p
private

Definition at line 248 of file MSSourceColumns.h.

Referenced by sourceId().

ScalarColumn<TableRecord> casacore::MSSourceColumns::sourceModel_p
private

Definition at line 255 of file MSSourceColumns.h.

Referenced by sourceModel().

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

Definition at line 249 of file MSSourceColumns.h.

Referenced by spectralWindowId().

ArrayColumn<Double> casacore::MSSourceColumns::sysvel_p
private

Definition at line 256 of file MSSourceColumns.h.

Referenced by sysvel().

ArrayMeasColumn<MRadialVelocity> casacore::MSSourceColumns::sysvelMeas_p
private

Definition at line 265 of file MSSourceColumns.h.

Referenced by sysvelMeas().

ArrayQuantColumn<Double> casacore::MSSourceColumns::sysvelQuant_p
private

Definition at line 275 of file MSSourceColumns.h.

Referenced by sysvelQuant().

ScalarColumn<Double> casacore::MSSourceColumns::time_p
private

Definition at line 250 of file MSSourceColumns.h.

Referenced by time().

ScalarMeasColumn<MEpoch> casacore::MSSourceColumns::timeMeas_p
private

Definition at line 261 of file MSSourceColumns.h.

Referenced by timeMeas().

ScalarQuantColumn<Double> casacore::MSSourceColumns::timeQuant_p
private

Definition at line 271 of file MSSourceColumns.h.

Referenced by timeQuant().

ArrayColumn<String> casacore::MSSourceColumns::transition_p
private

Definition at line 257 of file MSSourceColumns.h.

Referenced by transition().


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