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

#include <GBTScanLogReader.h>

List of all members.

Public Types

enum  BACKENDS {
  ANY,
  DCR,
  HOLOGRAPHY,
  SP,
  ACS,
  UNKNOWN,
  NUM_BACKENDS
}
 the types of backends More...

Public Member Functions

 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.
Bool reopen (Bool keepPosition=True)
 reopen using the same file
void warn (Bool dowarn=True)
 Toggle the emission of warning messages.
void next ()
 move the pointer to the next group in the log.
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 Stringdcrfile () 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.
const Stringholofile () 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.
const Stringspfile () 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.
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 StringifManagerFile () const
 The name of the IF manager file - there should only be one in a scan.
const GBTGOFileGOFile () const
 The GBTGOFile from the FITS file written by the user interface - there should be only one in a scan.
const GBTLO1FileLO1A () const
 The GBTLO1File for LO1A.
const GBTLO1FileLO1B () const
 The GBTLO1File for LO1B.
const StringantennaFile () const
 The name of the Antenna FITS file - there should be only one in a scan.
const Block< String > & rxCalInfoFiles () const
 The names of any RX_CAL_INFO files.
const GBTStateTablemasterState () const
 The master state table as indicated by the state files in the backend files.
const StringmasterStateBackend () 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.
const TableRecord & primaryKeywords ()
 return the primary keywords associated with the underlying FITSTable
const Stringstarting ()
 return the STARTING line for this scan
const Stringfinished ()
 return the FINISHED line for this scan

Static Public Member Functions

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

Private Member Functions

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 &)
GBTScanLogReaderoperator= (const GBTScanLogReader &)

Private Attributes

File scanLogFile_p
String rootdir_p
FITSTable scanLog_p
MVTime dmjd_p
MVTime nextDmjd_p
MVTime workingDmjd_p
MVTime timeStamp_p
MVTime nextTimeStamp_p
Int scan_p
Int nextScan_p
Int workingScan_p
Int minScan_p
Int maxScan_p
Block< Int > backends_p
Block< Int > nextBackends_p
Block< Int > workingBackends_p
Block< StringbackendFiles_p
Block< StringnextBackendFiles_p
Block< StringworkingBackendFiles_p
Block< StringdapFiles_p
Block< StringnextDapFiles_p
Block< StringworkingDapFiles_p
Block< StringrxCalFiles_p
Block< StringnextRxCalFiles_p
Block< StringworkingRxCalFiles_p
String itsDCRFile
String itsHOLOFile
String itsSPFile
String itsNextDCRFile
String itsNextHOLOFile
String itsNextSPFile
Vector< StringitsACSFiles
Vector< StringitsNextACSFiles
Block< StringallFiles_p
Block< StringnextAllFiles_p
Int backendCount_p
 these counts apply only to the working* blocks.
Int dapCount_p
Int rxCalCount_p
Bool dowarn_p
Int thisStartRow_p
 the rownr corresponding to the start of this scan -1 if nothing started yet
Int nextStartRow_p
 the rownr corresponding to the start of the next scan -1 if nothing started yet
Record * currow_p
RecordFieldPtr< Double > dmjdField_p
RecordFieldPtr< Int > scanField_p
RecordFieldPtr< StringfilePathField_p
RecordFieldPtr< StringdateObsField_p
String ifManagerFile_p
String nextIFManagerFile_p
String antennaFile_p
String nextAntennaFile_p
String startingLine_p
String nextStartingLine_p
String finishedLine_p
String nextFinishedLine_p
GBTStateTable state_p
Bool masterStateSet_p
String stateName_p
GBTGOFile goFile_p
String goFileName_p
String nextGoFileName_p
Bool goFileSet_p
GBTLO1File itsLO1A_p
GBTLO1File itsLO1B_p
String lo1Aname_p
String nextLO1Aname_p
String nextLO1Bname_p
Bool lo1Aset_p
Bool lo1Bset_p
Bool lo1Bchecked_p
String lo1Bname_p
Int itsBaseVer
Int itsDeviceVer

Detailed Description

Intended use:

Internal

 <h3>Review Status</h3><dl><dt>Date Reviewed:<dd>yyyy/mm/dd</dl> 

Prerequisite

Etymology

Synopsis

Example

Motivation

Thrown Exceptions

To Do

Definition at line 90 of file GBTScanLogReader.h.


Member Enumeration Documentation

the types of backends

Enumerator:
ANY 
DCR 
HOLOGRAPHY 
SP 
ACS 
UNKNOWN 
NUM_BACKENDS 

Definition at line 94 of file GBTScanLogReader.h.


Constructor & Destructor Documentation

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

construct this using the indicated ScanLog FITS file

unset and unavailable


Member Function Documentation

const Vector<String>& GBTScanLogReader::acsfiles ( ) const [inline]

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.

Definition at line 177 of file GBTScanLogReader.h.

References itsACSFiles.

const Block<String>& GBTScanLogReader::allFiles ( ) const [inline]

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

Definition at line 228 of file GBTScanLogReader.h.

References allFiles_p, checkLO1Bname(), and lo1Bchecked_p.

const String& GBTScanLogReader::antennaFile ( ) const [inline]

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.

Definition at line 214 of file GBTScanLogReader.h.

References antennaFile_p.

void GBTScanLogReader::attachGO ( ) const [private]

attach the GO file - only done as needed

Referenced by GOFile().

void GBTScanLogReader::attachLO1A ( ) const [private]

attach the LO1A file - only done as needed

Referenced by LO1A().

void GBTScanLogReader::attachLO1B ( ) const [private]

attach the LO1B file - only done as needed

Referenced by LO1B().

void GBTScanLogReader::attachMasterState ( ) const [private]

attach master state table - only done as needed

Referenced by masterState(), and masterStateBackend().

const Block<String>& GBTScanLogReader::backendFiles ( ) const [inline]

The names of the current backend files.

Definition at line 183 of file GBTScanLogReader.h.

References backendFiles_p.

const Block<Int>& GBTScanLogReader::backends ( ) const [inline]

return the list of backend types in this group

Definition at line 180 of file GBTScanLogReader.h.

References backends_p.

void GBTScanLogReader::checkLO1Bname ( ) const [private]

check for the existance of an un-named LO1B file

Referenced by allFiles().

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.

Definition at line 246 of file GBTScanLogReader.h.

References maxscan(), minscan(), next(), and scan().

const Block<String>& GBTScanLogReader::dapFiles ( ) const [inline]

The names of all of the current DAP files.

Definition at line 186 of file GBTScanLogReader.h.

References dapFiles_p.

const String& GBTScanLogReader::dcrfile ( ) const [inline]

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.

Definition at line 158 of file GBTScanLogReader.h.

References itsDCRFile.

void GBTScanLogReader::digestScan ( ) [private]

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

const MVTime& GBTScanLogReader::dmjd ( ) const [inline]

the indicated DMJD

Definition at line 136 of file GBTScanLogReader.h.

References dmjd_p.

void GBTScanLogReader::doScanCheck ( ) [private]

ensure that minScan_p <= maxScan_p

Referenced by setMaxscan(), and setMinscan().

const String& GBTScanLogReader::finished ( ) [inline]

return the FINISHED line for this scan

Definition at line 261 of file GBTScanLogReader.h.

References finishedLine_p.

const GBTGOFile& GBTScanLogReader::GOFile ( ) const [inline]

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.

Definition at line 198 of file GBTScanLogReader.h.

References attachGO(), goFile_p, and goFileSet_p.

const String& GBTScanLogReader::holofile ( ) const [inline]

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.

Definition at line 165 of file GBTScanLogReader.h.

References itsHOLOFile.

const String& GBTScanLogReader::ifManagerFile ( ) const [inline]

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.

Definition at line 192 of file GBTScanLogReader.h.

References ifManagerFile_p.

Bool GBTScanLogReader::init ( Int  startrow = 0) [private]

initialize things after scanLog_p exists

Bool GBTScanLogReader::isValid ( ) [inline]

inquire about the health of the underling table

Definition at line 104 of file GBTScanLogReader.h.

References scanLog_p.

const GBTLO1File& GBTScanLogReader::LO1A ( ) const [inline]

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.

Definition at line 203 of file GBTScanLogReader.h.

References attachLO1A(), itsLO1A_p, and lo1Aset_p.

const GBTLO1File& GBTScanLogReader::LO1B ( ) const [inline]

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.

Definition at line 208 of file GBTScanLogReader.h.

References attachLO1B(), itsLO1B_p, and lo1Bset_p.

const GBTStateTable& GBTScanLogReader::masterState ( ) const [inline]

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.

Definition at line 222 of file GBTScanLogReader.h.

References attachMasterState(), masterStateSet_p, and state_p.

const String& GBTScanLogReader::masterStateBackend ( ) const [inline]

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

Definition at line 225 of file GBTScanLogReader.h.

References attachMasterState(), masterStateSet_p, and stateName_p.

Int GBTScanLogReader::maxscan ( ) const [inline]

return the current maximum scan number

Definition at line 237 of file GBTScanLogReader.h.

References maxScan_p.

Referenced by checkScanNumber(), and setMaxscan().

Int GBTScanLogReader::minscan ( ) const [inline]

return the current minimum scan number

Definition at line 231 of file GBTScanLogReader.h.

References minScan_p.

Referenced by checkScanNumber(), and setMinscan().

Bool GBTScanLogReader::more ( ) const [inline]

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

Definition at line 151 of file GBTScanLogReader.h.

References nextScan_p.

static String GBTScanLogReader::name ( const GBTScanLogReader::BACKENDS  type) [static]

translate a type into a name, all lower case

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

Referenced by checkScanNumber().

const MVTime& GBTScanLogReader::nextTimeStamp ( ) const [inline]

return the next time stamp

Definition at line 144 of file GBTScanLogReader.h.

References nextTimeStamp_p.

GBTScanLogReader& GBTScanLogReader::operator= ( const GBTScanLogReader ) [private]
const TableRecord& GBTScanLogReader::primaryKeywords ( ) [inline]

return the primary keywords associated with the underlying FITSTable

Definition at line 255 of file GBTScanLogReader.h.

References scanLog_p.

Bool GBTScanLogReader::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 GBTScanLogReader::reopen ( Bool  keepPosition = True)

reopen using the same file

const Block<String>& GBTScanLogReader::rxCalInfoFiles ( ) const [inline]

The names of any RX_CAL_INFO files.

Definition at line 217 of file GBTScanLogReader.h.

References rxCalFiles_p.

Int GBTScanLogReader::scan ( ) const [inline]

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

Definition at line 133 of file GBTScanLogReader.h.

References scan_p.

Referenced by checkScanNumber().

void GBTScanLogReader::setMaxscan ( Int  maxscan) [inline]

set the maximum scan number

Definition at line 240 of file GBTScanLogReader.h.

References doScanCheck(), maxscan(), and maxScan_p.

void GBTScanLogReader::setMinscan ( Int  minscan) [inline]

set the minimum scan number

Definition at line 234 of file GBTScanLogReader.h.

References doScanCheck(), minscan(), and minScan_p.

void GBTScanLogReader::setStateTable ( const String fileName) const [private]

set the state table given a file name

const String& GBTScanLogReader::spfile ( ) const [inline]

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.

Definition at line 172 of file GBTScanLogReader.h.

References itsSPFile.

const String& GBTScanLogReader::starting ( ) [inline]

return the STARTING line for this scan

Definition at line 258 of file GBTScanLogReader.h.

References startingLine_p.

const MVTime& GBTScanLogReader::timeStamp ( ) const [inline]

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).

Definition at line 141 of file GBTScanLogReader.h.

References timeStamp_p.

static GBTScanLogReader::BACKENDS GBTScanLogReader::type ( const String name) [static]

translate a string into a backend type

void GBTScanLogReader::warn ( Bool  dowarn = True) [inline]

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.

Definition at line 124 of file GBTScanLogReader.h.

References dowarn_p.


Member Data Documentation

Block<String> GBTScanLogReader::allFiles_p [mutable, private]

Definition at line 283 of file GBTScanLogReader.h.

Referenced by allFiles().

Definition at line 304 of file GBTScanLogReader.h.

Referenced by antennaFile().

these counts apply only to the working* blocks.

Definition at line 287 of file GBTScanLogReader.h.

Definition at line 273 of file GBTScanLogReader.h.

Referenced by backendFiles().

Block<Int> GBTScanLogReader::backends_p [private]

Definition at line 272 of file GBTScanLogReader.h.

Referenced by backends().

Record* GBTScanLogReader::currow_p [private]

Definition at line 298 of file GBTScanLogReader.h.

Definition at line 287 of file GBTScanLogReader.h.

Definition at line 273 of file GBTScanLogReader.h.

Referenced by dapFiles().

RecordFieldPtr<String> GBTScanLogReader::dateObsField_p [private]

Definition at line 302 of file GBTScanLogReader.h.

MVTime GBTScanLogReader::dmjd_p [private]

Definition at line 268 of file GBTScanLogReader.h.

Referenced by dmjd().

RecordFieldPtr<Double> GBTScanLogReader::dmjdField_p [private]

Definition at line 299 of file GBTScanLogReader.h.

Definition at line 289 of file GBTScanLogReader.h.

Referenced by warn().

RecordFieldPtr<String> GBTScanLogReader::filePathField_p [private]

Definition at line 301 of file GBTScanLogReader.h.

Definition at line 308 of file GBTScanLogReader.h.

Referenced by finished().

Definition at line 314 of file GBTScanLogReader.h.

Referenced by GOFile().

Definition at line 315 of file GBTScanLogReader.h.

Bool GBTScanLogReader::goFileSet_p [mutable, private]

Definition at line 316 of file GBTScanLogReader.h.

Referenced by GOFile().

Definition at line 304 of file GBTScanLogReader.h.

Referenced by ifManagerFile().

Definition at line 281 of file GBTScanLogReader.h.

Referenced by acsfiles().

Definition at line 323 of file GBTScanLogReader.h.

Definition at line 278 of file GBTScanLogReader.h.

Referenced by dcrfile().

Definition at line 323 of file GBTScanLogReader.h.

Definition at line 278 of file GBTScanLogReader.h.

Referenced by holofile().

Definition at line 318 of file GBTScanLogReader.h.

Referenced by LO1A().

Definition at line 318 of file GBTScanLogReader.h.

Referenced by LO1B().

Definition at line 281 of file GBTScanLogReader.h.

Definition at line 278 of file GBTScanLogReader.h.

Definition at line 278 of file GBTScanLogReader.h.

Definition at line 278 of file GBTScanLogReader.h.

Definition at line 278 of file GBTScanLogReader.h.

Referenced by spfile().

Definition at line 319 of file GBTScanLogReader.h.

Bool GBTScanLogReader::lo1Aset_p [mutable, private]

Definition at line 320 of file GBTScanLogReader.h.

Referenced by LO1A().

Bool GBTScanLogReader::lo1Bchecked_p [mutable, private]

Definition at line 320 of file GBTScanLogReader.h.

Referenced by allFiles().

Definition at line 321 of file GBTScanLogReader.h.

Bool GBTScanLogReader::lo1Bset_p [mutable, private]

Definition at line 320 of file GBTScanLogReader.h.

Referenced by LO1B().

Bool GBTScanLogReader::masterStateSet_p [mutable, private]

Definition at line 311 of file GBTScanLogReader.h.

Referenced by masterState(), and masterStateBackend().

Definition at line 270 of file GBTScanLogReader.h.

Referenced by maxscan(), and setMaxscan().

Definition at line 270 of file GBTScanLogReader.h.

Referenced by minscan(), and setMinscan().

Definition at line 284 of file GBTScanLogReader.h.

Definition at line 304 of file GBTScanLogReader.h.

Definition at line 273 of file GBTScanLogReader.h.

Block<Int> GBTScanLogReader::nextBackends_p [private]

Definition at line 272 of file GBTScanLogReader.h.

Definition at line 273 of file GBTScanLogReader.h.

MVTime GBTScanLogReader::nextDmjd_p [private]

Definition at line 268 of file GBTScanLogReader.h.

Definition at line 308 of file GBTScanLogReader.h.

Definition at line 315 of file GBTScanLogReader.h.

Definition at line 304 of file GBTScanLogReader.h.

Definition at line 319 of file GBTScanLogReader.h.

Definition at line 319 of file GBTScanLogReader.h.

Definition at line 276 of file GBTScanLogReader.h.

Definition at line 270 of file GBTScanLogReader.h.

Referenced by more().

Definition at line 307 of file GBTScanLogReader.h.

the rownr corresponding to the start of the next scan -1 if nothing started yet

Definition at line 296 of file GBTScanLogReader.h.

Definition at line 268 of file GBTScanLogReader.h.

Referenced by nextTimeStamp().

Definition at line 265 of file GBTScanLogReader.h.

Definition at line 287 of file GBTScanLogReader.h.

Definition at line 276 of file GBTScanLogReader.h.

Referenced by rxCalInfoFiles().

Int GBTScanLogReader::scan_p [private]

Definition at line 270 of file GBTScanLogReader.h.

Referenced by scan().

RecordFieldPtr<Int> GBTScanLogReader::scanField_p [private]

Definition at line 300 of file GBTScanLogReader.h.

FITSTable GBTScanLogReader::scanLog_p [private]

Definition at line 267 of file GBTScanLogReader.h.

Referenced by isValid(), and primaryKeywords().

Definition at line 264 of file GBTScanLogReader.h.

Definition at line 307 of file GBTScanLogReader.h.

Referenced by starting().

Definition at line 310 of file GBTScanLogReader.h.

Referenced by masterState().

Definition at line 312 of file GBTScanLogReader.h.

Referenced by masterStateBackend().

the rownr corresponding to the start of this scan -1 if nothing started yet

Definition at line 293 of file GBTScanLogReader.h.

Definition at line 268 of file GBTScanLogReader.h.

Referenced by timeStamp().

Definition at line 273 of file GBTScanLogReader.h.

Definition at line 272 of file GBTScanLogReader.h.

Definition at line 273 of file GBTScanLogReader.h.

Definition at line 268 of file GBTScanLogReader.h.

Definition at line 276 of file GBTScanLogReader.h.

Definition at line 270 of file GBTScanLogReader.h.


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