Loading...
Searching...
No Matches
casacore::AntennaPairStMan Class Referencefinal

A storage manager that saves the antenna columns with (lossless) compression. More...

`#include <AntennaPairStMan.h>`

## Public Member Functions

| AntennaPairStMan (const String &, const Record &)
| AntennaPairStMan (const AntennaPairStMan &source)
| The columns are not copied: the new manager will be empty.
| ~AntennaPairStMan () noexcept
AntennaPairStMan & | operator= (const AntennaPairStMan &source)=delete
DataManager * | clone () const final
| Make a clone of the derived object.
String | dataManagerType () const final
| Return the type name of the data manager (in fact its class name).
Record | dataManagerSpec () const final
| Return a record containing data manager specifications.
casacore::Bool | canAddColumn () const final
| Does the data manager allow to add columns?
Public Member Functions inherited from casacore::DataManager
| DataManager ()
| Default constructor.
virtual | ~DataManager ()
| DataManager (const DataManager &)=delete
| The copy constructor cannot be used for this base class.
DataManager & | operator= (const DataManager &)=delete
| Assignment cannot be used for this base class.
virtual String | dataManagerName () const
| Return the name of the data manager.
void | dataManagerInfo (Record &info) const
| Add SEQNR and SPEC (the DataManagerSpec subrecord) to the info.
virtual Record | getProperties () const
| Get data manager properties that can be modified.
virtual void | setProperties (const Record &spec)
| Modify data manager properties given in record fields.
virtual Bool | isStorageManager () const
| Is the data manager a storage manager?
virtual Bool | canReallocateColumns () const
| Tell if the data manager wants to reallocate the data manager column objects.
virtual DataManagerColumn * | reallocateColumn (DataManagerColumn *column)
| Reallocate the column object if it is part of this data manager.
uInt | sequenceNr () const
| Get the (unique) sequence nr of this data manager.
uInt | ncolumn () const
| Get the nr of columns in this data manager (can be zero).
Bool | asBigEndian () const
| Have the data to be stored in big or little endian canonical format?
const TSMOption & | tsmOption () const
| Get the TSM option.
std::shared_ptr< MultiFileBase > | multiFile ()
| Get the MultiFile pointer (can be 0).
String | keywordName (const String &keyword) const
| Compose a keyword name from the given keyword appended with the sequence number (e.g.
String | fileName () const
| Compose a unique filename from the table name and sequence number.
ByteIO::OpenOption | fileOption () const
| Get the AipsIO option of the underlying file.
virtual Bool | isRegular () const
| Is this a regular storage manager?
Table & | table () const
| Get the table this object is associated with.
virtual Bool | canAddRow () const
| Does the data manager allow to add rows?
virtual Bool | canRemoveRow () const
| Does the data manager allow to delete rows?
virtual Bool | canRemoveColumn () const
| Does the data manager allow to delete columns?
virtual Bool | canRenameColumn () const
| Does the data manager allow to rename columns?
virtual void | setMaximumCacheSize (uInt nMiB)
| Set the maximum cache size (in bytes) to be used by a storage manager.
virtual void | showCacheStatistics (std::ostream &) const
| Show the data manager's IO statistics.
DataManagerColumn * | createScalarColumn (const String &columnName, int dataType, const String &dataTypeId)
| Create a column in the data manager on behalf of a table column.
DataManagerColumn * | createDirArrColumn (const String &columnName, int dataType, const String &dataTypeId)
| Create a direct array column.
DataManagerColumn * | createIndArrColumn (const String &columnName, int dataType, const String &dataTypeId)
| Create an indirect array column.
DataManager * | getClone () const
| Has the object already been cloned?
void | setClone (DataManager *clone) const
| Set the pointer to the clone.

## Static Public Member Functions

static DataManager * | makeObject (const String &name, const Record &spec)
Static Public Member Functions inherited from casacore::DataManager
static void | registerCtor (const String &type, DataManagerCtor func)
| Register a mapping of a data manager type to its static construction function.
static DataManagerCtor | getCtor (const String &dataManagerType)
| Get the "constructor" of a data manager (thread-safe).
static Bool | isRegistered (const String &dataManagerType)
| Test if a data manager is registered (thread-safe).
static DataManager * | unknownDataManager (const String &dataManagerType, const Record &spec)
| Serve as default function for theirRegisterMap, which catches all unknown data manager types.

## Private Member Functions

Bool | flush (AipsIO &, Bool) final
| Flush and optionally fsync the data.
void | create64 (rownr_t nRow) final
| Let the data manager initialize itself for a new table.
rownr_t | open64 (rownr_t nRow, AipsIO &) final
| Let the data manager initialize itself for an existing table.
DataManagerColumn * | makeScalarColumn (const String &name, int dataType, const String &dataTypeID) final
| Create a column in the data manager on behalf of a table column.
DataManagerColumn * | makeDirArrColumn (const String &, int, const String &) final
| Create a direct array column.
DataManagerColumn * | makeIndArrColumn (const String &, int, const String &) final
| Create an indirect array column.
rownr_t | resync64 (rownr_t nRow) final
| Resync the data by rereading cached data from the file.
void | deleteManager () final
| The data manager will be deleted (because all its columns are requested to be deleted).
void | reopenRW () final
| Reopen the storage manager files for read/write.
void | addRow64 (rownr_t nrrow) final
| Add rows to the storage manager.
void | removeRow64 (rownr_t row_nr) final
| Delete a row from all columns.
void | addColumn (DataManagerColumn *) final
| Do the final addition of a column.
void | removeColumn (DataManagerColumn *) final
| Remove a column from the data file.

## Private Attributes

std::string | name_
std::array< std::unique_ptr< AntennaPairStManColumn >, 2 > | columns_
AntennaPairFile | file_

## Additional Inherited Members

Static Public Attributes inherited from casacore::DataManager
static rownr_t | MAXROWNR32
| Define the highest row number that can be represented as signed 32-bit.
Protected Member Functions inherited from casacore::DataManager
void | decrementNcolumn ()
| Decrement number of columns (in case a column is deleted).
void | setEndian (Bool bigEndian)
| Tell the data manager if big or little endian format is needed.
void | setTsmOption (const TSMOption &tsmOption)
| Tell the data manager which TSM option to use.
void | setMultiFile (const std::shared_ptr< MultiFileBase > &mfile)
| Tell the data manager that MultiFile can be used.
virtual Bool | hasMultiFileSupport () const
| Does the data manager support use of MultiFile?
void | throwDataTypeOther (const String &columnName, int dataType) const
| Throw an exception in case data type is TpOther, because the storage managers (and maybe other data managers) do not support such columns.

## Detailed Description

A storage manager that saves the antenna columns with (lossless) compression.

Definition at line 20 of file AntennaPairStMan.h.

## Constructor & Destructor Documentation

## AntennaPairStMan() [1/2]

casacore::AntennaPairStMan::AntennaPairStMan | ( | const String & | ,
|  | const Record & | )

References casacore::Record().

Referenced by AntennaPairStMan(), clone(), makeObject(), and operator=().

## AntennaPairStMan() [2/2]

casacore::AntennaPairStMan::AntennaPairStMan | ( | const AntennaPairStMan & | source | ) |

The columns are not copied: the new manager will be empty.

References AntennaPairStMan().

## ~AntennaPairStMan()

casacore::AntennaPairStMan::~AntennaPairStMan | ( |  | ) |

noexcept

## Member Function Documentation

## addColumn()

void casacore::AntennaPairStMan::addColumn | ( | DataManagerColumn * |  | ) |

inline final private virtual

Do the final addition of a column.

Reimplemented from casacore::DataManager.

Definition at line 83 of file AntennaPairStMan.h.

## addRow64()

void casacore::AntennaPairStMan::addRow64 | ( | rownr_t | nrrow | ) |

final private virtual

Add rows to the storage manager.

Reimplemented from casacore::DataManager.

## canAddColumn()

casacore::Bool casacore::AntennaPairStMan::canAddColumn | ( |  | ) | const

inline final virtual

Does the data manager allow to add columns?

(default no)

Reimplemented from casacore::DataManager.

Definition at line 43 of file AntennaPairStMan.h.

## clone()

DataManager * casacore::AntennaPairStMan::clone | ( |  | ) | const

inline final virtual

Make a clone of the derived object.

Implements casacore::DataManager.

Definition at line 33 of file AntennaPairStMan.h.

References AntennaPairStMan(), clone(), and casacore::DataManager::DataManager().

Referenced by clone().

## create64()

void casacore::AntennaPairStMan::create64 | ( | rownr_t | nrrow | ) |

final private virtual

Let the data manager initialize itself for a new table.

The default implementation calls the uInt version.

Reimplemented from casacore::DataManager.

## dataManagerSpec()

Record casacore::AntennaPairStMan::dataManagerSpec | ( |  | ) | const

inline final virtual

Return a record containing data manager specifications.

The default implementation returns an empty record.

Reimplemented from casacore::DataManager.

Definition at line 41 of file AntennaPairStMan.h.

References casacore::Record().

## dataManagerType()

String casacore::AntennaPairStMan::dataManagerType | ( |  | ) | const

inline final virtual

Return the type name of the data manager (in fact its class name).

It has to be a unique name, thus if the class is templated the template parameter has to be part of the name. This is used by the open/flush mechanism to be able to reconstruct the correct data manager.

Implements casacore::DataManager.

Definition at line 39 of file AntennaPairStMan.h.

## deleteManager()

void casacore::AntennaPairStMan::deleteManager | ( |  | ) |

final private virtual

The data manager will be deleted (because all its columns are requested to be deleted).

So clean up the things needed (e.g. delete files).

Implements casacore::DataManager.

## flush()

Bool casacore::AntennaPairStMan::flush | ( | AipsIO & | ios,
|  | Bool | fsync )

inline final private virtual

Flush and optionally fsync the data.

The AipsIO stream represents the main table file and can be used by virtual column engines to store SMALL amounts of data. It returns a True status if it had to flush (i.e. if data have changed).

Implements casacore::DataManager.

Definition at line 46 of file AntennaPairStMan.h.

## makeDirArrColumn()

DataManagerColumn * casacore::AntennaPairStMan::makeDirArrColumn | ( | const String & | columnName,
|  | int | dataType,
|  | const String & | dataTypeId )

inline final private virtual

Create a direct array column.

Implements casacore::DataManager.

Definition at line 55 of file AntennaPairStMan.h.

## makeIndArrColumn()

DataManagerColumn * casacore::AntennaPairStMan::makeIndArrColumn | ( | const String & | columnName,
|  | int | dataType,
|  | const String & | dataTypeId )

inline final private virtual

Create an indirect array column.

Implements casacore::DataManager.

Definition at line 62 of file AntennaPairStMan.h.

## makeObject()

DataManager * casacore::AntennaPairStMan::makeObject | ( | const String & | name,
|  | const Record & | spec )

inline static

Definition at line 35 of file AntennaPairStMan.h.

References AntennaPairStMan(), casacore::DataManager::DataManager(), casacore::name(), and casacore::Record().

## makeScalarColumn()

DataManagerColumn * casacore::AntennaPairStMan::makeScalarColumn | ( | const String & | columnName,
|  | int | dataType,
|  | const String & | dataTypeId )

final private virtual

Create a column in the data manager on behalf of a table column.

Create a scalar column.

Implements casacore::DataManager.

References casacore::dataType(), and casacore::name().

## open64()

rownr_t casacore::AntennaPairStMan::open64 | ( | rownr_t | nrrow,
|  | AipsIO & | ios )

final private virtual

Let the data manager initialize itself for an existing table.

The AipsIO stream represents the main table file and must be used by virtual column engines to retrieve the data stored in the flush function.
The data manager returns 0 or the nr of rows it thinks there are. This is particularly useful for data managers like LofarStMan whose data are written outside the table system, thus for which no rows have been added.
The default implementation calls the uInt version of open and open1.

Reimplemented from casacore::DataManager.

## operator=()

AntennaPairStMan & casacore::AntennaPairStMan::operator= | ( | const AntennaPairStMan & | source | ) |

delete

References AntennaPairStMan().

## removeColumn()

void casacore::AntennaPairStMan::removeColumn | ( | DataManagerColumn * |  | ) |

final private virtual

Remove a column from the data file.

Reimplemented from casacore::DataManager.

## removeRow64()

void casacore::AntennaPairStMan::removeRow64 | ( | rownr_t | row_nr | ) |

final private virtual

Delete a row from all columns.

Reimplemented from casacore::DataManager.

## reopenRW()

void casacore::AntennaPairStMan::reopenRW | ( |  | ) |

inline final private virtual

Reopen the storage manager files for read/write.

Reimplemented from casacore::DataManager.

Definition at line 74 of file AntennaPairStMan.h.

References reopenRW().

Referenced by reopenRW().

## resync64()

rownr_t casacore::AntennaPairStMan::resync64 | ( | rownr_t | nrrow | ) |

inline final private virtual

Resync the data by rereading cached data from the file.

This is called when a lock is acquired on the file and it appears that data in this data manager has been changed by another process.
The data manager returns 0 or the number of rows it thinks there are. This is particularly useful for data managers like LofarStMan whose data are written outside the table system, thus for which no rows have been added.
The default implementation calls the uInt version of resync and resync1.

Reimplemented from casacore::DataManager.

Definition at line 69 of file AntennaPairStMan.h.

## Member Data Documentation

## columns_

std::array<std::unique_ptr<AntennaPairStManColumn>, 2> casacore::AntennaPairStMan::columns_

private

Definition at line 89 of file AntennaPairStMan.h.

## file_

AntennaPairFile casacore::AntennaPairStMan::file_

private

Definition at line 90 of file AntennaPairStMan.h.

## name_

std::string casacore::AntennaPairStMan::name_

private

Definition at line 88 of file AntennaPairStMan.h.

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

- tables/AlternateMans/AntennaPairStMan.h