TiledDataStManAccessor.h
Classes
- TiledDataStManAccessor -- Give access to some TiledDataStMan functions (full description)
Interface
- Public Members
- TiledDataStManAccessor (const Table& table, const String& dataManagerName)
- TiledDataStManAccessor ()
- ~TiledDataStManAccessor()
- TiledDataStManAccessor (const TiledDataStManAccessor& that)
- TiledDataStManAccessor& operator= (const TiledDataStManAccessor& that)
- void addHypercube (const IPosition& cubeShape, const IPosition& tileShape, const Record& values)
- void extendHypercube (uInt incrInLastDim, const Record& values)
Review Status
- Reviewed By:
- Gareth Hunt
- Date Reviewed:
- 94Nov17
Prerequisite
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
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
Member Description
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.
Copy constructor (reference semantics).
TiledDataStManAccessor& operator= (const TiledDataStManAccessor& that)
Assignment (reference semantics).
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).
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.