casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Member Functions | Private Attributes
GBTMSStateFiller Class Reference

GBTMSStateFiller fills the MSState table for GBT fillers. More...

#include <GBTMSStateFiller.h>

List of all members.

Public Member Functions

 GBTMSStateFiller ()
 The default ctor.
 GBTMSStateFiller (MSState &msState)
 A filler attached to an MSState table.
 ~GBTMSStateFiller ()
void attach (MSState &msState)
 attach it to an MSState
void fill (const Vector< Bool > &sigref, const Vector< Bool > &cal, const String &procname, Int procsize, Int procseqn, const String &swstate, const String &swtchsig)
 fill for all of the states given.
const Vector< Int > & stateIds () const
 The vector state ids most recently filled.
const Vector< Bool > & sigs () const
 Return a vector of the SIG column for the states just filled.
void flush ()
 flush the underlying MS subtable

Private Member Functions

void init (MSState &msState)
 initialize the above for the first time
 GBTMSStateFiller (const GBTMSStateFiller &other)
 undefined and unavailable
void operator= (const GBTMSStateFiller &other)

Private Attributes

ColumnsIndex * index_p
RecordFieldPtr< Bool > sigKey_p
RecordFieldPtr< Double > calKey_p
RecordFieldPtr< Int > subScanKey_p
RecordFieldPtr< Int > procSizeKey_p
RecordFieldPtr< StringobsModeKey_p
MSState * msState_p
MSStateColumns * msStateCols_p
ScalarColumn< StringprocnameCol_p
ScalarColumn< Int > procsizeCol_p
ScalarColumn< Int > procseqnCol_p
Vector< Int > stateIds_p
Vector< Bool > sigs_p

Detailed Description

GBTMSStateFiller fills the MSState table for GBT fillers.

Intended use:

Internal

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

This class puts GBT data into (fills) the MSState table.

Synopsis

This class puts the appropriate values for the GBT in an MSState table (which has been previously created as part of a MeasurementSet). On each fill() any necessary additions to the MSState are made. Existing rows are re-used whenever possible.

The stateIds are available to be used by the other GBTMS*Fillers as other subtables are filled in turn.

It is assumed that the non-standard columns NRAO_GBT_PROCNAME, NRAO_GBT_PROCSIZE, and NRAO_GBT_PROCSEQN already exist in the MSState table when this class attempts to attach to the MSState table.

Example

Motivation

Writing a filler is a daunting task. There are various dependencies between the subtables. It helps to encapsulate the knowlege and task of filling a specific subtable to separate classes.

Definition at line 96 of file GBTMSStateFiller.h.


Constructor & Destructor Documentation

The default ctor.

No MSState table has been attached yet. Calling fill on such a filler will throw an exception. It is present so that this object can be instantiated before an MSState has been created.

GBTMSStateFiller::GBTMSStateFiller ( MSState &  msState)

A filler attached to an MSState table.

undefined and unavailable


Member Function Documentation

void GBTMSStateFiller::attach ( MSState &  msState)

attach it to an MSState

void GBTMSStateFiller::fill ( const Vector< Bool > &  sigref,
const Vector< Bool > &  cal,
const String procname,
Int  procsize,
Int  procseqn,
const String swstate,
const String swtchsig 
)

fill for all of the states given.

sigref and cal must have the same length. New rows are only added when needed (existing rows with the same values are re-used). The scalar values are constant for all the input states. Some interpretation is done here for the special 2-state case. In that case, if cal is changing then sigref is assumed to not change. That is to accomodate the TPWCALSP mode where the sigref column is used trigger lo blanking while doppler tracking. Due to different user interfaces, it is sometimes possible to get an unexpected TPWCALSP state table even in other modes. This assumption, that sigref=True when cal changes and there are only 2 states, should be valid in all cases.

void GBTMSStateFiller::flush ( ) [inline]

flush the underlying MS subtable

Definition at line 137 of file GBTMSStateFiller.h.

References msState_p.

void GBTMSStateFiller::init ( MSState &  msState) [private]

initialize the above for the first time

void GBTMSStateFiller::operator= ( const GBTMSStateFiller other) [private]
const Vector<Bool>& GBTMSStateFiller::sigs ( ) const [inline]

Return a vector of the SIG column for the states just filled.

Definition at line 134 of file GBTMSStateFiller.h.

References sigs_p.

const Vector<Int>& GBTMSStateFiller::stateIds ( ) const [inline]

The vector state ids most recently filled.

Definition at line 131 of file GBTMSStateFiller.h.

References stateIds_p.


Member Data Documentation

RecordFieldPtr<Double> GBTMSStateFiller::calKey_p [private]

Definition at line 142 of file GBTMSStateFiller.h.

ColumnsIndex* GBTMSStateFiller::index_p [private]

Definition at line 140 of file GBTMSStateFiller.h.

MSState* GBTMSStateFiller::msState_p [private]

Definition at line 145 of file GBTMSStateFiller.h.

Referenced by flush().

MSStateColumns* GBTMSStateFiller::msStateCols_p [private]

Definition at line 146 of file GBTMSStateFiller.h.

RecordFieldPtr<String> GBTMSStateFiller::obsModeKey_p [private]

Definition at line 144 of file GBTMSStateFiller.h.

ScalarColumn<String> GBTMSStateFiller::procnameCol_p [private]

Definition at line 147 of file GBTMSStateFiller.h.

ScalarColumn<Int> GBTMSStateFiller::procseqnCol_p [private]

Definition at line 148 of file GBTMSStateFiller.h.

ScalarColumn<Int> GBTMSStateFiller::procsizeCol_p [private]

Definition at line 148 of file GBTMSStateFiller.h.

RecordFieldPtr<Int> GBTMSStateFiller::procSizeKey_p [private]

Definition at line 143 of file GBTMSStateFiller.h.

RecordFieldPtr<Bool> GBTMSStateFiller::sigKey_p [private]

Definition at line 141 of file GBTMSStateFiller.h.

Vector<Bool> GBTMSStateFiller::sigs_p [private]

Definition at line 151 of file GBTMSStateFiller.h.

Referenced by sigs().

Vector<Int> GBTMSStateFiller::stateIds_p [private]

Definition at line 150 of file GBTMSStateFiller.h.

Referenced by stateIds().

RecordFieldPtr<Int> GBTMSStateFiller::subScanKey_p [private]

Definition at line 143 of file GBTMSStateFiller.h.


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