GBTDAPFillerBase.h

Classes

GBTDAPFillerBase -- A base class for GBT Data Associated Parameter fillers (full description)

class GBTDAPFillerBase

Interface

Public Members
virtual ~GBTDAPFillerBase()
virtual const String &device() const = 0
virtual void fill() = 0
virtual Int prepare(const String &fileName, const String &manager, const String &sampler, const MVTime &startTime)
static Bool parseName(const String &fileName, String &device, String &manager, String &sampler)
Protected Members
GBTDAPFillerBase()
GBTDAPFillerBase(const GBTDAPFillerBase &other)
GBTDAPFillerBase &operator=(const GBTDAPFillerBase &other)
Int rowsToFill()
Int currentId()
const Record &currentRow()
const String &currentSampler()
const String &currentManager()
Double currentInterval()
const MVTime &currentTime()
void next()
TableDesc tableDesc(Int whichId)
const Record &dapRecord(Int whichId)
Private Members
MVTime minTime() const

Description

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

Member Description

virtual ~GBTDAPFillerBase()

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

virtual const String &device() 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. The return value is the ID of this sampler/manager combo. A negative return value indicates a problem.

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

GBTDAPFillerBase()

(Required) default constructor

GBTDAPFillerBase(const GBTDAPFillerBase &other)

(Required) copy constructor.

GBTDAPFillerBase &operator=(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 String &currentSampler()

return the current sampler

const String &currentManager()

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

MVTime minTime() const

find the minimum currentTime from the known DAP files