GBTMSTypeStateFiller.h
Classes
- GBTMSTypeStateFiller -- Used to fill the GBT_type_[MASTER]STATE table (e.g. GBT_DCR_STATE) (full description)
Interface
- Public Members
- GBTMSTypeStateFiller(const String &tableName)
- GBTMSTypeStateFiller(Table &attachTable, const String &type, Bool masterState = False)
- ~GBTMSTypeStateFiller()
- void fill(const Table &other)
- uInt nrow()
- const String &type()
- uInt nstates()
- const Vector<Int> stateIds()
- Int stateId(Int whichState)
- void flush()
- Private Members
- void updateTableRow()
- void updateIndex(const Vector<String> &colNames)
- void fillRow(const Record &row)
- void checkRecord(const Record &row, const Vector<String> &fieldNames)
- GBTMSTypeStateFiller()
- GBTMSTypeStateFiller(const GBTMSTypeStateFiller &other)
- GBTMSTypeStateFiller &operator=(const GBTMSTypeStateFiller &other)
Review Status
- Date Reviewed:
- yyyy/mm/dd
Prerequisite
Etymology
The PROCESSOR
Synopsis
Example
Motivation
Several GBT backends have a STATE table associated with each scan.
These tables are often very much the same from scan to scan and
there are a limited number of different STATEs which a user will
typically choose. Hence it makes sense to have these be simply
indexed by row number and to re-use rows in the filled MS table
when possible. There is a master state table associated with
each scan because only one backend can control (be master of) the
switching states. That state table is stored in as
GBT_type_MASTERSTATE when available.
To Do
- the GBTMSType*Filler classes need to share a base class.
Member Description
open an already existing table - type is extracted from the tableName
using everything before the last "_[MASTER]STATE" to the previous "_"
create a new, empty table attached to the given table using the
indicate typeState. Make this a MASTERSTATE table if requested.
void fill(const Table &other)
Fill the indicated table to this table.
Each column in other maps to a column in the
this table. The type
of the columns must match that in the existing table.
Columns not already in this table will result in new
columns. If there are only scalar columns, then new rows
will only be added if this row does not already exist in the table.
If there are any non-scalar columns, a new row is always added.
how many rows in this table
what is the type of this GBT_type_STATE table
how many states were recently filled
what are the most recent stateIds filled
Int stateId(Int whichState)
return the stateId for a particular row in the table which was
most recently used in a call to fill
flush this table
we fill on a row by row basis
this checks the record and adds columns as required
Undefined and unavailable
GBTMSTypeStateFiller &operator=(const GBTMSTypeStateFiller &other)