casa
$Rev:20696$
|
Used to fill the GBT_type_[MASTER]STATE table (e.g. GBT_DCR_STATE) More...
#include <GBTMSTypeStateFiller.h>
Public Member Functions | |
GBTMSTypeStateFiller (const String &tableName) | |
open an already existing table - type is extracted from the tableName using everything before the last "_[MASTER]STATE" to the previous "_" | |
GBTMSTypeStateFiller (Table &attachTable, const String &type, Bool masterState=False) | |
create a new, empty table attached to the given table using the indicate typeState. | |
~GBTMSTypeStateFiller () | |
void | fill (const Table &other) |
Fill the indicated table to this table. | |
uInt | nrow () |
how many rows in this table | |
const String & | type () |
what is the type of this GBT_type_STATE table | |
uInt | nstates () |
how many states were recently filled | |
const Vector< Int > | stateIds () |
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 | |
void | flush () |
flush this table | |
Private Member Functions | |
void | updateTableRow () |
void | updateIndex (const Vector< String > &colNames) |
void | fillRow (const Record &row) |
we fill on a row by row basis | |
void | checkRecord (const Record &row, const Vector< String > &fieldNames) |
this checks the record and adds columns as required | |
GBTMSTypeStateFiller () | |
Undefined and unavailable. | |
GBTMSTypeStateFiller (const GBTMSTypeStateFiller &other) | |
GBTMSTypeStateFiller & | operator= (const GBTMSTypeStateFiller &other) |
Private Attributes | |
Table * | tab_p |
TableRow * | tabRow_p |
ColumnsIndex * | index_p |
Vector< Int > | stateIds_p |
String | type_p |
Bool | typesDiffer_p |
Used to fill the GBT_type_[MASTER]STATE table (e.g. GBT_DCR_STATE)
Internal
The PROCESSOR
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.
Definition at line 86 of file GBTMSTypeStateFiller.h.
GBTMSTypeStateFiller::GBTMSTypeStateFiller | ( | const String & | tableName | ) |
open an already existing table - type is extracted from the tableName using everything before the last "_[MASTER]STATE" to the previous "_"
GBTMSTypeStateFiller::GBTMSTypeStateFiller | ( | Table & | attachTable, |
const String & | type, | ||
Bool | masterState = False |
||
) |
create a new, empty table attached to the given table using the indicate typeState.
Make this a MASTERSTATE table if requested.
GBTMSTypeStateFiller::GBTMSTypeStateFiller | ( | ) | [private] |
Undefined and unavailable.
GBTMSTypeStateFiller::GBTMSTypeStateFiller | ( | const GBTMSTypeStateFiller & | other | ) | [private] |
void GBTMSTypeStateFiller::checkRecord | ( | const Record & | row, |
const Vector< String > & | fieldNames | ||
) | [private] |
this checks the record and adds columns as required
void GBTMSTypeStateFiller::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.
void GBTMSTypeStateFiller::fillRow | ( | const Record & | row | ) | [private] |
we fill on a row by row basis
void GBTMSTypeStateFiller::flush | ( | ) | [inline] |
uInt GBTMSTypeStateFiller::nrow | ( | ) | [inline] |
how many rows in this table
Definition at line 111 of file GBTMSTypeStateFiller.h.
References tab_p.
uInt GBTMSTypeStateFiller::nstates | ( | ) | [inline] |
how many states were recently filled
Definition at line 117 of file GBTMSTypeStateFiller.h.
References stateIds().
GBTMSTypeStateFiller& GBTMSTypeStateFiller::operator= | ( | const GBTMSTypeStateFiller & | other | ) | [private] |
Int GBTMSTypeStateFiller::stateId | ( | Int | whichState | ) | [inline] |
return the stateId for a particular row in the table which was most recently used in a call to fill
Definition at line 124 of file GBTMSTypeStateFiller.h.
References stateIds().
const Vector<Int> GBTMSTypeStateFiller::stateIds | ( | ) | [inline] |
what are the most recent stateIds filled
Definition at line 120 of file GBTMSTypeStateFiller.h.
References stateIds_p.
const String& GBTMSTypeStateFiller::type | ( | ) | [inline] |
what is the type of this GBT_type_STATE table
Definition at line 114 of file GBTMSTypeStateFiller.h.
References type_p.
void GBTMSTypeStateFiller::updateIndex | ( | const Vector< String > & | colNames | ) | [private] |
void GBTMSTypeStateFiller::updateTableRow | ( | ) | [private] |
ColumnsIndex* GBTMSTypeStateFiller::index_p [private] |
Definition at line 132 of file GBTMSTypeStateFiller.h.
Vector<Int> GBTMSTypeStateFiller::stateIds_p [private] |
Definition at line 133 of file GBTMSTypeStateFiller.h.
Referenced by stateIds().
Table* GBTMSTypeStateFiller::tab_p [private] |
Definition at line 129 of file GBTMSTypeStateFiller.h.
TableRow* GBTMSTypeStateFiller::tabRow_p [private] |
Definition at line 130 of file GBTMSTypeStateFiller.h.
String GBTMSTypeStateFiller::type_p [private] |
Definition at line 135 of file GBTMSTypeStateFiller.h.
Referenced by type().
Bool GBTMSTypeStateFiller::typesDiffer_p [private] |
Definition at line 137 of file GBTMSTypeStateFiller.h.