Loading...
Searching...
No Matches
casacore::MSTable< MSEnum > Class Template Reference
ms package (libcasa_ms) » MeasurementSets_module

A Table intended to hold astronomical data More...

`#include <MSTable.h>`

## Public Types

typedef MSEnum::PredefinedColumns | ColEnum
| Define the column and keyword enuym types.
typedef MSEnum::PredefinedKeywords | KeyEnum
Public Types inherited from casacore::Table
enum | TableOption { Old , New , NewNoReplace , Scratch , Update , Delete }
| Define the possible options how a table can be opened. More...
enum | TableType { Plain , Memory }
| Define the possible table types. More...
enum | EndianFormat { BigEndian , LittleEndian , LocalEndian , AipsrcEndian }
| Define the possible endian formats in which table data can be stored. More...
typedef void | ScratchCallback(const String &name, Bool isScratch, const String &oldName)
| Define the signature of the function being called when the state of a scratch table changes (i.e.

## Public Member Functions

Bool | isColumn (ColEnum which) const
| ColEnum convenience functions .
Bool | isColumnWritable (ColEnum which) const
| check to see if a column is writable
Bool | isColumnWritable (const String &columnName) const
Bool | isColumnWritable (uInt columnIndex) const
Bool | isScalar (ColEnum which) const
| Information about scalar vs array of a column.
Bool | isArray (ColEnum which) const
const String & | unit (const String &which) const
| Return the UNIT keyword value associated with the specified column.
const String & | unit (ColEnum which) const
Bool | isKeyword (KeyEnum which) const
| check to see if a keyword exists
Bool | validate () const
| validate self (make sure that this MS is valid)
Public Member Functions inherited from casacore::Table
| Table ()
| Create a null Table object (i.e.
| Table (const String &tableName, TableOption=Table::Old, const TSMOption &=TSMOption())
| Create a table object for an existing table.
| Table (const String &tableName, const TableLock &lockOptions, TableOption=Table::Old, const TSMOption &=TSMOption())
| Table (const String &tableName, const String &tableDescName, TableOption=Table::Old, const TSMOption &=TSMOption())
| Table (const String &tableName, const String &tableDescName, const TableLock &lockOptions, TableOption=Table::Old, const TSMOption &=TSMOption())
| Table (TableType, EndianFormat=Table::AipsrcEndian, const TSMOption &=TSMOption())
| Make a new empty table (plain (scratch) or memory type).
| Table (SetupNewTable &, rownr_t nrrow=0, Bool initialize=False, EndianFormat=Table::AipsrcEndian, const TSMOption &=TSMOption())
| Make a table object for a new table, which can thereafter be used for reading and writing.
| Table (SetupNewTable &, TableType, rownr_t nrrow=0, Bool initialize=False, EndianFormat=Table::AipsrcEndian, const TSMOption &=TSMOption())
| Table (SetupNewTable &, TableType, const TableLock &lockOptions, rownr_t nrrow=0, Bool initialize=False, EndianFormat=Table::AipsrcEndian, const TSMOption &=TSMOption())
| Table (SetupNewTable &, TableLock::LockOption, rownr_t nrrow=0, Bool initialize=False, EndianFormat=Table::AipsrcEndian, const TSMOption &=TSMOption())
| Table (SetupNewTable &, const TableLock &lockOptions, rownr_t nrrow=0, Bool initialize=False, EndianFormat=Table::AipsrcEndian, const TSMOption &=TSMOption())
| Table (MPI_Comm mpiComm, TableType, EndianFormat=Table::AipsrcEndian, const TSMOption &=TSMOption())
| Table (MPI_Comm mpiComm, SetupNewTable &, rownr_t nrrow=0, Bool initialize=False, EndianFormat=Table::AipsrcEndian, const TSMOption &=TSMOption())
| Table (MPI_Comm mpiComm, SetupNewTable &, TableType, rownr_t nrrow=0, Bool initialize=False, EndianFormat=Table::AipsrcEndian, const TSMOption &=TSMOption())
| Table (MPI_Comm mpiComm, SetupNewTable &, TableType, const TableLock &lockOptions, rownr_t nrrow=0, Bool initialize=False, EndianFormat=Table::AipsrcEndian, const TSMOption &=TSMOption())
| Table (MPI_Comm mpiComm, SetupNewTable &, TableLock::LockOption, rownr_t nrrow=0, Bool initialize=False, EndianFormat=Table::AipsrcEndian, const TSMOption &=TSMOption())
| Table (MPI_Comm mpiComm, SetupNewTable &, const TableLock &lockOptions, rownr_t nrrow=0, Bool initialize=False, EndianFormat=Table::AipsrcEndian, const TSMOption &=TSMOption())
| Table (const Block< Table > &tables, const Block< String > &subTables=Block< String >(), const String &subDirName=String())
| Create a table object as the virtual concatenation of one or more of existing tables.
| Table (const Block< String > &tableNames, const Block< String > &subTables=Block< String >(), TableOption=Table::Old, const TSMOption &=TSMOption(), const String &subDirName=String())
| Table (const Block< String > &tableNames, const Block< String > &subTables, const TableLock &lockOptions, TableOption=Table::Old, const TSMOption &=TSMOption())
| Table (const Table &)
| Copy constructor (reference semantics).
virtual | ~Table ()
| The destructor flushes (i.e.
Table & | operator= (const Table &)
| Assignment (reference semantics).
Block< String > | getPartNames (Bool recursive=False) const
| Get the names of the tables this table consists of.
Bool | isSameTable (const Table &other) const
| Is this table the same as the other?
Bool | isSameRoot (const Table &other) const
| Is the root table of this table the same as that of the other one?
void | closeSubTables () const
| Close all open subtables.
void | reopenRW ()
| Try to reopen the table for read/write access.
void | changeTiledDataOnly ()
| Indicate we will leave the table unchanged except for the values of the data in columns stored with a TiledShape storage manager.
Table::EndianFormat | endianFormat () const
| Get the endian format in which the table is stored.
const StorageOption & | storageOption () const
| Get the storage option used for the table.
Bool | isMultiUsed (Bool checkSubTables=False) const
| Is the table used (i.e.
const TableLock & | lockOptions () const
| Get the locking options.
Bool | hasLock (FileLocker::LockType=FileLocker::Write) const
| Has this process the read or write lock, thus can the table be read or written safely?
Bool | hasLock (Bool write) const
Bool | lock (FileLocker::LockType=FileLocker::Write, uInt nattempts=0)
| Try to lock the table for read or write access (default is write).
Bool | lock (Bool write, uInt nattempts=0)
void | unlock ()
| Unlock the table.
Bool | hasDataChanged ()
| Determine if column or keyword table data have changed (or is being changed) since the last time this function was called.
void | flush (Bool fsync=False, Bool recursive=False)
| Flush the table, i.e.
void | resync ()
| Resynchronize the Table object with the table file.
Bool | isNull () const
| Test if the object is null, i.e.
void | throwIfNull () const
| Throw an exception if the object is null, i.e.
void | showStructure (std::ostream &, Bool showDataMans=True, Bool showColumns=True, Bool showSubTables=False, Bool sortColumns=False, Bool cOrder=False) const
| Show the structure of the table.
void | showKeywords (std::ostream &, Bool showSubTables=False, Bool showTabKey=True, Bool showColKey=False, Int maxVal=25) const
| Show the table and/or column keywords, possibly also of all subtables.
void | showKeywordSets (std::ostream &, Bool showTabKey, Bool showColKey, Int maxVal) const
| Show the table and/or column keywords of this table.
Bool | isRootTable () const
| Test if this table is the root table (ie.
Bool | isWritable () const
| Test if this table is opened as writable.
Bool | isColumnWritable (const String &columnName) const
| Test if the given column is writable.
Bool | isColumnWritable (uInt columnIndex) const
Bool | isColumnStored (const String &columnName) const
| Test if the given column is stored (otherwise it is virtual).
Bool | isColumnStored (uInt columnIndex) const
const TableRecord & | keywordSet () const
| Get readonly access to the table keyword set.
TableRecord & | rwKeywordSet ()
| Get read/write access to the table keyword set.
const TableInfo & | tableInfo () const
| Get access to the TableInfo object.
TableInfo & | tableInfo ()
void | flushTableInfo () const
| Write the TableInfo object.
const TableDesc & | tableDesc () const
| Get the table description.
TableDesc | actualTableDesc () const
Record | dataManagerInfo () const
| Return all data managers used and the columns served by them.
const String & | tableName () const
| Get the table name.
void | rename (const String &newName, TableOption)
| Rename the table and all its subtables.
void | copy (const String &newName, TableOption, Bool noRows=False) const
| Copy the table and all its subtables.
void | deepCopy (const String &newName, TableOption, Bool valueCopy=False, EndianFormat=AipsrcEndian, Bool noRows=False) const
void | deepCopy (const String &newName, const Record &dataManagerInfo, TableOption, Bool valueCopy=False, EndianFormat=AipsrcEndian, Bool noRows=False) const
void | deepCopy (const String &newName, const Record &dataManagerInfo, const StorageOption &, TableOption, Bool valueCopy=False, EndianFormat=AipsrcEndian, Bool noRows=False) const
Table | copyToMemoryTable (const String &name, Bool noRows=False) const
| Make a copy of a table to a MemoryTable object.
TableType | tableType () const
| Get the table type.
int | tableOption () const
| Get the table option.
void | markForDelete ()
| Mark the table for delete.
void | unmarkForDelete ()
| Unmark the table for delete.
Bool | isMarkedForDelete () const
| Test if the table is marked for delete.
rownr_t | nrow () const
| Get the number of rows.
Bool | canAddRow () const
| Test if it is possible to add a row to this table.
void | addRow (rownr_t nrrow=1, Bool initialize=False)
| Add one or more rows at the end of the table.
Bool | canRemoveRow () const
| Test if it is possible to remove a row from this table.
void | removeRow (rownr_t rownr)
| Remove the given row(s).
void | removeRow (const RowNumbers &rownrs)
TableExprNode | key (const String &keywordName) const
| Create a TableExprNode object for a column or for a keyword in the table keyword set.
TableExprNode | key (const Vector< String > &fieldNames) const
TableExprNode | col (const String &columnName) const
TableExprNode | col (const String &columnName, const Vector< String > &fieldNames) const
TableExprNode | nodeRownr (rownr_t origin=0) const
| Create a TableExprNode object for the rownumber function.
TableExprNode | nodeRandom () const
| Create a TableExprNode object for the rand function.
Table | operator() (const TableExprNode &, rownr_t maxRow=0, rownr_t offset=0) const
| Select rows from a table using an select expression consisting of TableExprNode objects.
Table | operator() (const RowNumbers &rownrs) const
| Select rows using a vector of row numbers.
Table | operator() (const Block< Bool > &mask) const
| Select rows using a mask block.
Table | project (const Block< String > &columnNames) const
| Project the given columns (i.e.
Table | operator& (const Table &) const
| Do logical operations on a table.
Table | operator| (const Table &) const
| Union with another table.
Table | operator- (const Table &) const
| Subtract another table.
Table | operator^ (const Table &) const
| Xor with another table.
Table | operator! () const
| Take complement.
Table | sort (const String &columnName, int=Sort::Ascending, int=Sort::ParSort) const
| Sort a table on one or more columns of scalars.
Table | sort (const Block< String > &columnNames, int=Sort::Ascending, int=Sort::ParSort) const
| Sort on multiple columns.
Table | sort (const Block< String > &columnNames, const Block< Int > &sortOrders, int=Sort::ParSort) const
| Sort on multiple columns.
Table | sort (const Block< String > &columnNames, const Block< std::shared_ptr< BaseCompare > > &compareObjects, const Block< Int > &sortOrders, int=Sort::ParSort) const
| Sort on multiple columns.
RowNumbers | rowNumbers () const
| Get a vector of row numbers in the root table of rows in this table.
RowNumbers | rowNumbers (const Table &that, Bool tryFast=False) const
| Get a vector of row numbers in that table of rows in this table.
void | addColumn (const ColumnDesc &columnDesc, Bool addToParent=True)
| Add a column to the table.
void | addColumn (const ColumnDesc &columnDesc, const String &dataManager, Bool byName, Bool addToParent=True)
| Use an existing data manager with the given name or type.
void | addColumn (const ColumnDesc &columnDesc, const DataManager &dataManager, Bool addToParent=True)
| Use the given data manager (which is a new one).
void | addColumn (const TableDesc &tableDesc, const DataManager &dataManager, Bool addToParent=True)
| Add a bunch of columns using the given new data manager.
void | addColumn (const TableDesc &tableDesc, const Record &dataManagerInfo, Bool addToParent=True)
Bool | canRemoveColumn (const String &columnName) const
| Test if columns can be removed.
Bool | canRemoveColumn (const Vector< String > &columnNames) const
void | removeColumn (const String &columnName)
| Remove columns.
void | removeColumn (const Vector< String > &columnName)
Bool | canRenameColumn (const String &columnName) const
| Test if a column can be renamed.
void | renameColumn (const String &newName, const String &oldName)
| Rename a column.
void | renameHypercolumn (const String &newName, const String &oldName)
void | getTableKeyword (AipsIO &, Bool openWritable)
| Read a table from AipsIO (for TableKeywords).
DataManager * | findDataManager (const String &name, Bool byColumn=False) const
| Find the data manager with the given name or for the given column name.

## Static Public Member Functions

static const String & | columnName (ColEnum which)
| Convert a ColEnum to the actual column name.
static ColEnum | columnType (const String &name)
| Convert a name to a ColEnum.
static DataType | columnDataType (ColEnum which)
| return the data type for a given ColEnum
static const String & | columnStandardComment (ColEnum which)
| return the standard comment for a given ColEnum
static const String & | columnUnit (ColEnum which)
| return the UNIT string for a given ColEnum
static const String & | columnMeasureType (ColEnum which)
| return the MEASURE_TYPE string for a given ColEnum
static void | addColumnToDesc (TableDesc &tabDesc, ColEnum which, Int ndim=-1, const String &refCol="")
| add a column to a TableDesc An exception is thrown for an invalid data type.
static void | addColumnToDesc (TableDesc &tabDesc, ColEnum which, const IPosition &shape, ColumnDesc::Option option, const String &refCol="")
| add a column to a TableDesc, defining the shape and setting the ColumnDesc option (Fixed, Undefined, Direct) For Measure columns you can define a variable reference column.
static void | addColumnToDesc (MSTableMaps &, ColEnum which, Int ndim=-1, const String &refCol="")
static void | addColumnToDesc (MSTableMaps &, ColEnum which, const IPosition &shape, ColumnDesc::Option option, const String &refCol="")
| add a column to a TableDesc, defining the shape and setting the ColumnDesc option (Fixed, Undefined, Direct) For Measure columns you can define a variable reference column.
static const String & | keywordName (KeyEnum which)
| KeyEnum convenience functions .
static KeyEnum | keywordType (const String &name)
static DataType | keywordDataType (KeyEnum which)
static const String & | keywordStandardComment (KeyEnum which)
static void | addKeyToDesc (TableDesc &, KeyEnum key)
| add a keyword to a TableDesc An exception is thrown for an invalid data type.
static void | addKeyToDesc (MSTableMaps &, KeyEnum key)
static Bool | validate (const TableDesc &tabDesc)
| tableDesc convenience functions
static Bool | validate (const TableRecord &tabKeySet)
| check that the keyword set is valid
static const TableDesc & | requiredTableDesc ()
| return the required table description
static void | addColumnCompression (TableDesc &td, ColEnum which, Bool autoScale=True, const String &type=String())
| Add the compress option for the given column to the TableDesc.
Static Public Member Functions inherited from casacore::Table
static ScratchCallback * | setScratchCallback (ScratchCallback *)
| Set the pointer to the ScratchCallback function.
static Bool | isOpened (const String &tableName)
| Is the table used (i.e.
static uInt | nAutoLocks ()
| Determine the number of locked tables opened with the AutoLock option (Locked table means locked for read and/or write).
static void | relinquishAutoLocks (Bool all=False)
| Unlock locked tables opened with the AutoLock option.
static Vector< String > | getLockedTables (FileLocker::LockType=FileLocker::Read, int lockOption=-1)
| Get the names of tables locked in this process.
static Bool | isNativeDataType (DataType dtype)
| Test if the given data type is native to the table system.
static String | fileName (const String &tableName)
| Make the table file name.
static Bool | isReadable (const String &tableName, bool throwIf=False)
| Test if a table with the given name exists and is readable.
static Bool | isWritable (const String &tableName, bool throwIf=False)
| Test if a table with the given name exists and is writable.
static Vector< String > | nonWritableFiles (const String &tableName)
| Find the non-writable files in a table.

## Protected Member Functions

| MSTable ()
| These constructors mirror the Table ones .
| MSTable (const String &tableName, TableOption option)
| MSTable (const String &tableName, const TableLock &lockOptions, TableOption option)
| MSTable (const String &tableName, const String &tableDescName, TableOption option)
| MSTable (const String &tableName, const String &tableDescName, const TableLock &lockOptions, TableOption option)
| MSTable (SetupNewTable &newTab, rownr_t nrrow, Bool initialize)
| MSTable (SetupNewTable &newTab, const TableLock &lockOptions, rownr_t nrrow, Bool initialize)
| MSTable (MPI_Comm comm, SetupNewTable &newTab, rownr_t nrrow, Bool initialize)
| MSTable (MPI_Comm comm, SetupNewTable &newTab, const TableLock &lockOptions, rownr_t nrrow, Bool initialize)
| MSTable (const Table &table)
| MSTable (const MSTable< MSEnum > &other)
| ~MSTable ()
MSTable & | operator= (const MSTable< MSEnum > &)
| Assignment operator, reference semantics.
Table | referenceCopy (const String &newTableName, const Block< String > &writableColumns) const
| Return a table that references all columns in this table except for those given in writableColumns, those are empty and writable.

## Static Protected Member Functions

static MSTableMaps & | getMaps ()
| Get the static struct containing all column and keyword mappings.
static void | colMapDef (MSTableMaps &maps, ColEnum col, const String &colName, DataType colType, const String &colComment, const String &colUnit="", const String &colMeasureType="")
| Define an entry in the column maps.
static void | keyMapDef (MSTableMaps &maps, KeyEnum key, const String &keyName, DataType keyType, const String &keyComment)
| Define an entry in the keyword maps.
static const String & | columnName (const MSTableMaps &maps, ColEnum which)
| Convert a ColEnum to the actual column name.
static DataType | columnDataType (const MSTableMaps &maps, ColEnum which)
static const String & | columnStandardComment (const MSTableMaps &maps, ColEnum which)
static const String & | columnUnit (const MSTableMaps &maps, ColEnum which)
static const String & | columnMeasureType (const MSTableMaps &maps, ColEnum which)
static const String & | keywordName (const MSTableMaps &maps, KeyEnum which)
static DataType | keywordDataType (const MSTableMaps &maps, KeyEnum which)
static const String & | keywordStandardComment (const MSTableMaps &maps, KeyEnum which)

## Detailed Description

template<class MSEnum>
class casacore::MSTable< MSEnum >

A Table intended to hold astronomical data

### Intended use:

Public interface

### Review Status

Reviewed By:
  Bob Garwood
Date Reviewed:
  1997/02/01

### Prerequisite

- Tables module

### Etymology

The MSTable is the base class for all MeasurementSet Tables, hence the name.

### Synopsis

A MSTable is a Table. Most operations on a MSTable are Table operations. See the Tables
module for a list of those operations. The member functions provided by this class are primarily convenience functions to help users follow the agreed upon column and keyword naming conventions. They are useful when creating a Table following the MSTable conventions from scratch as well as when creating the column objects to access those columns. All actual MeasurementSet Tables will be derived from this class.

The standard way of accessing table columns is through Strings. Mistakes in typing the column name will not be caught at compile time (and may not be caught at run time). We have therefore decided to use an enumeration to specify columns so that many mistakes will be caught at compile time. This requires functions to map to and from this enumeration to the strings that are ultimately used.

Upon destruction, the table is checked to see that all required columns and keywords are still present. If not an exception is thrown. (Not a good idea!) Nevertheless, the table will be flushed to disk if it is writable - preserving its state.

### Example

For examples of use, see the MeasurementSet class.

### Motivation

The Table module is more than adequate as a container of data.
However, in order for applications to be useful with data from different sources, some conventions need to be adopted in the use of Tables to store data. The MSTable provides the framework for these conventions and conversion functions. The actual definitions of columns and keywords are found in the derived classes and their "enum" base class (e.g. MSAntenna and MSAntennaEnums).

### To Do

- referenceCopy() should be more flexible with the storage managers used for the columns which are not merely references.
- When ForwardColumnEngine is fixed so that it can deal with tables already in the cache, modify the test program. It may also be necessary to modify referenceCopy().

Definition at line 142 of file MSTable.h.

## Member Typedef Documentation

## ColEnum

template<class MSEnum>

typedef MSEnum::PredefinedColumns casacore::MSTable< MSEnum >::ColEnum

Define the column and keyword enuym types.

Definition at line 146 of file MSTable.h.

## KeyEnum

template<class MSEnum>

typedef MSEnum::PredefinedKeywords casacore::MSTable< MSEnum >::KeyEnum

Definition at line 147 of file MSTable.h.

## Constructor & Destructor Documentation

## MSTable() [1/11]

template<class MSEnum>

casacore::MSTable< MSEnum >::MSTable | ( |  | ) |

protected

These constructors mirror the Table ones .

Default constructor for use by derived classes

Referenced by MSTable(), and operator=().

## MSTable() [2/11]

template<class MSEnum>

casacore::MSTable< MSEnum >::MSTable | ( | const String & | tableName,
|  | TableOption | option )

protected

References casacore::Table::tableName().

## MSTable() [3/11]

template<class MSEnum>

casacore::MSTable< MSEnum >::MSTable | ( | const String & | tableName,
|  | const TableLock & | lockOptions,
|  | TableOption | option )

protected

References casacore::Table::lockOptions(), and casacore::Table::tableName().

## MSTable() [4/11]

template<class MSEnum>

casacore::MSTable< MSEnum >::MSTable | ( | const String & | tableName,
|  | const String & | tableDescName,
|  | TableOption | option )

protected

References casacore::Table::tableName().

## MSTable() [5/11]

template<class MSEnum>

casacore::MSTable< MSEnum >::MSTable | ( | const String & | tableName,
|  | const String & | tableDescName,
|  | const TableLock & | lockOptions,
|  | TableOption | option )

protected

References casacore::Table::lockOptions(), and casacore::Table::tableName().

## MSTable() [6/11]

template<class MSEnum>

casacore::MSTable< MSEnum >::MSTable | ( | SetupNewTable & | newTab,
|  | rownr_t | nrrow,
|  | Bool | initialize )

protected

## MSTable() [7/11]

template<class MSEnum>

casacore::MSTable< MSEnum >::MSTable | ( | SetupNewTable & | newTab,
|  | const TableLock & | lockOptions,
|  | rownr_t | nrrow,
|  | Bool | initialize )

protected

References casacore::Table::lockOptions().

## MSTable() [8/11]

template<class MSEnum>

casacore::MSTable< MSEnum >::MSTable | ( | MPI_Comm | comm,
|  | SetupNewTable & | newTab,
|  | rownr_t | nrrow,
|  | Bool | initialize )

protected

## MSTable() [9/11]

template<class MSEnum>

casacore::MSTable< MSEnum >::MSTable | ( | MPI_Comm | comm,
|  | SetupNewTable & | newTab,
|  | const TableLock & | lockOptions,
|  | rownr_t | nrrow,
|  | Bool | initialize )

protected

References casacore::Table::lockOptions().

## MSTable() [10/11]

template<class MSEnum>

casacore::MSTable< MSEnum >::MSTable | ( | const Table & | table | ) |

protected

References casacore::Table::Table().

## MSTable() [11/11]

template<class MSEnum>

casacore::MSTable< MSEnum >::MSTable | ( | const MSTable< MSEnum > & | other | ) |

protected

References MSTable().

## ~MSTable()

template<class MSEnum>

casacore::MSTable< MSEnum >::~MSTable | ( |  | ) |

protected

## Member Function Documentation

## addColumnCompression()

template<class MSEnum>

void casacore::MSTable< MSEnum >::addColumnCompression | ( | TableDesc & | td,
|  | ColEnum | which,
|  | Bool | autoScale = True,
|  | const String & | type = String() )

static

Add the compress option for the given column to the TableDesc.

It can only be used for a Float or a Complex column. For complex columns the type determines which CompressComplex engine is used. "SD" means that CompressComplexSD is used; otherwise CompressComplex is used.

References casacore::True.

## addColumnToDesc() [1/4]

template<class MSEnum>

void casacore::MSTable< MSEnum >::addColumnToDesc | ( | MSTableMaps & | ,
|  | ColEnum | which,
|  | const IPosition & | shape,
|  | ColumnDesc::Option | option,
|  | const String & | refCol = "" )

static

add a column to a TableDesc, defining the shape and setting the ColumnDesc option (Fixed, Undefined, Direct) For Measure columns you can define a variable reference column.

References casacore::shape().

## addColumnToDesc() [2/4]

template<class MSEnum>

void casacore::MSTable< MSEnum >::addColumnToDesc | ( | MSTableMaps & | ,
|  | ColEnum | which,
|  | Int | ndim = -1,
|  | const String & | refCol = "" )

static

References casacore::ndim().

## addColumnToDesc() [3/4]

template<class MSEnum>

void casacore::MSTable< MSEnum >::addColumnToDesc | ( | TableDesc & | tabDesc,
|  | ColEnum | which,
|  | const IPosition & | shape,
|  | ColumnDesc::Option | option,
|  | const String & | refCol = "" )

static

add a column to a TableDesc, defining the shape and setting the ColumnDesc option (Fixed, Undefined, Direct) For Measure columns you can define a variable reference column.

References casacore::shape().

## addColumnToDesc() [4/4]

template<class MSEnum>

void casacore::MSTable< MSEnum >::addColumnToDesc | ( | TableDesc & | tabDesc,
|  | ColEnum | which,
|  | Int | ndim = -1,
|  | const String & | refCol = "" )

static

add a column to a TableDesc An exception is thrown for an invalid data type.

This indicates a programming error in this class when this occurs. For Array columns you can optionally define the dimension here. For Measure columns you can define a variable reference column.

### Thrown Exceptions

- AipsError

References casacore::ndim().

## addKeyToDesc() [1/2]

template<class MSEnum>

void casacore::MSTable< MSEnum >::addKeyToDesc | ( | MSTableMaps & | ,
|  | KeyEnum | key )

static

References casacore::Table::key().

## addKeyToDesc() [2/2]

template<class MSEnum>

void casacore::MSTable< MSEnum >::addKeyToDesc | ( | TableDesc & | ,
|  | KeyEnum | key )

static

add a keyword to a TableDesc An exception is thrown for an invalid data type.

This indicates a missing data type in the code..

### Thrown Exceptions

- AipsError

References casacore::Table::key().

## colMapDef()

template<class MSEnum>

void casacore::MSTable< MSEnum >::colMapDef | ( | MSTableMaps & | maps,
|  | ColEnum | col,
|  | const String & | colName,
|  | DataType | colType,
|  | const String & | colComment,
|  | const String & | colUnit = "",
|  | const String & | colMeasureType = "" )

static protected

Define an entry in the column maps.

References casacore::Table::col().

## columnDataType() [1/2]

template<class MSEnum>

DataType casacore::MSTable< MSEnum >::columnDataType | ( | ColEnum | which | ) |

static

return the data type for a given ColEnum

## columnDataType() [2/2]

template<class MSEnum>

DataType casacore::MSTable< MSEnum >::columnDataType | ( | const MSTableMaps & | maps,
|  | ColEnum | which )

inline static protected

Definition at line 325 of file MSTable.h.

References casacore::MSTableMaps::colDTypeMap_p.

## columnMeasureType() [1/2]

template<class MSEnum>

const String & casacore::MSTable< MSEnum >::columnMeasureType | ( | ColEnum | which | ) |

static

return the MEASURE_TYPE string for a given ColEnum

## columnMeasureType() [2/2]

template<class MSEnum>

const String & casacore::MSTable< MSEnum >::columnMeasureType | ( | const MSTableMaps & | maps,
|  | ColEnum | which )

inline static protected

Definition at line 340 of file MSTable.h.

References casacore::MSTableMaps::colMeasureTypeMap_p.

## columnName() [1/2]

template<class MSEnum>

const String & casacore::MSTable< MSEnum >::columnName | ( | ColEnum | which | ) |

static

Convert a ColEnum to the actual column name.

Referenced by isColumnWritable(), and unit().

## columnName() [2/2]

template<class MSEnum>

const String & casacore::MSTable< MSEnum >::columnName | ( | const MSTableMaps & | maps,
|  | ColEnum | which )

inline static protected

Convert a ColEnum to the actual column name.

Definition at line 320 of file MSTable.h.

References casacore::MSTableMaps::columnMap_p.

## columnStandardComment() [1/2]

template<class MSEnum>

const String & casacore::MSTable< MSEnum >::columnStandardComment | ( | ColEnum | which | ) |

static

return the standard comment for a given ColEnum

## columnStandardComment() [2/2]

template<class MSEnum>

const String & casacore::MSTable< MSEnum >::columnStandardComment | ( | const MSTableMaps & | maps,
|  | ColEnum | which )

inline static protected

Definition at line 330 of file MSTable.h.

References casacore::MSTableMaps::colCommentMap_p.

## columnType()

template<class MSEnum>

ColEnum casacore::MSTable< MSEnum >::columnType | ( | const String & | name | ) |

static

Convert a name to a ColEnum.

References casacore::name().

## columnUnit() [1/2]

template<class MSEnum>

const String & casacore::MSTable< MSEnum >::columnUnit | ( | ColEnum | which | ) |

static

return the UNIT string for a given ColEnum

## columnUnit() [2/2]

template<class MSEnum>

const String & casacore::MSTable< MSEnum >::columnUnit | ( | const MSTableMaps & | maps,
|  | ColEnum | which )

inline static protected

Definition at line 335 of file MSTable.h.

References casacore::MSTableMaps::colUnitMap_p.

## getMaps()

template<class MSEnum>

MSTableMaps & casacore::MSTable< MSEnum >::getMaps | ( |  | ) |

static protected

Get the static struct containing all column and keyword mappings.

## isArray()

template<class MSEnum>

Bool casacore::MSTable< MSEnum >::isArray | ( | ColEnum | which | ) | const

## isColumn()

template<class MSEnum>

Bool casacore::MSTable< MSEnum >::isColumn | ( | ColEnum | which | ) | const

ColEnum convenience functions .

check to see if a column exists

## isColumnWritable() [1/3]

template<class MSEnum>

Bool casacore::MSTable< MSEnum >::isColumnWritable | ( | ColEnum | which | ) | const

check to see if a column is writable

## isColumnWritable() [2/3]

template<class MSEnum>

Bool casacore::MSTable< MSEnum >::isColumnWritable | ( | const String & | columnName | ) | const

inline

Definition at line 157 of file MSTable.h.

References columnName(), and casacore::Table::isColumnWritable().

## isColumnWritable() [3/3]

template<class MSEnum>

Bool casacore::MSTable< MSEnum >::isColumnWritable | ( | uInt | columnIndex | ) | const

inline

Definition at line 159 of file MSTable.h.

References casacore::Table::isColumnWritable().

## isKeyword()

template<class MSEnum>

Bool casacore::MSTable< MSEnum >::isKeyword | ( | KeyEnum | which | ) | const

check to see if a keyword exists

## isScalar()

template<class MSEnum>

Bool casacore::MSTable< MSEnum >::isScalar | ( | ColEnum | which | ) | const

Information about scalar vs array of a column.

## keyMapDef()

template<class MSEnum>

void casacore::MSTable< MSEnum >::keyMapDef | ( | MSTableMaps & | maps,
|  | KeyEnum | key,
|  | const String & | keyName,
|  | DataType | keyType,
|  | const String & | keyComment )

static protected

Define an entry in the keyword maps.

References casacore::Table::key().

## keywordDataType() [1/2]

template<class MSEnum>

DataType casacore::MSTable< MSEnum >::keywordDataType | ( | const MSTableMaps & | maps,
|  | KeyEnum | which )

inline static protected

Definition at line 350 of file MSTable.h.

References casacore::MSTableMaps::keyDTypeMap_p.

## keywordDataType() [2/2]

template<class MSEnum>

DataType casacore::MSTable< MSEnum >::keywordDataType | ( | KeyEnum | which | ) |

static

## keywordName() [1/2]

template<class MSEnum>

const String & casacore::MSTable< MSEnum >::keywordName | ( | const MSTableMaps & | maps,
|  | KeyEnum | which )

inline static protected

Definition at line 345 of file MSTable.h.

References casacore::MSTableMaps::keywordMap_p.

## keywordName() [2/2]

template<class MSEnum>

const String & casacore::MSTable< MSEnum >::keywordName | ( | KeyEnum | which | ) |

static

KeyEnum convenience functions .

## keywordStandardComment() [1/2]

template<class MSEnum>

const String & casacore::MSTable< MSEnum >::keywordStandardComment | ( | const MSTableMaps & | maps,
|  | KeyEnum | which )

inline static protected

Definition at line 355 of file MSTable.h.

References casacore::MSTableMaps::keyCommentMap_p.

## keywordStandardComment() [2/2]

template<class MSEnum>

const String & casacore::MSTable< MSEnum >::keywordStandardComment | ( | KeyEnum | which | ) |

static

## keywordType()

template<class MSEnum>

KeyEnum casacore::MSTable< MSEnum >::keywordType | ( | const String & | name | ) |

static

References casacore::name().

## operator=()

template<class MSEnum>

MSTable & casacore::MSTable< MSEnum >::operator= | ( | const MSTable< MSEnum > & |  | ) |

protected

Assignment operator, reference semantics.

References MSTable().

## referenceCopy()

template<class MSEnum>

Table casacore::MSTable< MSEnum >::referenceCopy | ( | const String & | newTableName,
|  | const Block< String > & | writableColumns ) const

protected

Return a table that references all columns in this table except for those given in writableColumns, those are empty and writable.

References casacore::Table::Table().

## requiredTableDesc()

template<class MSEnum>

const TableDesc & casacore::MSTable< MSEnum >::requiredTableDesc | ( |  | ) |

static

return the required table description

## unit() [1/2]

template<class MSEnum>

const String & casacore::MSTable< MSEnum >::unit | ( | ColEnum | which | ) | const

inline

Definition at line 172 of file MSTable.h.

References columnName(), and unit().

## unit() [2/2]

template<class MSEnum>

const String & casacore::MSTable< MSEnum >::unit | ( | const String & | which | ) | const

Return the UNIT keyword value associated with the specified column.

Referenced by unit().

## validate() [1/3]

template<class MSEnum>

Bool casacore::MSTable< MSEnum >::validate | ( |  | ) | const

inline

validate self (make sure that this MS is valid)

Definition at line 247 of file MSTable.h.

References casacore::False, casacore::Table::isNull(), casacore::Table::tableDesc(), and validate().

Referenced by validate().

## validate() [2/3]

template<class MSEnum>

Bool casacore::MSTable< MSEnum >::validate | ( | const TableDesc & | tabDesc | ) |

static

tableDesc convenience functions

check that a TableDesc is valid

## validate() [3/3]

template<class MSEnum>

Bool casacore::MSTable< MSEnum >::validate | ( | const TableRecord & | tabKeySet | ) |

static

check that the keyword set is valid

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

- ms/MeasurementSets/MSTable.h