casacore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | Static Public Member Functions | Private Attributes | Friends | List of all members
casacore::Adios2StMan Class Reference

#include <Adios2StMan.h>

Inheritance diagram for casacore::Adios2StMan:
casacore::DataManager

Classes

class  impl
 

Public Member Functions

 Adios2StMan (MPI_Comm mpiComm=MPI_COMM_WORLD, std::string engineType=std::string(), std::map< std::string, std::string > engineParams=std::map< std::string, std::string >(), std::vector< std::map< std::string, std::string >> transportParams=std::vector< std::map< std::string, std::string >>(), std::vector< std::map< std::string, std::string >> operatorParams=std::vector< std::map< std::string, std::string >>())
 
 Adios2StMan (std::string xmlFile, MPI_Comm mpiComm=MPI_COMM_WORLD)
 
virtual ~Adios2StMan ()
 
virtual DataManagerclone () const
 Make a clone of the derived object. More...
 
virtual String dataManagerType () const
 Return the type name of the data manager (in fact its class name). More...
 
virtual String dataManagerName () const
 Return the name of the data manager. More...
 
virtual void create64 (rownr_t aNrRows)
 Let the data manager initialize itself for a new table. More...
 
virtual rownr_t open64 (rownr_t aRowNr, AipsIO &ios)
 Let the data manager initialize itself for an existing table. More...
 
virtual rownr_t resync64 (rownr_t aRowNr)
 Resync the data by rereading cached data from the file. More...
 
virtual Bool flush (AipsIO &, Bool doFsync)
 Flush and optionally fsync the data. More...
 
virtual DataManagerColumnmakeScalarColumn (const String &aName, int aDataType, const String &aDataTypeID)
 Create a column in the data manager on behalf of a table column. More...
 
virtual DataManagerColumnmakeDirArrColumn (const String &aName, int aDataType, const String &aDataTypeID)
 Create a direct array column. More...
 
virtual DataManagerColumnmakeIndArrColumn (const String &aName, int aDataType, const String &aDataTypeID)
 Create an indirect array column. More...
 
virtual void deleteManager ()
 The data manager will be deleted (because all its columns are requested to be deleted). More...
 
virtual void addRow64 (rownr_t aNrRows)
 Add rows to all columns. More...
 
Record dataManagerSpec () const
 Return a record containing data manager specifications. More...
 
rownr_t getNrRows ()
 
- Public Member Functions inherited from casacore::DataManager
 DataManager ()
 Default constructor. More...
 
virtual ~DataManager ()
 
void dataManagerInfo (Record &info) const
 Add SEQNR and SPEC (the DataManagerSpec subrecord) to the info. More...
 
virtual Record getProperties () const
 Get data manager properties that can be modified. More...
 
virtual void setProperties (const Record &spec)
 Modify data manager properties given in record fields. More...
 
virtual Bool isStorageManager () const
 Is the data manager a storage manager? The default is yes. More...
 
virtual Bool canReallocateColumns () const
 Tell if the data manager wants to reallocate the data manager column objects. More...
 
virtual DataManagerColumnreallocateColumn (DataManagerColumn *column)
 Reallocate the column object if it is part of this data manager. More...
 
uInt sequenceNr () const
 Get the (unique) sequence nr of this data manager. More...
 
uInt ncolumn () const
 Get the nr of columns in this data manager (can be zero). More...
 
Bool asBigEndian () const
 Have the data to be stored in big or little endian canonical format? More...
 
const TSMOptiontsmOption () const
 Get the TSM option. More...
 
MultiFileBasemultiFile ()
 Get the MultiFile pointer (can be 0). More...
 
String keywordName (const String &keyword) const
 Compose a keyword name from the given keyword appended with the sequence number (e.g. More...
 
String fileName () const
 Compose a unique filename from the table name and sequence number. More...
 
ByteIO::OpenOption fileOption () const
 Get the AipsIO option of the underlying file. More...
 
virtual Bool isRegular () const
 Is this a regular storage manager? It is regular if it allows addition of rows and writing data in them. More...
 
Tabletable () const
 Get the table this object is associated with. More...
 
virtual void reopenRW ()
 Reopen the data manager for read/write access. More...
 
virtual Bool canAddRow () const
 Does the data manager allow to add rows? (default no) More...
 
virtual Bool canRemoveRow () const
 Does the data manager allow to delete rows? (default no) More...
 
virtual Bool canAddColumn () const
 Does the data manager allow to add columns? (default no) More...
 
virtual Bool canRemoveColumn () const
 Does the data manager allow to delete columns? (default no) More...
 
virtual Bool canRenameColumn () const
 Does the data manager allow to rename columns? (default yes) More...
 
virtual void setMaximumCacheSize (uInt nMiB)
 Set the maximum cache size (in bytes) to be used by a storage manager. More...
 
virtual void showCacheStatistics (std::ostream &) const
 Show the data manager's IO statistics. More...
 
DataManagerColumncreateScalarColumn (const String &columnName, int dataType, const String &dataTypeId)
 Create a column in the data manager on behalf of a table column. More...
 
DataManagerColumncreateDirArrColumn (const String &columnName, int dataType, const String &dataTypeId)
 Create a direct array column. More...
 
DataManagerColumncreateIndArrColumn (const String &columnName, int dataType, const String &dataTypeId)
 Create an indirect array column. More...
 
DataManagergetClone () const
 Has the object already been cloned? More...
 
void setClone (DataManager *clone) const
 Set the pointer to the clone. More...
 

Static Public Member Functions

static DataManagermakeObject (const String &aDataManType, 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. More...
 
static DataManagerCtor getCtor (const String &dataManagerType)
 Get the "constructor" of a data manager (thread-safe). More...
 
static Bool isRegistered (const String &dataManagerType)
 Test if a data manager is registered (thread-safe). More...
 
static DataManagerunknownDataManager (const String &dataManagerType, const Record &spec)
 Serve as default function for theirRegisterMap, which catches all unknown data manager types. More...
 

Private Attributes

std::unique_ptr< implpimpl
 

Friends

class Adios2StManColumn
 
template<typename T >
class Adios2StManColumnT
 

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. More...
 
- Protected Member Functions inherited from casacore::DataManager
void decrementNcolumn ()
 Decrement number of columns (in case a column is deleted). More...
 
void setEndian (Bool bigEndian)
 Tell the data manager if big or little endian format is needed. More...
 
void setTsmOption (const TSMOption &tsmOption)
 Tell the data manager which TSM option to use. More...
 
void setMultiFile (MultiFileBase *mfile)
 Tell the data manager that MultiFile can be used. More...
 
virtual Bool hasMultiFileSupport () const
 Does the data manager support use of MultiFile? A derived class has to return True if it can use the MultiFile. More...
 
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. More...
 

Detailed Description

Definition at line 45 of file Adios2StMan.h.

Constructor & Destructor Documentation

casacore::Adios2StMan::Adios2StMan ( MPI_Comm  mpiComm = MPI_COMM_WORLD,
std::string  engineType = std::string(),
std::map< std::string, std::string >  engineParams = std::map< std::string, std::string >(),
std::vector< std::map< std::string, std::string >>  transportParams = std::vector< std::map< std::string, std::string >>(),
std::vector< std::map< std::string, std::string >>  operatorParams = std::vector< std::map< std::string, std::string >>() 
)
casacore::Adios2StMan::Adios2StMan ( std::string  xmlFile,
MPI_Comm  mpiComm = MPI_COMM_WORLD 
)
virtual casacore::Adios2StMan::~Adios2StMan ( )
virtual

Member Function Documentation

virtual void casacore::Adios2StMan::addRow64 ( rownr_t  nrrow)
virtual

Add rows to all columns.


The default implementation calls the uInt version.

Reimplemented from casacore::DataManager.

virtual DataManager* casacore::Adios2StMan::clone ( ) const
virtual

Make a clone of the derived object.

Implements casacore::DataManager.

virtual void casacore::Adios2StMan::create64 ( rownr_t  nrrow)
virtual

Let the data manager initialize itself for a new table.


The default implementation calls the uInt version.

Reimplemented from casacore::DataManager.

virtual String casacore::Adios2StMan::dataManagerName ( ) const
virtual

Return the name of the data manager.

This is the name of this instantiation of the data manager, thus not its type name. By default it returns an empty string.

Reimplemented from casacore::DataManager.

Record casacore::Adios2StMan::dataManagerSpec ( ) const
virtual

Return a record containing data manager specifications.

The default implementation returns an empty record.

Reimplemented from casacore::DataManager.

virtual String casacore::Adios2StMan::dataManagerType ( ) const
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.

virtual void casacore::Adios2StMan::deleteManager ( )
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.

virtual Bool casacore::Adios2StMan::flush ( AipsIO ios,
Bool  fsync 
)
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.

rownr_t casacore::Adios2StMan::getNrRows ( )
virtual DataManagerColumn* casacore::Adios2StMan::makeDirArrColumn ( const String columnName,
int  dataType,
const String dataTypeId 
)
virtual

Create a direct array column.

Implements casacore::DataManager.

virtual DataManagerColumn* casacore::Adios2StMan::makeIndArrColumn ( const String columnName,
int  dataType,
const String dataTypeId 
)
virtual

Create an indirect array column.

Implements casacore::DataManager.

static DataManager* casacore::Adios2StMan::makeObject ( const String aDataManType,
const Record spec 
)
static
virtual DataManagerColumn* casacore::Adios2StMan::makeScalarColumn ( const String columnName,
int  dataType,
const String dataTypeId 
)
virtual

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

Create a scalar column.

Implements casacore::DataManager.

virtual rownr_t casacore::Adios2StMan::open64 ( rownr_t  nrrow,
AipsIO ios 
)
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.

virtual rownr_t casacore::Adios2StMan::resync64 ( rownr_t  nrrow)
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.

Friends And Related Function Documentation

friend class Adios2StManColumn
friend

Definition at line 47 of file Adios2StMan.h.

template<typename T >
friend class Adios2StManColumnT
friend

Definition at line 48 of file Adios2StMan.h.

Member Data Documentation

std::unique_ptr<impl> casacore::Adios2StMan::pimpl
private

Definition at line 88 of file Adios2StMan.h.


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