Loading...
Searching...
No Matches
casacore::TiledDataStManAccessor Class Reference
tables package (libcasa_tables) » DataMan_module

More...

`#include <TiledDataStManAccessor.h>`

## Public Member Functions

| TiledDataStManAccessor (const Table &table, const String &dataManagerName)
| Construct the object for the data manager in the table.
| TiledDataStManAccessor ()
| ~TiledDataStManAccessor ()
| TiledDataStManAccessor (const TiledDataStManAccessor &that)
| Copy constructor (reference semantics).
TiledDataStManAccessor & | operator= (const TiledDataStManAccessor &that)
| Assignment (reference semantics).
void | addHypercube (const IPosition &cubeShape, const IPosition &tileShape, const Record &values)
| Add a hypercube.
void | extendHypercube (uInt incrInLastDim, const Record &values)
| Extend the hypercube with the given number of elements in the last dimension.
Public Member Functions inherited from casacore::ROTiledStManAccessor
| ROTiledStManAccessor ()
| Default constructor should be used with care.
| ROTiledStManAccessor (const Table &table, const String &name, Bool byColumn=False)
| Construct the object for a data manager in the table given the name of the data manager or the column.
virtual | ~ROTiledStManAccessor ()
| ROTiledStManAccessor (const ROTiledStManAccessor &that)
| Copy constructor (reference semantics).
ROTiledStManAccessor & | operator= (const ROTiledStManAccessor &that)
| Assignment (reference semantics).
void | setMaximumCacheSize (uInt nMiB)
| Set the maximum cache size (in MibiByte) to be used by a hypercube in the storage manager.
uInt | maximumCacheSize () const
| Get the maximum cache size (in MiB).
uInt | cacheSize (rownr_t rownr) const
| Get the current cache size (in buckets) for the hypercube in the given row.
const IPosition & | hypercubeShape (rownr_t rownr) const
| Get the hypercube shape of the data in the given row.
const IPosition & | tileShape (rownr_t rownr) const
| Get the tile shape of the data in the given row.
uInt | bucketSize (rownr_t rownr) const
| Get the bucket size (in bytes) of the hypercube in the given row.
const Record & | valueRecord (rownr_t rownr) const
| Get coordinate and id values of the hypercube in the given row.
uInt | nhypercubes () const
| Return the number of hypercubes.
uInt | getCacheSize (uInt hypercube) const
| Get the current cache size (in buckets) for the given hypercube.
const IPosition & | getHypercubeShape (uInt hypercube) const
| Get the shape of the given hypercube.
const IPosition & | getTileShape (uInt hypercube) const
| Get the tile shape of the given hypercube.
uInt | getBucketSize (uInt hypercube) const
| Get the bucket size (in bytes) of the given hypercube.
const Record & | getValueRecord (uInt hypercube) const
| Get coordinate and id values of the given hypercube.
uInt | calcCacheSize (rownr_t rownr, const IPosition &sliceShape, const IPosition &axisPath) const
| Calculate the cache size (in buckets) for accessing the hypercube containing the given row.
uInt | calcCacheSize (rownr_t rownr, const IPosition &sliceShape, const IPosition &windowStart, const IPosition &windowLength, const IPosition &axisPath) const
void | setCacheSize (rownr_t rownr, const IPosition &sliceShape, const IPosition &axisPath, Bool forceSmaller=True)
| Set the cache size using the corresponding calcCacheSize function mentioned above.
void | setCacheSize (rownr_t rownr, const IPosition &sliceShape, const IPosition &windowStart, const IPosition &windowLength, const IPosition &axisPath, Bool forceSmaller=True)
void | setCacheSize (rownr_t rownr, uInt nbuckets, Bool forceSmaller=True)
| Set the cache size for accessing the hypercube containing the given row.
void | setHypercubeCacheSize (uInt hypercube, uInt nbuckets, Bool forceSmaller=True)
| This version allows setting the tile cache for a particular hypercube.
void | clearCaches ()
| Clear the caches used by the hypercubes in this storage manager.
Public Member Functions inherited from casacore::RODataManAccessor
| RODataManAccessor ()
| Construct an empty object.
| RODataManAccessor (const Table &table, const String &name, Bool byColumn)
| Construct the accessor object for a data manager in the table.
virtual | ~RODataManAccessor ()
void | setProperties (const Record &) const
| Set data manager properties using the fields in the record.
Record | getProperties () const
| Get data manager properties as a record.
String | dataManagerType () const
| Get the data manager type.
String | dataManagerName () const
| Get the data manager name.
uInt | dataManagerSeqNr () const
| Get the data manager sequence nr.
void | showCacheStatistics (ostream &os) const
| Show IO statistics.

## Private Attributes

TiledDataStMan * | tiledDataManPtr_p

## Additional Inherited Members

Protected Member Functions inherited from casacore::ROTiledStManAccessor
DataManager * | getDataManager () const
| Get the data manager.
Protected Member Functions inherited from casacore::RODataManAccessor
DataManager * | baseDataManager () const
| Get the data manager for the given data manager or column name.

## Detailed Description

Give access to some TiledDataStMan functions

### Intended use:

Public interface

### Review Status

Reviewed By:
  Gareth Hunt
Date Reviewed:
  94Nov17

### Prerequisite

- ROTiledStManAccessor
- TiledDataStMan

### Synopsis

The Table system has one or more storage managers underneath. These storage managers are invisible and there is no way to get access to them. However, the TiledDataStMan storage manager is quite specific. It has a few functions which need to be called by the user, in particular the functions defining and extending a hypercube.

The class TiledDataStManAccessor gives the user the means to access a TiledDataStMan object and to call the functions mentioned above. It can only be constructed for a table opened for read/write (because the functions in it need write access).

### Motivation

In principle a pointer to TiledDataStMan could be used. However, that would give access to all public functions. Furthermore it could not distinguish between read/write and readonly tables.

### Example

// Open a table for write.
Table table ("someName", Table::Update);
// Get access to the tiled data storage manager with name UVdata.
TiledDataStManAccessor accessor (Table, "UVdata");
// Add a hypercube to it (requires addition of rows).
// Define the values of the ID and coordinate columns.
// (The coordinate vectors have to be filled in one way or another).
Vector<double> timeVector(70);
Vector<double> baselineVector(60);
Vector<double> freqVector(50);
Vector<double> polVector(4);
Record values;
values.define ("ID", 4); // ID=4
values.define ("time", timeVector);
values.define ("baseline", baselineVector);
values.define ("freq", freqVector);
values.define ("pol", polVector);
table.addRow (4200);
accessor.addHypercube (IPosition(4,4,50,60,70), // cube shape
IPosition(4,4,5,6,7), // tile shape
values); // id/coord values
casacore::IPosition
Definition IPosition.h:117
casacore::Table
Definition Table.h:157
casacore::Table::Update
@ Update
update existing table
Definition Table.h:181
casacore::TiledDataStManAccessor::TiledDataStManAccessor
TiledDataStManAccessor(const Table &table, const String &dataManagerName)
Construct the object for the data manager in the table.
casacore::Vector
Definition Vector.h:82
casacore::Record
Record()

### To Do

- A base class RO_Tiled(Data)StManAccessor may once be needed for access to a tiled data storage manager in a readonly table

Definition at line 114 of file TiledDataStManAccessor.h.

## Constructor & Destructor Documentation

## TiledDataStManAccessor() [1/3]

casacore::TiledDataStManAccessor::TiledDataStManAccessor | ( | const Table & | table,
|  | const String & | dataManagerName )

Construct the object for the data manager in the table.

An exception is thrown if the data manager type does not match the type of this TiledDataStManAccessor object. Also an exception is thrown if the table is not open for read/write.

References casacore::RODataManAccessor::dataManagerName().

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

## TiledDataStManAccessor() [2/3]

casacore::TiledDataStManAccessor::TiledDataStManAccessor | ( |  | ) |

## ~TiledDataStManAccessor()

casacore::TiledDataStManAccessor::~TiledDataStManAccessor | ( |  | ) |

## TiledDataStManAccessor() [3/3]

casacore::TiledDataStManAccessor::TiledDataStManAccessor | ( | const TiledDataStManAccessor & | that | ) |

Copy constructor (reference semantics).

References TiledDataStManAccessor().

## Member Function Documentation

## addHypercube()

void casacore::TiledDataStManAccessor::addHypercube | ( | const IPosition & | cubeShape,
|  | const IPosition & | tileShape,
|  | const Record & | values )

Add a hypercube.

The possible coordinate- and id-values have to be given in the record (where the field names should be equal to the coordinate and id column names).

References casacore::Record(), and casacore::ROTiledStManAccessor::tileShape().

## extendHypercube()

void casacore::TiledDataStManAccessor::extendHypercube | ( | uInt | incrInLastDim,
|  | const Record & | values )

Extend the hypercube with the given number of elements in the last dimension.

The record should contain the id values (to get the correct hypercube) and coordinate values for the elements added.

References casacore::Record().

## operator=()

TiledDataStManAccessor & casacore::TiledDataStManAccessor::operator= | ( | const TiledDataStManAccessor & | that | ) |

Assignment (reference semantics).

References TiledDataStManAccessor().

## Member Data Documentation

## tiledDataManPtr_p

TiledDataStMan* casacore::TiledDataStManAccessor::tiledDataManPtr_p

private

Definition at line 150 of file TiledDataStManAccessor.h.

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

- tables/DataMan/TiledDataStManAccessor.h