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

Used to fill the GBT_type_SAMPLER table (e.g. GBT_DCR_SAMPLER) More...

#include <GBTMSTypeRecFiller.h>

List of all members.

Public Member Functions

 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.
uInt nrow ()
 how many rows in this table
const Stringtype ()
 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

Private Member Functions

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)
GBTMSTypeSampFilleroperator= (const GBTMSTypeSampFiller &other)

Private Attributes

Table * tab_p
TableRow * tabRow_p
ColumnsIndex * index_p
Vector< Int > sampIds_p
Vector< StringhandledCols_p
String type_p

Detailed Description

Used to fill the GBT_type_SAMPLER table (e.g. GBT_DCR_SAMPLER)

Intended use:

Internal

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

Definition at line 83 of file GBTMSTypeRecFiller.h.


Constructor & Destructor Documentation

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

GBTMSTypeSampFiller::GBTMSTypeSampFiller ( Table &  attachTable,
const String type 
)

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

Undefined and unavailable.


Member Function Documentation

void GBTMSTypeSampFiller::checkRecord ( const Record &  row) [private]

this checks the record and adds columns as required

void GBTMSTypeSampFiller::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 GBTMSTypeSampFiller::fillRow ( const Record &  row) [private]

we fill on a row by row basis

void GBTMSTypeSampFiller::flush ( ) [inline]

flush this table

Definition at line 127 of file GBTMSTypeRecFiller.h.

References tab_p.

void GBTMSTypeSampFiller::handleColumn ( const String colname)

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

uInt GBTMSTypeSampFiller::nrow ( ) [inline]

how many rows in this table

Definition at line 107 of file GBTMSTypeRecFiller.h.

References tab_p.

uInt GBTMSTypeSampFiller::nsamplers ( ) [inline]

how many samplers were recently filled

Definition at line 113 of file GBTMSTypeRecFiller.h.

References samplerIds().

GBTMSTypeSampFiller& GBTMSTypeSampFiller::operator= ( const GBTMSTypeSampFiller other) [private]
Int GBTMSTypeSampFiller::samplerId ( Int  whichSamp) [inline]

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

Definition at line 120 of file GBTMSTypeRecFiller.h.

References samplerIds().

const Vector<Int> GBTMSTypeSampFiller::samplerIds ( ) [inline]

what are the most recent sampler Ids filled

Definition at line 116 of file GBTMSTypeRecFiller.h.

References sampIds_p.

Referenced by nsamplers(), and samplerId().

const String& GBTMSTypeSampFiller::type ( ) [inline]

what is the type of this GBT_type_SAMPLER table

Definition at line 110 of file GBTMSTypeRecFiller.h.

References type_p.


Member Data Documentation

Definition at line 135 of file GBTMSTypeRecFiller.h.

ColumnsIndex* GBTMSTypeSampFiller::index_p [private]

Definition at line 132 of file GBTMSTypeRecFiller.h.

Vector<Int> GBTMSTypeSampFiller::sampIds_p [private]

Definition at line 133 of file GBTMSTypeRecFiller.h.

Referenced by samplerIds().

Table* GBTMSTypeSampFiller::tab_p [private]

Definition at line 129 of file GBTMSTypeRecFiller.h.

Referenced by flush(), and nrow().

TableRow* GBTMSTypeSampFiller::tabRow_p [private]

Definition at line 130 of file GBTMSTypeRecFiller.h.

Definition at line 137 of file GBTMSTypeRecFiller.h.

Referenced by type().


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