GBTMSTypeRecFiller.h

Classes

GBTMSTypeSampFiller -- Used to fill the GBT_type_SAMPLER table (e.g. GBT_DCR_SAMPLER) (full description)

class GBTMSTypeSampFiller

Interface

Public Members
GBTMSTypeSampFiller(const String &tableName)
GBTMSTypeSampFiller(Table &attachTable, const String &type)
~GBTMSTypeSampFiller()
void fill(const Table &other)
uInt nrow()
const String &type()
uInt nsamplers()
const Vector<Int> samplerIds()
Int samplerId(Int whichSamp)
void handleColumn(const String &colname)
void flush()
Private Members
void updateTableRow()
void updateIndex()
void fillRow(const Record &row)
void checkRecord(const Record &row)
GBTMSTypeSampFiller()
GBTMSTypeSampFiller(const GBTMSTypeSampFiller &other)
GBTMSTypeSampFiller &operator=(const GBTMSTypeSampFiller &other)

Description

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

The PROCESSOR

Synopsis

Example

Motivation

Several GBT backends have a SAMPLER 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 samplers 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.

To Do

Member Description

GBTMSTypeSampFiller(const String &tableName)

open an already existing table - type is extracted from the tableName using everything before the last "_SAMPLER" to the previous "_"

GBTMSTypeSampFiller(Table &attachTable, const String &type)

create a new, empty table attached to the given table using the indicate typeSamp.

~GBTMSTypeSampFiller()

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.

uInt nrow()

how many rows in this table

const String &type()

what is the type of this GBT_type_SAMPLER table

uInt nsamplers()

how many samplers were recently filled

const Vector<Int> samplerIds()

what are the most recent sampler Ids filled

Int samplerId(Int whichSamp)

return the sampler Id for a particular row in the table which was most recently used in a call to fill

void handleColumn(const String &colname)

mark the column of the given name as handled - there is no check to see if that column exists

void flush()

flush this table

void updateTableRow()

void updateIndex()

void fillRow(const Record &row)

we fill on a row by row basis

void checkRecord(const Record &row)

this checks the record and adds columns as required

GBTMSTypeSampFiller()

Undefined and unavailable

GBTMSTypeSampFiller(const GBTMSTypeSampFiller &other)

GBTMSTypeSampFiller &operator=(const GBTMSTypeSampFiller &other)