casacore
Loading...
Searching...
No Matches
TiledDataStManAccessor.h
Go to the documentation of this file.
1//# TiledDataStManAccessor.h: Gives access to some TiledDataStMan functions
2//# Copyright (C) 1994,1995,1996,1997,1999
3//# Associated Universities, Inc. Washington DC, USA.
4//#
5//# This library is free software; you can redistribute it and/or modify it
6//# under the terms of the GNU Library General Public License as published by
7//# the Free Software Foundation; either version 2 of the License, or (at your
8//# option) any later version.
9//#
10//# This library is distributed in the hope that it will be useful, but WITHOUT
11//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13//# License for more details.
14//#
15//# You should have received a copy of the GNU Library General Public License
16//# along with this library; if not, write to the Free Software Foundation,
17//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18//#
19//# Correspondence concerning AIPS++ should be addressed as follows:
20//# Internet email: casa-feedback@nrao.edu.
21//# Postal address: AIPS++ Project Office
22//# National Radio Astronomy Observatory
23//# 520 Edgemont Road
24//# Charlottesville, VA 22903-2475 USA
25
26#ifndef TABLES_TILEDDATASTMANACCESSOR_H
27#define TABLES_TILEDDATASTMANACCESSOR_H
28
29//# Includes
30#include <casacore/casa/aips.h>
31#include <casacore/tables/DataMan/TiledStManAccessor.h>
32
33namespace casacore { //# NAMESPACE CASACORE - BEGIN
34
35//# Forward Declarations
36class TiledDataStMan;
37class Table;
38class String;
39class IPosition;
40class Record;
41
42
43// <summary>
44// Give access to some TiledDataStMan functions
45// </summary>
46
47// <use visibility=export>
48
49// <reviewed reviewer="Gareth Hunt" date="94Nov17" tests="">
50// </reviewed>
51
52// <prerequisite>
53//# Classes you should understand before using this one.
54// <li> <linkto class=ROTiledStManAccessor>ROTiledStManAccessor</linkto>
55// <li> <linkto class=TiledDataStMan>TiledDataStMan</linkto>
56// </prerequisite>
57
58// <synopsis>
59// The Table system has one or more storage managers underneath.
60// These storage managers are invisible and there is no way to
61// get access to them.
62// However, the <linkto class=TiledDataStMan>TiledDataStMan</linkto>
63// storage manager is quite specific. It has a few functions which
64// need to be called by the user, in particular the functions
65// defining and extending a hypercube.
66// <p>
67// The class TiledDataStManAccessor gives the user the means to
68// access a TiledDataStMan object and to call the functions mentioned above.
69// It can only be constructed for a table opened for read/write (because
70// the functions in it need write access).
71// </synopsis>
72
73// <motivation>
74// In principle a pointer to TiledDataStMan could be used.
75// However, that would give access to all public functions.
76// Furthermore it could not distinguish between read/write and readonly
77// tables.
78// </motivation>
79
80// <example>
81// <srcblock>
82// // Open a table for write.
83// Table table ("someName", Table::Update);
84// // Get access to the tiled data storage manager with name UVdata.
85// TiledDataStManAccessor accessor (Table, "UVdata");
86// // Add a hypercube to it (requires addition of rows).
87// // Define the values of the ID and coordinate columns.
88// // (The coordinate vectors have to be filled in one way or another).
89// Vector<double> timeVector(70);
90// Vector<double> baselineVector(60);
91// Vector<double> freqVector(50);
92// Vector<double> polVector(4);
93// Record values;
94// values.define ("ID", 4); // ID=4
95// values.define ("time", timeVector);
96// values.define ("baseline", baselineVector);
97// values.define ("freq", freqVector);
98// values.define ("pol", polVector);
99// table.addRow (4200);
100// accessor.addHypercube (IPosition(4,4,50,60,70), // cube shape
101// IPosition(4,4,5,6,7), // tile shape
102// values); // id/coord values
103// </srcblock>
104// </example>
105
106// <todo asof="$DATE:$">
107//# A List of bugs, limitations, extensions or planned refinements.
108// <li> A base class RO_Tiled(Data)StManAccessor may once be needed
109// for access to a tiled data storage manager in a readonly table
110// </todo>
111
112
113
115{
116public:
117
118 // Construct the object for the data manager in the table.
119 // An exception is thrown if the data manager type does not
120 // match the type of this TiledDataStManAccessor object.
121 // Also an exception is thrown if the table is not open for read/write.
124
126
127 // Copy constructor (reference semantics).
129
130 // Assignment (reference semantics).
132
133 // Add a hypercube.
134 // The possible coordinate- and id-values have to be given in the
135 // record (where the field names should be equal to the
136 // coordinate and id column names).
137 void addHypercube (const IPosition& cubeShape,
138 const IPosition& tileShape,
139 const Record& values);
140
141 // Extend the hypercube with the given number of elements in
142 // the last dimension.
143 // The record should contain the id values (to get the correct
144 // hypercube) and coordinate values for the elements added.
145 void extendHypercube (uInt incrInLastDim, const Record& values);
146
147
148private:
149 //# Declare the data members.
151};
152
153
154
155
156} //# NAMESPACE CASACORE - END
157
158#endif
String dataManagerName() const
Get the data manager name.
const IPosition & tileShape(rownr_t rownr) const
Get the tile shape of the data in the given row.
String: the storage and methods of handling collections of characters.
Definition String.h:223
TiledDataStManAccessor(const TiledDataStManAccessor &that)
Copy constructor (reference semantics).
TiledDataStManAccessor(const Table &table, const String &dataManagerName)
Construct the object for the data manager in the table.
void addHypercube(const IPosition &cubeShape, const IPosition &tileShape, const Record &values)
Add a hypercube.
TiledDataStManAccessor & operator=(const TiledDataStManAccessor &that)
Assignment (reference semantics).
void extendHypercube(uInt incrInLastDim, const Record &values)
Extend the hypercube with the given number of elements in the last dimension.
this file contains all the compiler specific defines
Definition mainpage.dox:28
unsigned int uInt
Definition aipstype.h:49