GBTSimpleTable.h

Classes

GBTSimpleTable -- Used to concatenate simple GBT tables. (full description)

class GBTSimpleTable

Interface

Public Members
GBTSimpleTable(const String &tableName, const String &indexColumn=String(""))
GBTSimpleTable(Table &attachTable, const String &attachKeywordName, const String &tableName, const String &indexColumn=String(""))
~GBTSimpleTable()
void add(const Table &other)
void add(const RecordInterface &other, Bool nextIndex=True)
uInt nrow()
const Int index()
const Table &table()
void flush()
Private Members
void updateTableRow()
void checkRecord(const RecordInterface &other)
void attachIndexCol(const String &indexColumn)
void setIndex(Int rownr, Bool nextIndex=True)
GBTSimpleTable()
GBTSimpleTable(const GBTSimpleTable &other)
GBTSimpleTable &operator=(const GBTSimpleTable &other)

Description

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

This contains a Table to which other Tables can be appended. Its quite simple and it it used by the GBTBackendFillers.

Synopsis

Example

Motivation

The GBT backend FITS files generally have ancilliar tables such as PHASE and RECEIVER. In the resulting MS, these are just appended to the end of a subtable. This class contains those subtables and does the appending.

With MS 2, this is somewhat more complicated and hence this class probably needs a better name.

To Do

Member Description

GBTSimpleTable(const String &tableName, const String &indexColumn=String(""))

open an already existing table, use the optional index column

GBTSimpleTable(Table &attachTable, const String &attachKeywordName, const String &tableName, const String &indexColumn=String(""))

create a new, empty table attached to the given table at the given keyword name, supply an optional index column

~GBTSimpleTable()

void add(const Table &other)

append the given table to the end of this table adding columns as required, any columns with the same name must have the same type and dimensionality

void add(const RecordInterface &other, Bool nextIndex=True)

append this record to the end of this table. Each field in the record maps to a column in the the table. There must be no subrecords. The types of the fields must match that in the existing table. Fields not already in the table will result in new columns for that table

uInt nrow()

how many rows in this table

const Int index()

the current value of the index, returns -1 if this table isn't indexed

const Table &table()

return a const reference to the underlying table being filled

void flush()

flush this table

void updateTableRow()

void checkRecord(const RecordInterface &other)

this checks the record and adds columns as required

void attachIndexCol(const String &indexColumn)

void setIndex(Int rownr, Bool nextIndex=True)

GBTSimpleTable()

Undefined and unavailable

GBTSimpleTable(const GBTSimpleTable &other)

GBTSimpleTable &operator=(const GBTSimpleTable &other)