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

GBTMSObservationFiller fills the MSObservation table for GBT fillers. More...

#include <GBTMSObservationFiller.h>

List of all members.

Public Member Functions

 GBTMSObservationFiller ()
 The default ctor.
 GBTMSObservationFiller (MSObservation &msObservation)
 A filler attached to an MSObservation table.
 ~GBTMSObservationFiller ()
void attach (MSObservation &msObservation)
 attach it to an MSObservation
void fill (const String &project, const String &observer, const MVTime &timestamp, Double duration, const String &telescope)
 fill - adds a new row to the observation table whenever project, observer or telescope, changes.
Int observationId () const
 this is the row number of the most recently "filled" MSObservation row it returns -1 if nothing has been filled yet
const Stringproject () const
 its easier to just cache the most recent project here
void flush ()
 flush the underlying MS subtable

Private Member Functions

void init (MSObservation &msObservation)
 initialize the above for the first time
 GBTMSObservationFiller (const GBTMSObservationFiller &other)
 undefined and unavailable
void operator= (const GBTMSObservationFiller &other)

Private Attributes

MSObservation * msObservation_p
MSObservationColumns * msObsCols_p
Int observationId_p
String project_p
String observer_p
String telescope_p

Detailed Description

GBTMSObservationFiller fills the MSObservation table for GBT fillers.

Intended use:

Internal

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

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

Synopsis

This class puts the appropriate values for the GBT in an MSObservation table (which has been previously created as part of a MeasurementSet). On each fill() any necessary additions to the MSObservation are made. Each fill() adds a new row to the MSObservation table.

The observationId 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.

Definition at line 88 of file GBTMSObservationFiller.h.


Constructor & Destructor Documentation

The default ctor.

No MSObservation 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 MSObservation has been created.

GBTMSObservationFiller::GBTMSObservationFiller ( MSObservation &  msObservation)

A filler attached to an MSObservation table.

undefined and unavailable


Member Function Documentation

void GBTMSObservationFiller::attach ( MSObservation &  msObservation)

attach it to an MSObservation

void GBTMSObservationFiller::fill ( const String project,
const String observer,
const MVTime &  timestamp,
Double  duration,
const String telescope 
)

fill - adds a new row to the observation table whenever project, observer or telescope, changes.

other content to add will be added here as it becomes available e.g. OBS_SCHEDULE The timestamp and duration are used to adjust that TIME_RANGE so that the current project row extends at least from timestamp to timestamp+duration.

void GBTMSObservationFiller::flush ( ) [inline]

flush the underlying MS subtable

Definition at line 125 of file GBTMSObservationFiller.h.

References msObservation_p.

void GBTMSObservationFiller::init ( MSObservation &  msObservation) [private]

initialize the above for the first time

Int GBTMSObservationFiller::observationId ( ) const [inline]

this is the row number of the most recently "filled" MSObservation row it returns -1 if nothing has been filled yet

Definition at line 119 of file GBTMSObservationFiller.h.

References observationId_p.

void GBTMSObservationFiller::operator= ( const GBTMSObservationFiller other) [private]
const String& GBTMSObservationFiller::project ( ) const [inline]

its easier to just cache the most recent project here

Definition at line 122 of file GBTMSObservationFiller.h.

References project_p.


Member Data Documentation

MSObservationColumns* GBTMSObservationFiller::msObsCols_p [private]

Definition at line 129 of file GBTMSObservationFiller.h.

MSObservation* GBTMSObservationFiller::msObservation_p [private]

Definition at line 128 of file GBTMSObservationFiller.h.

Referenced by flush().

Definition at line 131 of file GBTMSObservationFiller.h.

Referenced by observationId().

Definition at line 133 of file GBTMSObservationFiller.h.

Definition at line 132 of file GBTMSObservationFiller.h.

Referenced by project().

Definition at line 134 of file GBTMSObservationFiller.h.


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