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

GBTMSSourceFiller fills the MSSource table for GBT fillers. More...

#include <GBTMSSourceFiller.h>

List of all members.

Public Member Functions

 GBTMSSourceFiller ()
 The default ctor.
 GBTMSSourceFiller (MSSource &msSource)
 A filler attached to an MSSource table.
 ~GBTMSSourceFiller ()
void attach (MSSource &msSource)
 attach it to an MSSource
void fill (const Vector< Int > &spectralWindowIds, const String &name, Double restFrequency=0.0, Double sysvel=0.0, const String &code="", Double time=0.0, Double interval=-1, Int calibrationGroup=-1, const Vector< Double > &direction=Vector< Double >(2, 0.0), const Vector< Double > &position=Vector< Double >(3, 0.0))
 fill given the indicated source information and spectral window ID
Int sourceId () const
 What is the most recently filled source ID.
void flush ()
 flush the underlying MS subtable

Private Member Functions

void init (MSSource &msSource)
 initialize the above for the first time
void cleanup ()
 clean things up
 GBTMSSourceFiller (const GBTMSSourceFiller &other)
 undefined and unavailable
void operator= (const GBTMSSourceFiller &other)

Private Attributes

MSSource * msSource_p
MSSourceColumns * msSourceCols_p
Int sourceId_p
 The current Id.
Table * theCache_p
 the table holding the cache, it is temporary
ScalarColumn< Int > calGroupCol_p
 the columns in the cache
ScalarColumn< StringcodeCol_p
ScalarColumn< StringnameCol_p
ScalarColumn< Double > timeCol_p
ScalarColumn< Double > intervalCol_p
ScalarColumn< Double > restFreqCol_p
ScalarColumn< Double > sysvelCol_p
ScalarColumn< Double > dirCol0_p
 the vector cols are stored in the cache as scalar columns so that they can be indexed
ScalarColumn< Double > dirCol1_p
ScalarColumn< Double > posCol0_p
ScalarColumn< Double > posCol1_p
ScalarColumn< Double > posCol2_p
ColumnsIndex * cacheIndx_p
 The ColumnsIndex for the cache.
ColumnsIndex * sourceIndx_p
 ColumnsIndex for the MSSource table.
RecordFieldPtr< Int > calGroupKey_p
 The pointers to the fields in the index key.
RecordFieldPtr< StringcodeKey_p
RecordFieldPtr< StringnameKey_p
RecordFieldPtr< Double > timeKey_p
RecordFieldPtr< Double > intervalKey_p
RecordFieldPtr< Double > restFreqKey_p
RecordFieldPtr< Double > sysvelKey_p
RecordFieldPtr< Double > dirKey0_p
RecordFieldPtr< Double > dirKey1_p
RecordFieldPtr< Double > posKey0_p
RecordFieldPtr< Double > posKey1_p
RecordFieldPtr< Double > posKey2_p
RecordFieldPtr< Int > sourceIdKey_p
RecordFieldPtr< Int > spWinIdKey_p

Detailed Description

GBTMSSourceFiller fills the MSSource table for GBT fillers.

Intended use:

Internal

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

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

Synopsis

This class puts the appropriate values for the GBT in an MSSource table (which has been previously created as part of a MeasurementSet). On each fill() any necessary additions to the MSSource are made. This filler keeps returns a unique ID for each set of source information. Existing information is kept for later indexing. The spectral window ID is used in addition to the source ID to set this information into the appropriate row of the MSSource table.

The sourceId 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 97 of file GBTMSSourceFiller.h.


Constructor & Destructor Documentation

The default ctor.

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

GBTMSSourceFiller::GBTMSSourceFiller ( MSSource &  msSource)

A filler attached to an MSSource table.

undefined and unavailable


Member Function Documentation

void GBTMSSourceFiller::attach ( MSSource &  msSource)

attach it to an MSSource

void GBTMSSourceFiller::cleanup ( ) [private]

clean things up

void GBTMSSourceFiller::fill ( const Vector< Int > &  spectralWindowIds,
const String name,
Double  restFrequency = 0.0,
Double  sysvel = 0.0,
const String code = "",
Double  time = 0.0,
Double  interval = -1,
Int  calibrationGroup = -1,
const Vector< Double > &  direction = Vector< Double >(2, 0.0),
const Vector< Double > &  position = Vector< Double >(3, 0.0) 
)

fill given the indicated source information and spectral window ID

void GBTMSSourceFiller::flush ( ) [inline]

flush the underlying MS subtable

Definition at line 128 of file GBTMSSourceFiller.h.

References msSource_p.

void GBTMSSourceFiller::init ( MSSource &  msSource) [private]

initialize the above for the first time

void GBTMSSourceFiller::operator= ( const GBTMSSourceFiller other) [private]
Int GBTMSSourceFiller::sourceId ( ) const [inline]

What is the most recently filled source ID.

Returns -1 if none have been filled.

Definition at line 125 of file GBTMSSourceFiller.h.

References sourceId_p.


Member Data Documentation

ColumnsIndex* GBTMSSourceFiller::cacheIndx_p [private]

The ColumnsIndex for the cache.

Definition at line 148 of file GBTMSSourceFiller.h.

ScalarColumn<Int> GBTMSSourceFiller::calGroupCol_p [private]

the columns in the cache

Definition at line 141 of file GBTMSSourceFiller.h.

RecordFieldPtr<Int> GBTMSSourceFiller::calGroupKey_p [private]

The pointers to the fields in the index key.

Definition at line 153 of file GBTMSSourceFiller.h.

ScalarColumn<String> GBTMSSourceFiller::codeCol_p [private]

Definition at line 142 of file GBTMSSourceFiller.h.

RecordFieldPtr<String> GBTMSSourceFiller::codeKey_p [private]

Definition at line 154 of file GBTMSSourceFiller.h.

ScalarColumn<Double> GBTMSSourceFiller::dirCol0_p [private]

the vector cols are stored in the cache as scalar columns so that they can be indexed

Definition at line 145 of file GBTMSSourceFiller.h.

ScalarColumn<Double> GBTMSSourceFiller::dirCol1_p [private]

Definition at line 145 of file GBTMSSourceFiller.h.

RecordFieldPtr<Double> GBTMSSourceFiller::dirKey0_p [private]

Definition at line 156 of file GBTMSSourceFiller.h.

RecordFieldPtr<Double> GBTMSSourceFiller::dirKey1_p [private]

Definition at line 156 of file GBTMSSourceFiller.h.

ScalarColumn<Double> GBTMSSourceFiller::intervalCol_p [private]

Definition at line 143 of file GBTMSSourceFiller.h.

RecordFieldPtr<Double> GBTMSSourceFiller::intervalKey_p [private]

Definition at line 155 of file GBTMSSourceFiller.h.

MSSource* GBTMSSourceFiller::msSource_p [private]

Definition at line 131 of file GBTMSSourceFiller.h.

Referenced by flush().

MSSourceColumns* GBTMSSourceFiller::msSourceCols_p [private]

Definition at line 132 of file GBTMSSourceFiller.h.

ScalarColumn<String> GBTMSSourceFiller::nameCol_p [private]

Definition at line 142 of file GBTMSSourceFiller.h.

RecordFieldPtr<String> GBTMSSourceFiller::nameKey_p [private]

Definition at line 154 of file GBTMSSourceFiller.h.

ScalarColumn<Double> GBTMSSourceFiller::posCol0_p [private]

Definition at line 145 of file GBTMSSourceFiller.h.

ScalarColumn<Double> GBTMSSourceFiller::posCol1_p [private]

Definition at line 145 of file GBTMSSourceFiller.h.

ScalarColumn<Double> GBTMSSourceFiller::posCol2_p [private]

Definition at line 145 of file GBTMSSourceFiller.h.

RecordFieldPtr<Double> GBTMSSourceFiller::posKey0_p [private]

Definition at line 156 of file GBTMSSourceFiller.h.

RecordFieldPtr<Double> GBTMSSourceFiller::posKey1_p [private]

Definition at line 156 of file GBTMSSourceFiller.h.

RecordFieldPtr<Double> GBTMSSourceFiller::posKey2_p [private]

Definition at line 156 of file GBTMSSourceFiller.h.

ScalarColumn<Double> GBTMSSourceFiller::restFreqCol_p [private]

Definition at line 143 of file GBTMSSourceFiller.h.

RecordFieldPtr<Double> GBTMSSourceFiller::restFreqKey_p [private]

Definition at line 155 of file GBTMSSourceFiller.h.

The current Id.

Definition at line 135 of file GBTMSSourceFiller.h.

Referenced by sourceId().

RecordFieldPtr<Int> GBTMSSourceFiller::sourceIdKey_p [private]

Definition at line 158 of file GBTMSSourceFiller.h.

ColumnsIndex* GBTMSSourceFiller::sourceIndx_p [private]

ColumnsIndex for the MSSource table.

Definition at line 150 of file GBTMSSourceFiller.h.

RecordFieldPtr<Int> GBTMSSourceFiller::spWinIdKey_p [private]

Definition at line 158 of file GBTMSSourceFiller.h.

ScalarColumn<Double> GBTMSSourceFiller::sysvelCol_p [private]

Definition at line 143 of file GBTMSSourceFiller.h.

RecordFieldPtr<Double> GBTMSSourceFiller::sysvelKey_p [private]

Definition at line 155 of file GBTMSSourceFiller.h.

the table holding the cache, it is temporary

Definition at line 138 of file GBTMSSourceFiller.h.

ScalarColumn<Double> GBTMSSourceFiller::timeCol_p [private]

Definition at line 143 of file GBTMSSourceFiller.h.

RecordFieldPtr<Double> GBTMSSourceFiller::timeKey_p [private]

Definition at line 155 of file GBTMSSourceFiller.h.


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