GBTMSFieldFiller.h

Classes

GBTMSFieldFiller -- GBTMSFieldFiller fills the MSField table for GBT fillers (full description)

class GBTMSFieldFiller

Interface

Public Members
GBTMSFieldFiller()
GBTMSFieldFiller(MSField &msField)
~GBTMSFieldFiller()
void attach(MSField &msField)
void fill(Int sourceId, const String &name, const MDirection &fieldDir)
const Int &fieldId() const
void flush()
Private Members
void init(MSField &msField)
GBTMSFieldFiller(const GBTMSFieldFiller &other)
void operator=(const GBTMSFieldFiller &other)

Description

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

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

Synopsis

This class puts the appropriate values for the GBT in an MSField table (which has been previously created as part of a MeasurementSet). On each fill() any necessary additions to the MSField are made. This is fully indexed. New rows are only added for each new NAME, CODE, NUM_POLY, SOURCE_ID combination or when the directions change for an existing such combination.

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

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

GBTMSFieldFiller()

The default ctor. No MSField 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 MSField has been created.

GBTMSFieldFiller(MSField &msField)

A filler attached to an MSField table

~GBTMSFieldFiller()

void attach(MSField &msField)

attach it to an MSField

void fill(Int sourceId, const String &name, const MDirection &fieldDir)

fill, adding rows as necessary, fieldDir is the nominal pointing direction at equinox. DELAY_DIR, PHASE_DIR, and REFERENCE_DIR are set to the fieldDir value. These are always in J2000 in the MS.

const Int &fieldId() const

this is the row numbers of the most recently filled MSField row it returns -1 if nothing has been filled yet

void flush()

flush the underlying MS subtable

void init(MSField &msField)

initialize the above for the first time

GBTMSFieldFiller(const GBTMSFieldFiller &other)

undefined and unavailable

void operator=(const GBTMSFieldFiller &other)