GBTMSStateFiller.h

Classes

GBTMSStateFiller -- GBTMSStateFiller fills the MSState table for GBT fillers (full description)

class GBTMSStateFiller

Interface

Public Members
GBTMSStateFiller()
GBTMSStateFiller(MSState &msState)
~GBTMSStateFiller()
void attach(MSState &msState)
void fill(const Vector<Bool> &sigref, const Vector<Bool> &cal, const String &procname, Int procsize, Int procseqn, const String &swstate, const String &swtchsig)
const Vector<Int> &stateIds() const
const Vector<Bool> &sigs() const
void flush()
Private Members
void init(MSState &msState)
GBTMSStateFiller(const GBTMSStateFiller &other)
void operator=(const GBTMSStateFiller &other)

Description

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.

Member Description

GBTMSStateFiller()

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(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. 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.

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

void init(MSState &msState)

initialize the above for the first time

GBTMSStateFiller(const GBTMSStateFiller &other)

undefined and unavailable

void operator=(const GBTMSStateFiller &other)