GBTScanLogReader.h

Classes

GBTScanLogReader -- (full description)

class GBTScanLogReader

Types

enum BACKENDS

ANY = 0
DCR
HOLOGRAPHY
SP
ACS
UNKNOWN

Interface

Public Members
GBTScanLogReader(const File& scanlog, Int minscan=-1, Int maxscan=LONG_MAX)
~GBTScanLogReader()
Bool isValid()
Bool reopen(const File &scanlog, Bool keepPosition=True)
Bool reopen(Bool keepPosition=True)
void warn(Bool dowarn = True)
void next()
Int scan() const
const MVTime &dmjd() const
const MVTime &timeStamp() const
const MVTime &nextTimeStamp() const
Bool more() const
const String &dcrfile() const
const String &holofile() const
const String &spfile() const
const Vector<String> &acsfiles() const
const Block<Int>& backends() const
const Block<String>& backendFiles() const
const Block<String>& dapFiles() const
const String &ifManagerFile() const
const GBTGOFile &GOFile() const
const GBTLO1File &LO1A() const
const GBTLO1File &LO1B() const
const String &antennaFile() const
const Block<String> &rxCalInfoFiles() const
const GBTStateTable &masterState() const
const String &masterStateBackend() const
const Block<String> &allFiles() const
Int minscan() const
void setMinscan(Int minscan)
Int maxscan() const
void setMaxscan(Int maxscan)
void checkScanNumber()
static GBTScanLogReader::BACKENDS type(const String &name)
static String name(const GBTScanLogReader::BACKENDS type)
const TableRecord &primaryKeywords()
const String &starting()
const String &finished()
Private Members
Bool init(Int startrow=0)
void digestScan()
void setStateTable(const String &fileName) const
void doScanCheck()
void attachGO() const
void attachLO1A() const
void attachLO1B() const
void checkLO1Bname() const
void attachMasterState() const
GBTScanLogReader()
GBTScanLogReader(const GBTScanLogReader &)
GBTScanLogReader &operator=(const GBTScanLogReader &)

Description

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

Synopsis

Example

Motivation

Thrown Exceptions

To Do

Member Description

enum BACKENDS

the types of backends

GBTScanLogReader(const File& scanlog, Int minscan=-1, Int maxscan=LONG_MAX)

construct this using the indicated ScanLog FITS file

~GBTScanLogReader()

Bool isValid()

inquire about the health of the underling table

Bool reopen(const File &scanlog, Bool keepPosition=True)

reopen using the given file. If scanlog is the same file then it will be repositioned at the same current position (same scan) as it currently is if keepPosition is True. This assumes that nothing in the scanlog has changed up until that point. If scanlog is a different file or if keepPosition is False, then this resets everything to the state it would have been immediately after construction using the given scanlog.

Bool reopen(Bool keepPosition=True)

reopen using the same file

void warn(Bool dowarn = True)

Toggle the emission of warning messages. This object starts off initially being silent (no warning messages) regarding missing files or scans without backends. This is desirable so that warnings aren't issued until real data is seen to arrive and a fill is started.

void next()

move the pointer to the next group in the log. When next has been called and the file is at the end, the scan number will be < 0

Int scan() const

the current scan number, this will be negative if the file is empty

const MVTime &dmjd() const

the indicated DMJD

const MVTime &timeStamp() const

The timestamp from the file names (uses the backend file file name, which should be consistent with the others, although there is no consistency check here).

const MVTime &nextTimeStamp() const

return the next time stamp

Bool more() const

are there more groups (T) or is this pointed at the end (F)

const String &dcrfile() const

return the name of the DCR backend FITS file in this scan This string has zero length if there is no DCR data in this scan. There should never be more than one DCR file in a scan but if there is, a warning is issued and the last one seen is used.

const String &holofile() const

return the name of the HOLO backend FITS file in this scan This string has zero length if there is no HOLO data in this scan. There should never be more than one HOLO file in a scan but if there is, a warning is issued and the last one seen is used.

const String &spfile() const

return the name of the SP backend FITS file in this scan This string has zero length if there is no SP data in this scan. There should never be more than one SP file in a scan but if there is, a warning is issued and the last one seen is used.

const Vector<String> &acsfiles() const

return the names of the ACS backend FITS file in this scan This vector has zero elements if there are no ACS files in thie scan.

const Block<Int>& backends() const

return the list of backend types in this group

const Block<String>& backendFiles() const

The names of the current backend files

const Block<String>& dapFiles() const

The names of all of the current DAP files

const String &ifManagerFile() const

The name of the IF manager file - there should only be one in a scan. When more than one is seen, the first seen is used and a warning message is sent to the logger. If no IF manager file is present in the scan, this string will be empty.

const GBTGOFile &GOFile() const

The GBTGOFile from the FITS file written by the user interface - there should be only one in a scan. When more than one is seen, the first is used and a warning message is sent to the logger. If no user FITS file is present in the scan, this GBTGOFile will not be attached.

const GBTLO1File &LO1A() const

The GBTLO1File for LO1A. There should be only one in a scan. When more than one is seen, the first is used and a warning message is sent to the logger. If no LO1A file is seen, then this GBTLO1File will not be attached.

const GBTLO1File &LO1B() const

The GBTLO1File for LO1B. There should be only one in a scan. When more than one is seen, the first is used and a warning message is sent to the logger. If no LO1B is seen, then this GBTLO1File will not be attached.

const String &antennaFile() const

The name of the Antenna FITS file - there should be only one in a scan. When more than one is seen, the first seen is used and a warning message is sent to the logger. If no Antenna file is present in the scan, this string will be empty.

const Block<String> &rxCalInfoFiles() const

The names of any RX_CAL_INFO files

const GBTStateTable &masterState() const

The master state table as indicated by the state files in the backend files. The first state file found indicating where the master is will be believed. If no master is indicated, this table will be null.

const String &masterStateBackend() const

The name of the backend file from which the master state came.

const Block<String> &allFiles() const

return the names of all of the files associated with this scan

Int minscan() const

return the current minimum scan number

void setMinscan(Int minscan)

set the minimum scan number

Int maxscan() const

return the current maximum scan number

void setMaxscan(Int maxscan)

set the maximum scan number

void checkScanNumber()

recheck and possible reset the current scan to ensure it lies between minscan and maxscan. Necessary because setting minscan and maxscan involves two calls. This should be done after min and max scan have been set.

static GBTScanLogReader::BACKENDS type(const String &name)

translate a string into a backend type

static String name(const GBTScanLogReader::BACKENDS type)

translate a type into a name, all lower case

const TableRecord &primaryKeywords()

return the primary keywords associated with the underlying FITSTable

const String &starting()

return the STARTING line for this scan

const String &finished()

return the FINISHED line for this scan

Bool init(Int startrow=0)

initialize things after scanLog_p exists

void digestScan()

this is the thing which actually fills out all of the information

void setStateTable(const String &fileName) const

set the state table given a file name

void doScanCheck()

ensure that minScan_p <= maxScan_p

void attachGO() const

attach the GO file - only done as needed

void attachLO1A() const

attach the LO1A file - only done as needed

void attachLO1B() const

attach the LO1B file - only done as needed

void checkLO1Bname() const

check for the existance of an un-named LO1B file

void attachMasterState() const

attach master state table - only done as needed

GBTScanLogReader()

unset and unavailable

GBTScanLogReader(const GBTScanLogReader &)

GBTScanLogReader &operator=(const GBTScanLogReader &)