casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Attributes
casa::TiledDataStManAccessor Class Reference

Give access to some TiledDataStMan functions. More...

#include <TiledDataStManAccessor.h>

Inheritance diagram for casa::TiledDataStManAccessor:
casa::ROTiledStManAccessor casa::RODataManAccessor

List of all members.

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).
TiledDataStManAccessoroperator= (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.

Private Attributes

TiledDataStMantiledDataManPtr_p

Detailed Description

Give access to some TiledDataStMan functions.

Intended use:

Public interface

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

Definition at line 116 of file TiledDataStManAccessor.h.


Constructor & Destructor Documentation

casa::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.

Copy constructor (reference semantics).


Member Function Documentation

void casa::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).

void casa::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.

TiledDataStManAccessor& casa::TiledDataStManAccessor::operator= ( const TiledDataStManAccessor that)

Assignment (reference semantics).


Member Data Documentation

Definition at line 152 of file TiledDataStManAccessor.h.


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