casa
$Rev:20696$
|
GBTMSObservationFiller fills the MSObservation table for GBT fillers. More...
#include <GBTMSObservationFiller.h>
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 ×tamp, 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 String & | project () 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 |
GBTMSObservationFiller fills the MSObservation table for GBT fillers.
Internal
This class puts GBT data (fills) into the MSObservation table.
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.
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.
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.
GBTMSObservationFiller::GBTMSObservationFiller | ( | const GBTMSObservationFiller & | other | ) | [private] |
undefined and unavailable
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.
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().
Int GBTMSObservationFiller::observationId_p [private] |
Definition at line 131 of file GBTMSObservationFiller.h.
Referenced by observationId().
String GBTMSObservationFiller::observer_p [private] |
Definition at line 133 of file GBTMSObservationFiller.h.
String GBTMSObservationFiller::project_p [private] |
Definition at line 132 of file GBTMSObservationFiller.h.
Referenced by project().
String GBTMSObservationFiller::telescope_p [private] |
Definition at line 134 of file GBTMSObservationFiller.h.