|
casacore
|
#include <TableMeasOffsetDesc.h>
Public Member Functions | |
| TableMeasOffsetDesc (const Measure &offset) | |
| Constructor which defines a constant (non-variable) offset. | |
| TableMeasOffsetDesc (const TableMeasDescBase &offsetColumn, Bool asArray=False) | |
| Constructor for defining a variable offset. | |
| TableMeasOffsetDesc (const TableMeasOffsetDesc &that) | |
| Copy constructor (copy semantics). | |
| ~TableMeasOffsetDesc () | |
| TableMeasOffsetDesc & | operator= (const TableMeasOffsetDesc &that) |
| Assignment operator (copy semantics). | |
| const Measure & | getOffset () const |
| Get the (non-variable) measure offset for this column. | |
| Bool | isVariable () const |
| Returns True if the offset varies per row. | |
| Bool | isArray () const |
| Returns True if the offset varies per array element. | |
| const String & | columnName () const |
| Gets the name of the column which stores the variable offset. | |
| void | resetOffset (const Measure &offset) |
| Reset the offset. | |
| void | write (TableDesc &, TableRecord &measInfo, const String &prefix) |
| Write the information into the record. | |
| void | write (Table &, TableRecord &measInfo, const String &prefix) |
Static Public Member Functions | |
| static TableMeasOffsetDesc * | reconstruct (const TableRecord &measInfo, const String &prefix, const Table &tab) |
| Reconstructs the TableMeasOffsetDesc from the measInfo TableRecord. | |
Private Member Functions | |
| TableMeasOffsetDesc (const TableRecord &measInfo, const String &prefix, const Table &) | |
| Constructor which uses the measInfo TableRecord. | |
| void | writeKeys (TableRecord &measInfo, const String &prefix) |
| Write the actual keywords. | |
Private Attributes | |
| TableMeasDescBase * | itsTMDesc |
| MeasureHolder | itsMeasure |
| String | itsVarColName |
| Bool | itsVarPerArr |
Definition of a Measure Offset in a Table.
Public interface
This class assists in the definition of the offset component of a TableMeasDesc in the TableMeasures system. Four possibilities exist for specifying the handling of measure offsets in a Measure column. These are:
Note that this last option is only relevant when using ArrayMeasColumns.
Examples of each of these follow.
Specifying a single fixed offset. Note that a Measure offset is itself a measure
Storing an offset per row needs an offset column. Measure offsets are Measures so a Measure column is needed:
For an example of the use of the TableMeasOffsetDesc class in the context of a full TableMeasDesc declaration see class TableMeasDesc.
Creating the required keyword for the definition of a Measure in a Table is somewhat complicated. This class assists in that process.
Definition at line 143 of file TableMeasOffsetDesc.h.
| casacore::TableMeasOffsetDesc::TableMeasOffsetDesc | ( | const Measure & | offset | ) |
Constructor which defines a constant (non-variable) offset.
All measures in the columns will have the same offset.
References casacore::offset().
Referenced by operator=(), reconstruct(), and TableMeasOffsetDesc().
| casacore::TableMeasOffsetDesc::TableMeasOffsetDesc | ( | const TableMeasDescBase & | offsetColumn, |
| Bool | asArray = False ) |
Constructor for defining a variable offset.
If asArray is True then the offset is stored per array element. The default is for the offset to be stored (and hence variable) per row.
References casacore::False.
| casacore::TableMeasOffsetDesc::TableMeasOffsetDesc | ( | const TableMeasOffsetDesc & | that | ) |
Copy constructor (copy semantics).
References TableMeasOffsetDesc().
| casacore::TableMeasOffsetDesc::~TableMeasOffsetDesc | ( | ) |
|
private |
Constructor which uses the measInfo TableRecord.
|
inline |
Gets the name of the column which stores the variable offset.
"" is returned if the offset is not variable.
Definition at line 183 of file TableMeasOffsetDesc.h.
References itsVarColName.
| const Measure & casacore::TableMeasOffsetDesc::getOffset | ( | ) | const |
Get the (non-variable) measure offset for this column.
If it doesn't exist (thus if the offset is variable), an exception is thrown.
|
inline |
Returns True if the offset varies per array element.
Definition at line 178 of file TableMeasOffsetDesc.h.
References isVariable(), and itsVarPerArr.
|
inline |
Returns True if the offset varies per row.
Definition at line 174 of file TableMeasOffsetDesc.h.
References itsTMDesc.
Referenced by isArray().
| TableMeasOffsetDesc & casacore::TableMeasOffsetDesc::operator= | ( | const TableMeasOffsetDesc & | that | ) |
Assignment operator (copy semantics).
References TableMeasOffsetDesc().
|
static |
Reconstructs the TableMeasOffsetDesc from the measInfo TableRecord.
References TableMeasOffsetDesc().
| void casacore::TableMeasOffsetDesc::resetOffset | ( | const Measure & | offset | ) |
Reset the offset.
It overwrites the value used when defining the TableMeasDesc. It is only possible if it was defined as fixed for the entire column.
References casacore::offset().
| void casacore::TableMeasOffsetDesc::write | ( | Table & | , |
| TableRecord & | measInfo, | ||
| const String & | prefix ) |
| void casacore::TableMeasOffsetDesc::write | ( | TableDesc & | , |
| TableRecord & | measInfo, | ||
| const String & | prefix ) |
Write the information into the record.
|
private |
Write the actual keywords.
|
private |
Definition at line 199 of file TableMeasOffsetDesc.h.
|
private |
Definition at line 198 of file TableMeasOffsetDesc.h.
Referenced by isVariable().
|
private |
Definition at line 200 of file TableMeasOffsetDesc.h.
Referenced by columnName().
|
private |
Definition at line 201 of file TableMeasOffsetDesc.h.
Referenced by isArray().