casacore
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Static Protected Attributes | List of all members
casacore::MSTable< ColEnum, KeyEnum > Class Template Reference

A Table intended to hold astronomical data. More...

#include <MSTable.h>

Public Member Functions

Bool validate () const
 validate self (make sure that this MS is valid) More...
 
void removeColumn (const String &columnName)
 Remove a column from a table No exception is thrown if this invalidates the table in order to permit more complex operations with invalid intermediate states. More...
 
void removeColumn (const Vector< String > &columnNames)
 Remove columns from a table. More...
 
void renameColumn (const String &newName, const String &oldName)
 Rename a column No exception is thrown if this invalidates the table in order to permit more complex operations with invalid intermediate states. More...
 
- Public Member Functions inherited from casacore::Table
 Table ()
 Create a null Table object (i.e. More...
 
 Table (const String &tableName, TableOption=Table::Old, const TSMOption &=TSMOption())
 Create a table object for an existing table. More...
 
 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). More...
 
 Table (SetupNewTable &, uInt 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. More...
 
 Table (SetupNewTable &, TableType, uInt nrrow=0, Bool initialize=False, EndianFormat=Table::AipsrcEndian, const TSMOption &=TSMOption())
 
 Table (SetupNewTable &, TableType, const TableLock &lockOptions, uInt nrrow=0, Bool initialize=False, EndianFormat=Table::AipsrcEndian, const TSMOption &=TSMOption())
 
 Table (SetupNewTable &, TableLock::LockOption, uInt nrrow=0, Bool initialize=False, EndianFormat=Table::AipsrcEndian, const TSMOption &=TSMOption())
 
 Table (SetupNewTable &, const TableLock &lockOptions, uInt 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. More...
 
 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). More...
 
virtual ~Table ()
 The destructor flushes (i.e. More...
 
Tableoperator= (const Table &)
 Assignment (reference semantics). More...
 
Block< StringgetPartNames (Bool recursive=False) const
 Get the names of the tables this table consists of. More...
 
Bool isSameRoot (const Table &other) const
 Is the root table of this table the same as that of the other one? More...
 
void closeSubTables () const
 Close all open subtables. More...
 
void reopenRW ()
 Try to reopen the table for read/write access. More...
 
Table::EndianFormat endianFormat () const
 Get the endian format in which the table is stored. More...
 
const StorageOptionstorageOption () const
 Get the storage option used for the table. More...
 
Bool isMultiUsed (Bool checkSubTables=False) const
 Is the table used (i.e. More...
 
const TableLocklockOptions () const
 Get the locking options. More...
 
Bool hasLock (FileLocker::LockType=FileLocker::Write) const
 Has this process the read or write lock, thus can the table be read or written safely? More...
 
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). More...
 
Bool lock (Bool write, uInt nattempts=0)
 
void unlock ()
 Unlock the table. More...
 
Bool hasDataChanged ()
 Determine if column or keyword table data have changed (or is being changed) since the last time this function was called. More...
 
void flush (Bool fsync=False, Bool recursive=False)
 Flush the table, i.e. More...
 
void resync ()
 Resynchronize the Table object with the table file. More...
 
Bool isNull () const
 Test if the object is null, i.e. More...
 
void throwIfNull () const
 Throw an exception if the object is null, i.e. More...
 
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. More...
 
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. More...
 
void showKeywordSets (std::ostream &, Bool showTabKey, Bool showColKey, Int maxVal) const
 Show the table and/or column keywords of this table. More...
 
Bool isRootTable () const
 Test if this table is the root table (ie. More...
 
Bool isWritable () const
 Test if this table is opened as writable. More...
 
Bool isColumnWritable (const String &columnName) const
 Test if the given column is writable. More...
 
Bool isColumnWritable (uInt columnIndex) const
 
Bool isColumnStored (const String &columnName) const
 Test if the given column is stored (otherwise it is virtual). More...
 
Bool isColumnStored (uInt columnIndex) const
 
const TableRecordkeywordSet () const
 Get readonly access to the table keyword set. More...
 
TableRecordrwKeywordSet ()
 Get read/write access to the table keyword set. More...
 
const TableInfotableInfo () const
 Get access to the TableInfo object. More...
 
TableInfotableInfo ()
 
void flushTableInfo () const
 Write the TableInfo object. More...
 
const TableDesctableDesc () const
 Get the table description. More...
 
TableDesc actualTableDesc () const
 
Record dataManagerInfo () const
 Return all data managers used and the columns served by them. More...
 
const StringtableName () const
 Get the table name. More...
 
void rename (const String &newName, TableOption)
 Rename the table and all its subtables. More...
 
void copy (const String &newName, TableOption, Bool noRows=False) const
 Copy the table and all its subtables. More...
 
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. More...
 
TableType tableType () const
 Get the table type. More...
 
int tableOption () const
 Get the table option. More...
 
void markForDelete ()
 Mark the table for delete. More...
 
void unmarkForDelete ()
 Unmark the table for delete. More...
 
Bool isMarkedForDelete () const
 Test if the table is marked for delete. More...
 
uInt nrow () const
 Get the number of rows. More...
 
Bool canAddRow () const
 Test if it is possible to add a row to this table. More...
 
void addRow (uInt nrrow=1, Bool initialize=False)
 Add one or more rows at the end of the table. More...
 
Bool canRemoveRow () const
 Test if it is possible to remove a row from this table. More...
 
void removeRow (uInt rownr)
 Remove the given row(s). More...
 
void removeRow (const Vector< uInt > &rownrs)
 
TableExprNode nodeRownr (uInt origin=0) const
 Create a TableExprNode object for the rownumber function. More...
 
TableExprNode nodeRandom () const
 Create a TableExprNode object for the rand function. More...
 
Table operator() (const TableExprNode &, uInt maxRow=0, uInt offset=0) const
 Select rows from a table using an select expression consisting of TableExprNode objects. More...
 
Table operator() (const Vector< uInt > &rownrs) const
 Select rows using a vector of row numbers. More...
 
Table operator() (const Block< Bool > &mask) const
 Select rows using a mask block. More...
 
Table project (const Block< String > &columnNames) const
 Project the given columns (i.e. More...
 
Table operator & (const Table &) const
 Do logical operations on a table. More...
 
Table operator| (const Table &) const
 Union with another table. More...
 
Table operator- (const Table &) const
 Subtract another table. More...
 
Table operator^ (const Table &) const
 Xor with another table. More...
 
Table operator! () const
 Take complement. More...
 
Table sort (const String &columnName, int=Sort::Ascending, int=Sort::ParSort) const
 Sort a table on one or more columns of scalars. More...
 
Table sort (const Block< String > &columnNames, int=Sort::Ascending, int=Sort::ParSort) const
 Sort on multiple columns. More...
 
Table sort (const Block< String > &columnNames, const Block< Int > &sortOrders, int=Sort::ParSort) const
 Sort on multiple columns. More...
 
Table sort (const Block< String > &columnNames, const Block< CountedPtr< BaseCompare > > &compareObjects, const Block< Int > &sortOrders, int=Sort::ParSort) const
 Sort on multiple columns. More...
 
Vector< uIntrowNumbers () const
 Get a vector of row numbers in the root table of rows in this table. More...
 
Vector< uIntrowNumbers (const Table &that, Bool tryFast=False) const
 Get a vector of row numbers in that table of rows in this table. More...
 
void addColumn (const ColumnDesc &columnDesc, Bool addToParent=True)
 Add a column to the table. More...
 
void addColumn (const ColumnDesc &columnDesc, const String &dataManager, Bool byName, Bool addToParent=True)
 Use an existing data manager with the given name or type. More...
 
void addColumn (const ColumnDesc &columnDesc, const DataManager &dataManager, Bool addToParent=True)
 Use the given data manager (which is a new one). More...
 
void addColumn (const TableDesc &tableDesc, const DataManager &dataManager, Bool addToParent=True)
 Add a bunch of columns using the given new data manager. More...
 
void addColumn (const TableDesc &tableDesc, const Record &dataManagerInfo, Bool addToParent=True)
 
Bool canRemoveColumn (const String &columnName) const
 Test if columns can be removed. More...
 
Bool canRemoveColumn (const Vector< String > &columnNames) const
 
void removeColumn (const String &columnName)
 Remove columns. More...
 
void removeColumn (const Vector< String > &columnName)
 
Bool canRenameColumn (const String &columnName) const
 Test if a column can be renamed. More...
 
void renameColumn (const String &newName, const String &oldName)
 Rename a column. More...
 
void renameHypercolumn (const String &newName, const String &oldName)
 
void getTableKeyword (AipsIO &, Bool openWritable)
 Read a table from AipsIO (for TableKeywords). More...
 
DataManagerfindDataManager (const String &name, Bool byColumn=False) const
 Find the data manager with the given name or for the given column name. More...
 
TableExprNode key (const String &keywordName) const
 Create a TableExprNode object for a column or for a keyword in the table keyword set. More...
 
TableExprNode key (const Vector< String > &fieldNames) const
 
TableExprNode col (const String &columnName) const
 
TableExprNode col (const String &columnName, const Vector< String > &fieldNames) const
 
TableExprNode keyCol (const String &name, const Vector< String > &fieldNames) const
 

Static Public Member Functions

static Bool validate (const TableDesc &tabDesc)
 tableDesc convenience functions More...
 
static Bool validate (const TableRecord &tabKeySet)
 check that the keyword set is valid More...
 
static const TableDescrequiredTableDesc ()
 return the required table description More...
 
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. More...
 
- Static Public Member Functions inherited from casacore::Table
static ScratchCallbacksetScratchCallback (ScratchCallback *)
 Set the pointer to the ScratchCallback function. More...
 
static Table openTable (const String &tableName, TableOption=Table::Old, const TSMOption &=TSMOption())
 Try to open a table. More...
 
static Table openTable (const String &tableName, const TableLock &lockOptions, TableOption=Table::Old, const TSMOption &=TSMOption())
 
static Bool canDeleteTable (const String &tableName, Bool checkSubTables=False)
 Can the table be deleted? If true, function deleteTable can safely be called. More...
 
static Bool canDeleteTable (String &message, const String &tableName, Bool checkSubTables=False)
 
static void deleteTable (const String &tableName, Bool checkSubTables=False)
 Delete the table. More...
 
static Bool isOpened (const String &tableName)
 Is the table used (i.e. More...
 
static uInt nAutoLocks ()
 Determine the number of locked tables opened with the AutoLock option (Locked table means locked for read and/or write). More...
 
static void relinquishAutoLocks (Bool all=False)
 Unlock locked tables opened with the AutoLock option. More...
 
static Vector< StringgetLockedTables (FileLocker::LockType=FileLocker::Read, int lockOption=-1)
 Get the names of tables locked in this process. More...
 
static Bool isNativeDataType (DataType dtype)
 Test if the given data type is native to the table system. More...
 
static String fileName (const String &tableName)
 Make the table file name. More...
 
static Bool isReadable (const String &tableName, bool throwIf=False)
 Test if a table with the given name exists and is readable. More...
 
static uInt getLayout (TableDesc &desc, const String &tableName)
 Return the layout of a table (i.e. More...
 
static TableInfo tableInfo (const String &tableName)
 Get the table info of the table with the given name. More...
 
static Bool isWritable (const String &tableName, bool throwIf=False)
 Test if a table with the given name exists and is writable. More...
 
static Vector< StringnonWritableFiles (const String &tableName)
 Find the non-writable files in a table. More...
 

Protected Member Functions

 ~MSTable ()
 
MSTableoperator= (const MSTable< ColEnum, KeyEnum > &)
 Assignment operator, reference semantics. More...
 
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. More...
 
 MSTable ()
 These constructors mirror the Table ones. More...
 
 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, uInt nrrow, Bool initialize)
 
 MSTable (SetupNewTable &newTab, const TableLock &lockOptions, uInt nrrow, Bool initialize)
 
 MSTable (const Table &table)
 
 MSTable (const MSTable< ColEnum, KeyEnum > &other)
 
- Protected Member Functions inherited from casacore::Table
 Table (BaseTable *, Bool countIt=True)
 Construct a Table object from a BaseTable*. More...
 
void open (const String &name, const String &type, int tableOption, const TableLock &lockOptions, const TSMOption &tsmOpt)
 Open an existing table. More...
 

Static Protected Member Functions

static void colMapDef (ColEnum col, const String &colName, DataType colType, const String &colComment, const String &colUnit="", const String &colMeasureType="")
 Define an entry in the column maps. More...
 
static void keyMapDef (KeyEnum key, const String &keyName, DataType keyType, const String &keyComment)
 Define an entry in the keyword maps. More...
 

Static Protected Attributes

static SimpleOrderedMap< Int, StringcolumnMap_p
 These are the static ordered maps which contain the above info ColEnum -> name. More...
 
static SimpleOrderedMap< Int, IntcolDTypeMap_p
 ColEnum -> DataType. More...
 
static SimpleOrderedMap< Int, StringcolCommentMap_p
 ColEnum -> comment string. More...
 
static SimpleOrderedMap< Int, StringcolUnitMap_p
 ColEnum -> UNIT string. More...
 
static SimpleOrderedMap< Int, StringcolMeasureTypeMap_p
 ColEnum -> MEASURE_TYPE string. More...
 
static SimpleOrderedMap< Int, StringkeywordMap_p
 KeyEnum -> name. More...
 
static SimpleOrderedMap< Int, IntkeyDTypeMap_p
 KeyEnum -> DataType. More...
 
static SimpleOrderedMap< Int, StringkeyCommentMap_p
 KeyEnum -> comment string. More...
 
static CountedPtr< TableDescrequiredTD_p
 The required TableDesc. More...
 
- Static Protected Attributes inherited from casacore::Table
static ScratchCallbackscratchCallback_p
 
Bool isColumn (ColEnum which) const
 ColEnum convenience functions. More...
 
Bool isColumnWritable (ColEnum which) const
 check to see if a column is writable More...
 
Bool isColumnWritable (const String &columnName) const
 
Bool isColumnWritable (uInt columnIndex) const
 
Bool isScalar (ColEnum which) const
 Information about scalar vs array of a column. More...
 
Bool isArray (ColEnum which) const
 
const Stringunit (const String &which) const
 Return the UNIT keyword value associated with the specified column. More...
 
const Stringunit (ColEnum which) const
 
Bool isKeyword (KeyEnum which) const
 check to see if a keyword exists More...
 
static const StringcolumnName (ColEnum which)
 Convert a ColEnum to the actual column name. More...
 
static ColEnum columnType (const String &name)
 Convert a name to a ColEnum. More...
 
static DataType columnDataType (ColEnum which)
 return the data type for a given ColEnum More...
 
static const StringcolumnStandardComment (ColEnum which)
 return the standard comment for a given ColEnum More...
 
static const StringcolumnUnit (ColEnum which)
 return the UNIT string for a given ColEnum More...
 
static const StringcolumnMeasureType (ColEnum which)
 return the MEASURE_TYPE string for a given ColEnum More...
 
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. More...
 
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. More...
 
static const StringkeywordName (KeyEnum which)
 KeyEnum convenience functions. More...
 
static KeyEnum keywordType (const String &name)
 
static DataType keywordDataType (KeyEnum which)
 
static const StringkeywordStandardComment (KeyEnum which)
 
static void addKeyToDesc (TableDesc &tabDesc, KeyEnum key)
 add a keyword to a TableDesc An exception is thrown for an invalid data type. More...
 

Additional Inherited Members

- 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. More...
 
- Protected Attributes inherited from casacore::Table
BaseTablebaseTabPtr_p
 
Bool isCounted_p
 
uInt lastModCounter_p
 

Detailed Description

template<class ColEnum, class KeyEnum>
class casacore::MSTable< ColEnum, KeyEnum >

A Table intended to hold astronomical data.

Intended use:

Public interface

Review Status

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

Prerequisite

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

Definition at line 112 of file MSTable.h.

Constructor & Destructor Documentation

§ MSTable() [1/9]

template<class ColEnum, class KeyEnum>
casacore::MSTable< ColEnum, KeyEnum >::MSTable ( )
protected

These constructors mirror the Table ones.

Default constructor for use by derived classes

Referenced by casacore::MSTable< MSPointingEnums::PredefinedColumns, MSPointingEnums::PredefinedKeywords >::renameColumn().

§ MSTable() [2/9]

template<class ColEnum, class KeyEnum>
casacore::MSTable< ColEnum, KeyEnum >::MSTable ( const String tableName,
TableOption  option 
)
protected

§ MSTable() [3/9]

template<class ColEnum, class KeyEnum>
casacore::MSTable< ColEnum, KeyEnum >::MSTable ( const String tableName,
const TableLock lockOptions,
TableOption  option 
)
protected

§ MSTable() [4/9]

template<class ColEnum, class KeyEnum>
casacore::MSTable< ColEnum, KeyEnum >::MSTable ( const String tableName,
const String tableDescName,
TableOption  option 
)
protected

§ MSTable() [5/9]

template<class ColEnum, class KeyEnum>
casacore::MSTable< ColEnum, KeyEnum >::MSTable ( const String tableName,
const String tableDescName,
const TableLock lockOptions,
TableOption  option 
)
protected

§ MSTable() [6/9]

template<class ColEnum, class KeyEnum>
casacore::MSTable< ColEnum, KeyEnum >::MSTable ( SetupNewTable newTab,
uInt  nrrow,
Bool  initialize 
)
protected

§ MSTable() [7/9]

template<class ColEnum, class KeyEnum>
casacore::MSTable< ColEnum, KeyEnum >::MSTable ( SetupNewTable newTab,
const TableLock lockOptions,
uInt  nrrow,
Bool  initialize 
)
protected

§ MSTable() [8/9]

template<class ColEnum, class KeyEnum>
casacore::MSTable< ColEnum, KeyEnum >::MSTable ( const Table table)
protected

§ MSTable() [9/9]

template<class ColEnum, class KeyEnum>
casacore::MSTable< ColEnum, KeyEnum >::MSTable ( const MSTable< ColEnum, KeyEnum > &  other)
protected

§ ~MSTable()

template<class ColEnum, class KeyEnum>
casacore::MSTable< ColEnum, KeyEnum >::~MSTable ( )
protected

Member Function Documentation

§ addColumnCompression()

template<class ColEnum, class KeyEnum>
static void casacore::MSTable< ColEnum, KeyEnum >::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.

Referenced by casacore::MSTable< MSPointingEnums::PredefinedColumns, MSPointingEnums::PredefinedKeywords >::validate().

§ addColumnToDesc() [1/2]

template<class ColEnum, class KeyEnum>
static void casacore::MSTable< ColEnum, KeyEnum >::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

Referenced by casacore::MSTable< MSPointingEnums::PredefinedColumns, MSPointingEnums::PredefinedKeywords >::unit().

§ addColumnToDesc() [2/2]

template<class ColEnum, class KeyEnum>
static void casacore::MSTable< ColEnum, KeyEnum >::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.

§ addKeyToDesc()

template<class ColEnum, class KeyEnum>
static void casacore::MSTable< ColEnum, KeyEnum >::addKeyToDesc ( TableDesc tabDesc,
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

Referenced by casacore::MSTable< MSPointingEnums::PredefinedColumns, MSPointingEnums::PredefinedKeywords >::unit().

§ colMapDef()

template<class ColEnum, class KeyEnum>
static void casacore::MSTable< ColEnum, KeyEnum >::colMapDef ( ColEnum  col,
const String colName,
DataType  colType,
const String colComment,
const String colUnit = "",
const String colMeasureType = "" 
)
staticprotected

Define an entry in the column maps.

§ columnDataType()

template<class ColEnum, class KeyEnum>
static DataType casacore::MSTable< ColEnum, KeyEnum >::columnDataType ( ColEnum  which)
static

§ columnMeasureType()

template<class ColEnum, class KeyEnum>
static const String& casacore::MSTable< ColEnum, KeyEnum >::columnMeasureType ( ColEnum  which)
static

return the MEASURE_TYPE string for a given ColEnum

Referenced by casacore::MSTable< MSPointingEnums::PredefinedColumns, MSPointingEnums::PredefinedKeywords >::unit().

§ columnName()

template<class ColEnum, class KeyEnum>
static const String& casacore::MSTable< ColEnum, KeyEnum >::columnName ( ColEnum  which)
static

§ columnStandardComment()

template<class ColEnum, class KeyEnum>
static const String& casacore::MSTable< ColEnum, KeyEnum >::columnStandardComment ( ColEnum  which)
static

§ columnType()

template<class ColEnum, class KeyEnum>
static ColEnum casacore::MSTable< ColEnum, KeyEnum >::columnType ( const String name)
static

§ columnUnit()

template<class ColEnum, class KeyEnum>
static const String& casacore::MSTable< ColEnum, KeyEnum >::columnUnit ( ColEnum  which)
static

§ isArray()

template<class ColEnum, class KeyEnum>
Bool casacore::MSTable< ColEnum, KeyEnum >::isArray ( ColEnum  which) const

§ isColumn()

template<class ColEnum, class KeyEnum>
Bool casacore::MSTable< ColEnum, KeyEnum >::isColumn ( ColEnum  which) const

ColEnum convenience functions.

check to see if a column exists

§ isColumnWritable() [1/3]

template<class ColEnum, class KeyEnum>
Bool casacore::MSTable< ColEnum, KeyEnum >::isColumnWritable ( ColEnum  which) const

check to see if a column is writable

§ isColumnWritable() [2/3]

template<class ColEnum, class KeyEnum>
Bool casacore::MSTable< ColEnum, KeyEnum >::isColumnWritable ( const String columnName) const
inline

Definition at line 123 of file MSTable.h.

§ isColumnWritable() [3/3]

template<class ColEnum, class KeyEnum>
Bool casacore::MSTable< ColEnum, KeyEnum >::isColumnWritable ( uInt  columnIndex) const
inline

Definition at line 125 of file MSTable.h.

§ isKeyword()

template<class ColEnum, class KeyEnum>
Bool casacore::MSTable< ColEnum, KeyEnum >::isKeyword ( KeyEnum  which) const

§ isScalar()

template<class ColEnum, class KeyEnum>
Bool casacore::MSTable< ColEnum, KeyEnum >::isScalar ( ColEnum  which) const

§ keyMapDef()

template<class ColEnum, class KeyEnum>
static void casacore::MSTable< ColEnum, KeyEnum >::keyMapDef ( KeyEnum  key,
const String keyName,
DataType  keyType,
const String keyComment 
)
staticprotected

Define an entry in the keyword maps.

§ keywordDataType()

template<class ColEnum, class KeyEnum>
static DataType casacore::MSTable< ColEnum, KeyEnum >::keywordDataType ( KeyEnum  which)
static

§ keywordName()

template<class ColEnum, class KeyEnum>
static const String& casacore::MSTable< ColEnum, KeyEnum >::keywordName ( KeyEnum  which)
static

§ keywordStandardComment()

template<class ColEnum, class KeyEnum>
static const String& casacore::MSTable< ColEnum, KeyEnum >::keywordStandardComment ( KeyEnum  which)
static

§ keywordType()

template<class ColEnum, class KeyEnum>
static KeyEnum casacore::MSTable< ColEnum, KeyEnum >::keywordType ( const String name)
static

§ operator=()

template<class ColEnum, class KeyEnum>
MSTable& casacore::MSTable< ColEnum, KeyEnum >::operator= ( const MSTable< ColEnum, KeyEnum > &  )
protected

§ referenceCopy()

template<class ColEnum, class KeyEnum>
Table casacore::MSTable< ColEnum, KeyEnum >::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.

§ removeColumn() [1/2]

template<class ColEnum, class KeyEnum>
void casacore::MSTable< ColEnum, KeyEnum >::removeColumn ( const String columnName)
inline

Remove a column from a table No exception is thrown if this invalidates the table in order to permit more complex operations with invalid intermediate states.

Definition at line 225 of file MSTable.h.

§ removeColumn() [2/2]

template<class ColEnum, class KeyEnum>
void casacore::MSTable< ColEnum, KeyEnum >::removeColumn ( const Vector< String > &  columnNames)
inline

Remove columns from a table.

Definition at line 231 of file MSTable.h.

§ renameColumn()

template<class ColEnum, class KeyEnum>
void casacore::MSTable< ColEnum, KeyEnum >::renameColumn ( const String newName,
const String oldName 
)
inline

Rename a column No exception is thrown if this invalidates the table in order to permit more complex operations with invalid intermediate states.

Definition at line 240 of file MSTable.h.

§ requiredTableDesc()

template<class ColEnum, class KeyEnum>
static const TableDesc& casacore::MSTable< ColEnum, KeyEnum >::requiredTableDesc ( )
static

§ unit() [1/2]

template<class ColEnum, class KeyEnum>
const String& casacore::MSTable< ColEnum, KeyEnum >::unit ( const String which) const

§ unit() [2/2]

template<class ColEnum, class KeyEnum>
const String& casacore::MSTable< ColEnum, KeyEnum >::unit ( ColEnum  which) const
inline

Definition at line 138 of file MSTable.h.

§ validate() [1/3]

template<class ColEnum, class KeyEnum>
static Bool casacore::MSTable< ColEnum, KeyEnum >::validate ( const TableDesc tabDesc)
static

tableDesc convenience functions

check that a TableDesc is valid

§ validate() [2/3]

template<class ColEnum, class KeyEnum>
static Bool casacore::MSTable< ColEnum, KeyEnum >::validate ( const TableRecord tabKeySet)
static

check that the keyword set is valid

§ validate() [3/3]

template<class ColEnum, class KeyEnum>
Bool casacore::MSTable< ColEnum, KeyEnum >::validate ( ) const
inline

Member Data Documentation

§ colCommentMap_p

template<class ColEnum, class KeyEnum>
SimpleOrderedMap<Int, String> casacore::MSTable< ColEnum, KeyEnum >::colCommentMap_p
staticprotected

ColEnum -> comment string.

Definition at line 276 of file MSTable.h.

§ colDTypeMap_p

template<class ColEnum, class KeyEnum>
SimpleOrderedMap<Int, Int> casacore::MSTable< ColEnum, KeyEnum >::colDTypeMap_p
staticprotected

ColEnum -> DataType.

Definition at line 274 of file MSTable.h.

§ colMeasureTypeMap_p

template<class ColEnum, class KeyEnum>
SimpleOrderedMap<Int, String> casacore::MSTable< ColEnum, KeyEnum >::colMeasureTypeMap_p
staticprotected

ColEnum -> MEASURE_TYPE string.

Definition at line 280 of file MSTable.h.

§ columnMap_p

template<class ColEnum, class KeyEnum>
SimpleOrderedMap<Int, String> casacore::MSTable< ColEnum, KeyEnum >::columnMap_p
staticprotected

These are the static ordered maps which contain the above info ColEnum -> name.

Definition at line 272 of file MSTable.h.

§ colUnitMap_p

template<class ColEnum, class KeyEnum>
SimpleOrderedMap<Int, String> casacore::MSTable< ColEnum, KeyEnum >::colUnitMap_p
staticprotected

ColEnum -> UNIT string.

Definition at line 278 of file MSTable.h.

§ keyCommentMap_p

template<class ColEnum, class KeyEnum>
SimpleOrderedMap<Int, String> casacore::MSTable< ColEnum, KeyEnum >::keyCommentMap_p
staticprotected

KeyEnum -> comment string.

Definition at line 288 of file MSTable.h.

§ keyDTypeMap_p

template<class ColEnum, class KeyEnum>
SimpleOrderedMap<Int, Int> casacore::MSTable< ColEnum, KeyEnum >::keyDTypeMap_p
staticprotected

KeyEnum -> DataType.

Definition at line 286 of file MSTable.h.

§ keywordMap_p

template<class ColEnum, class KeyEnum>
SimpleOrderedMap<Int, String> casacore::MSTable< ColEnum, KeyEnum >::keywordMap_p
staticprotected

KeyEnum -> name.

Definition at line 284 of file MSTable.h.

§ requiredTD_p

template<class ColEnum, class KeyEnum>
CountedPtr<TableDesc> casacore::MSTable< ColEnum, KeyEnum >::requiredTD_p
staticprotected

The required TableDesc.

static TableDesc requiredTD_p;

Definition at line 293 of file MSTable.h.


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