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

GBTMSFeedFiller fills the MSFeed table for GBT fillers. More...

#include <GBTMSFeedFiller.h>

List of all members.

Public Member Functions

 GBTMSFeedFiller ()
 The default ctor.
 GBTMSFeedFiller (MSFeed &msFeed)
 A filler attached to an MSFeed table.
 ~GBTMSFeedFiller ()
void attach (MSFeed &msFeed)
 attach it to an MSFeed
void fill ()
 fill - using the given keys from other tables this implementation always fills just one feed ID (i.e.
Int fill (const GBTFeed &feed, Int sequence)
 Add the feeds found here, reusing the previous sequence number if sequence is >= 0.
Int srFeedId (Int sequence)
 Get the srfeed ID at the indicated sequency in the current set of filled feeds.
void setSRFeedId (Int feedId, Int srFeedId)
 Set the srfeed ID for the indicated FEED_ID.
Bool checkPrior (const GBTFeed &feed, Int sequence)
 Use this prior to calling fill on all feeds to be filled.
void setTime (Double time, Double interval)
 Set the time of the previously filled rows.
Int feedId (Int whichFeed) const
 get the feed id corresponding to physical feed id indicated
Int srfeedId (Int feedId) const
 get the srfeed id corresponding to feedId - feed id is the FEED_ID in the most recently filled block of feed information.
String gbtFeedName (Int feedId) const
 Get the value filled in to the GBT_FEED_NAME column for the indicated FEED_ID value.
Bool hasBeamSwitched () const
 Returns True if any of the filled FEED_IDs are beam-switched pairs.
void setHasBeamSwitched (Bool hasBeamSwitched)
 Set the hasBeamSwitched flag.
void flush ()
 flush the underlying MS subtable

Private Member Functions

void init (MSFeed &msFeed)
 initialize the above for the first time
Int addFeed (Double time, Double interval, const Matrix< Double > &offsets, const Vector< String > &polTypes, const String &feedName, Int srFeedId, const String &trckBeam, const String &rxName, const Vector< String > &rcptrNames)
 add a row with a new feed id given this information return the new feed ID just added.
 GBTMSFeedFiller (const GBTMSFeedFiller &other)
 undefined and unavailable
void operator= (const GBTMSFeedFiller &other)

Private Attributes

MSFeed * itsMSFeed
MSFeedColumns * itsMSFeedCols
SimpleOrderedMap< Int, Int > itsFeedMap
 a map between the feed number in the IF table and feed id here
Int itsLastFeedsStart
 remember where the last filled feed set was
Int itsLastFeedsEnd
Int itsMaxFeedID
ScalarColumn< Int > itsGBTSRFeedCol
ScalarColumn< StringitsGBTFeedNameCol
ScalarColumn< StringitsGBTTrckBeamCol
ScalarColumn< StringitsGBTRxNameCol
ArrayColumn< StringitsGBTRcptrsCol
Vector< Int > itsLastSrfeeds
Bool itsHasBeamSwitched
Bool itsSRFeedSet

Detailed Description

GBTMSFeedFiller fills the MSFeed table for GBT fillers.

Intended use:

Internal

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

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

Synopsis

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

The feedIds are 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 89 of file GBTMSFeedFiller.h.


Constructor & Destructor Documentation

The default ctor.

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

GBTMSFeedFiller::GBTMSFeedFiller ( MSFeed &  msFeed)

A filler attached to an MSFeed table.

GBTMSFeedFiller::GBTMSFeedFiller ( const GBTMSFeedFiller other) [private]

undefined and unavailable


Member Function Documentation

Int GBTMSFeedFiller::addFeed ( Double  time,
Double  interval,
const Matrix< Double > &  offsets,
const Vector< String > &  polTypes,
const String feedName,
Int  srFeedId,
const String trckBeam,
const String rxName,
const Vector< String > &  rcptrNames 
) [private]

add a row with a new feed id given this information return the new feed ID just added.

void GBTMSFeedFiller::attach ( MSFeed &  msFeed)

attach it to an MSFeed

Bool GBTMSFeedFiller::checkPrior ( const GBTFeed feed,
Int  sequence 
)

Use this prior to calling fill on all feeds to be filled.

This checks to see if the previous item at sequence can be reused. If this is false, it also resets the internal feed count anticipating that the subsequent fill will add new rows.

Int GBTMSFeedFiller::feedId ( Int  whichFeed) const

get the feed id corresponding to physical feed id indicated

fill - using the given keys from other tables this implementation always fills just one feed ID (i.e.

FEED_ID == 0 here) TIME and INTERVAL are both 0.0 - there is no time dependence and there is no spectral window dependence. This is only used by the holography filler since as yet there is no IF information filled for that backend and hence no feed information is available. Only one row will ever be filled by this and this should not be used after the other fill method has been used.

Int GBTMSFeedFiller::fill ( const GBTFeed feed,
Int  sequence 
)

Add the feeds found here, reusing the previous sequence number if sequence is >= 0.

sequence is not checked for validity. checkPrior should be used to verify that things can be reused. It should be followed by a call to setTime when the mid-point and interval appropriate for the whole scan are known. return the feed ID just filled

void GBTMSFeedFiller::flush ( ) [inline]

flush the underlying MS subtable

Definition at line 159 of file GBTMSFeedFiller.h.

References itsMSFeed.

String GBTMSFeedFiller::gbtFeedName ( Int  feedId) const

Get the value filled in to the GBT_FEED_NAME column for the indicated FEED_ID value.

Bool GBTMSFeedFiller::hasBeamSwitched ( ) const [inline]

Returns True if any of the filled FEED_IDs are beam-switched pairs.

Definition at line 153 of file GBTMSFeedFiller.h.

References itsHasBeamSwitched.

Referenced by GBTFeedDDFiller::hasBeamSwitched(), and setHasBeamSwitched().

void GBTMSFeedFiller::init ( MSFeed &  msFeed) [private]

initialize the above for the first time

void GBTMSFeedFiller::operator= ( const GBTMSFeedFiller other) [private]
void GBTMSFeedFiller::setHasBeamSwitched ( Bool  hasBeamSwitched) [inline]

Set the hasBeamSwitched flag.

Definition at line 156 of file GBTMSFeedFiller.h.

References hasBeamSwitched(), and itsHasBeamSwitched.

void GBTMSFeedFiller::setSRFeedId ( Int  feedId,
Int  srFeedId 
)

Set the srfeed ID for the indicated FEED_ID.

void GBTMSFeedFiller::setTime ( Double  time,
Double  interval 
)

Set the time of the previously filled rows.

Referenced by GBTFeedDDFiller::setTime().

Int GBTMSFeedFiller::srFeedId ( Int  sequence)

Get the srfeed ID at the indicated sequency in the current set of filled feeds.

Int GBTMSFeedFiller::srfeedId ( Int  feedId) const

get the srfeed id corresponding to feedId - feed id is the FEED_ID in the most recently filled block of feed information.


Member Data Documentation

SimpleOrderedMap<Int, Int> GBTMSFeedFiller::itsFeedMap [private]

a map between the feed number in the IF table and feed id here

Definition at line 166 of file GBTMSFeedFiller.h.

ScalarColumn<String> GBTMSFeedFiller::itsGBTFeedNameCol [private]

Definition at line 173 of file GBTMSFeedFiller.h.

ArrayColumn<String> GBTMSFeedFiller::itsGBTRcptrsCol [private]

Definition at line 174 of file GBTMSFeedFiller.h.

ScalarColumn<String> GBTMSFeedFiller::itsGBTRxNameCol [private]

Definition at line 173 of file GBTMSFeedFiller.h.

ScalarColumn<Int> GBTMSFeedFiller::itsGBTSRFeedCol [private]

Definition at line 172 of file GBTMSFeedFiller.h.

ScalarColumn<String> GBTMSFeedFiller::itsGBTTrckBeamCol [private]

Definition at line 173 of file GBTMSFeedFiller.h.

Definition at line 179 of file GBTMSFeedFiller.h.

Referenced by hasBeamSwitched(), and setHasBeamSwitched().

Definition at line 169 of file GBTMSFeedFiller.h.

remember where the last filled feed set was

Definition at line 169 of file GBTMSFeedFiller.h.

Vector<Int> GBTMSFeedFiller::itsLastSrfeeds [private]

Definition at line 177 of file GBTMSFeedFiller.h.

Definition at line 169 of file GBTMSFeedFiller.h.

MSFeed* GBTMSFeedFiller::itsMSFeed [private]

Definition at line 162 of file GBTMSFeedFiller.h.

Referenced by flush().

MSFeedColumns* GBTMSFeedFiller::itsMSFeedCols [private]

Definition at line 163 of file GBTMSFeedFiller.h.

Definition at line 179 of file GBTMSFeedFiller.h.


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