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

A base class for GBT Data Associated Parameter fillers. More...

#include <GBTDAPFillerBase.h>

Inheritance diagram for GBTDAPFillerBase:
GBTDAPFiller GBTMSWeatherFiller GBTAntennaDAPFiller GBTLO1DAPFiller

List of all members.

Public Member Functions

virtual ~GBTDAPFillerBase ()
 A virtual destructor is needed so that it will use the actual destructor in the derived class.
virtual const Stringdevice () const =0
 report the device name
virtual void fill ()=0
 this should do what it can to fill the data
virtual Int prepare (const String &fileName, const String &manager, const String &sampler, const MVTime &startTime)
 prepare the filler to use the indicated manager, sampler, and filename starting with the given startTime.

Static Public Member Functions

static Bool parseName (const String &fileName, String &device, String &manager, String &sampler)
 A useful function to decode a filename into a device, manager, and sampler.

Protected Member Functions

 GBTDAPFillerBase ()
 (Required) default constructor
 GBTDAPFillerBase (const GBTDAPFillerBase &other)
 (Required) copy constructor.
GBTDAPFillerBaseoperator= (const GBTDAPFillerBase &other)
 (Required) copy assignment.
Int rowsToFill ()
 how many rows are ready to be filled
Int currentId ()
 Get the ID of the DAP holding the current row waiting to be filled.
const Record & currentRow ()
 return the current row waiting to be filled
const StringcurrentSampler ()
 return the current sampler
const StringcurrentManager ()
 return the current manager
Double currentInterval ()
 return the current interval
const MVTime & currentTime ()
 return the current time
void next ()
 advance to the next row to be filled - this decrements rowsToFill by 1 when rowsToFill reaches zero, next() has no effect
TableDesc tableDesc (Int whichId)
 get the TableDesc of the indicated sampler/manager ID - the value returned by prepare
const Record & dapRecord (Int whichId)
 get the currentRow of the indicated sampler/manager ID - the value returned by prepare

Private Member Functions

MVTime minTime () const
 find the minimum currentTime from the known DAP files

Private Attributes

Int rowsToFill_p
 how man rows are ready to be filled
SimpleOrderedMap< String, Int > dapmap_p
 this maps the manager+sampler string to an integer
PtrBlock< GBTDAPFile * > dapblock_p
 this is where the DAPs for each manager+sampler string are held
Block< Int > readyToFill_p
 This indicates that a particular DAP file is ready to fill This is set to True on a successfull prepare and set to False when filled.
uInt ndap_p
 how many active DAPs do we have
Int currentPtr_p
 which one is the next row waiting to be filled
MVTime ctime_p
Record emptyRecord_p
 and empty record, to be returned as needed
String emptyString_p

Detailed Description

A base class for GBT Data Associated Parameter fillers.

Intended use:

Internal

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

This provides the underlying mechanisms for filling GBT DAP FITS files from the same device but many different samplers and managers.

Synopsis

Example

Motivation

Various DAP fillers share their handling of the FITS files.

Thrown Exceptions

Definition at line 80 of file GBTDAPFillerBase.h.


Constructor & Destructor Documentation

virtual GBTDAPFillerBase::~GBTDAPFillerBase ( ) [virtual]

A virtual destructor is needed so that it will use the actual destructor in the derived class.

(Required) default constructor

GBTDAPFillerBase::GBTDAPFillerBase ( const GBTDAPFillerBase other) [protected]

(Required) copy constructor.


Member Function Documentation

Int GBTDAPFillerBase::currentId ( ) [protected]

Get the ID of the DAP holding the current row waiting to be filled.

Double GBTDAPFillerBase::currentInterval ( ) [protected]

return the current interval

const String& GBTDAPFillerBase::currentManager ( ) [protected]

return the current manager

const Record& GBTDAPFillerBase::currentRow ( ) [protected]

return the current row waiting to be filled

const String& GBTDAPFillerBase::currentSampler ( ) [protected]

return the current sampler

const MVTime& GBTDAPFillerBase::currentTime ( ) [inline, protected]

return the current time

Definition at line 132 of file GBTDAPFillerBase.h.

References ctime_p.

const Record& GBTDAPFillerBase::dapRecord ( Int  whichId) [inline, protected]

get the currentRow of the indicated sampler/manager ID - the value returned by prepare

Definition at line 144 of file GBTDAPFillerBase.h.

References dapblock_p.

virtual const String& GBTDAPFillerBase::device ( ) const [pure virtual]

report the device name

Implemented in GBTMSWeatherFiller, and GBTDAPFiller.

virtual void GBTDAPFillerBase::fill ( ) [pure virtual]

this should do what it can to fill the data

Implemented in GBTMSWeatherFiller, GBTDAPFiller, GBTLO1DAPFiller, and GBTAntennaDAPFiller.

MVTime GBTDAPFillerBase::minTime ( ) const [private]

find the minimum currentTime from the known DAP files

void GBTDAPFillerBase::next ( ) [protected]

advance to the next row to be filled - this decrements rowsToFill by 1 when rowsToFill reaches zero, next() has no effect

GBTDAPFillerBase& GBTDAPFillerBase::operator= ( const GBTDAPFillerBase other) [protected]

(Required) copy assignment.

static Bool GBTDAPFillerBase::parseName ( const String fileName,
String device,
String manager,
String sampler 
) [static]

A useful function to decode a filename into a device, manager, and sampler.

virtual Int GBTDAPFillerBase::prepare ( const String fileName,
const String manager,
const String sampler,
const MVTime &  startTime 
) [virtual]

prepare the filler to use the indicated manager, sampler, and filename starting with the given startTime.

The return value is the ID of this sampler/manager combo. A negative return value indicates a problem.

Reimplemented in GBTMSWeatherFiller, GBTDAPFiller, GBTLO1DAPFiller, and GBTAntennaDAPFiller.

Int GBTDAPFillerBase::rowsToFill ( ) [inline, protected]

how many rows are ready to be filled

Definition at line 114 of file GBTDAPFillerBase.h.

References rowsToFill_p.

TableDesc GBTDAPFillerBase::tableDesc ( Int  whichId) [inline, protected]

get the TableDesc of the indicated sampler/manager ID - the value returned by prepare

Definition at line 140 of file GBTDAPFillerBase.h.

References dapblock_p.


Member Data Documentation

MVTime GBTDAPFillerBase::ctime_p [private]

Definition at line 165 of file GBTDAPFillerBase.h.

Referenced by currentTime().

which one is the next row waiting to be filled

Definition at line 164 of file GBTDAPFillerBase.h.

this is where the DAPs for each manager+sampler string are held

Definition at line 154 of file GBTDAPFillerBase.h.

Referenced by dapRecord(), and tableDesc().

SimpleOrderedMap<String, Int> GBTDAPFillerBase::dapmap_p [private]

this maps the manager+sampler string to an integer

Definition at line 151 of file GBTDAPFillerBase.h.

and empty record, to be returned as needed

Definition at line 168 of file GBTDAPFillerBase.h.

Definition at line 169 of file GBTDAPFillerBase.h.

uInt GBTDAPFillerBase::ndap_p [private]

how many active DAPs do we have

Reimplemented in GBTMSWeatherFiller, and GBTDAPFiller.

Definition at line 161 of file GBTDAPFillerBase.h.

Block<Int> GBTDAPFillerBase::readyToFill_p [private]

This indicates that a particular DAP file is ready to fill This is set to True on a successfull prepare and set to False when filled.

Definition at line 158 of file GBTDAPFillerBase.h.

how man rows are ready to be filled

Definition at line 148 of file GBTDAPFillerBase.h.

Referenced by rowsToFill().


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