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// <summary>
43// Give access to some TiledDataStMan functions
44// </summary>
45
46// <use visibility=export>
47
48// <reviewed reviewer="Gareth Hunt" date="94Nov17" tests="">
49// </reviewed>
50
51// <prerequisite>
52// # Classes you should understand before using this one.
53// <li> <linkto class=ROTiledStManAccessor>ROTiledStManAccessor</linkto>
54// <li> <linkto class=TiledDataStMan>TiledDataStMan</linkto>
55// </prerequisite>
56
57// <synopsis>
58// The Table system has one or more storage managers underneath.
59// These storage managers are invisible and there is no way to
60// get access to them.
61// However, the <linkto class=TiledDataStMan>TiledDataStMan</linkto>
62// storage manager is quite specific. It has a few functions which
63// need to be called by the user, in particular the functions
64// defining and extending a hypercube.
65// <p>
66// The class TiledDataStManAccessor gives the user the means to
67// access a TiledDataStMan object and to call the functions mentioned above.
68// It can only be constructed for a table opened for read/write (because
69// the functions in it need write access).
70// </synopsis>
71
72// <motivation>
73// In principle a pointer to TiledDataStMan could be used.
74// However, that would give access to all public functions.
75// Furthermore it could not distinguish between read/write and readonly
76// tables.
77// </motivation>
78
79// <example>
80// <srcblock>
81// // Open a table for write.
82// Table table ("someName", Table::Update);
83// // Get access to the tiled data storage manager with name UVdata.
84// TiledDataStManAccessor accessor (Table, "UVdata");
85// // Add a hypercube to it (requires addition of rows).
86// // Define the values of the ID and coordinate columns.
87// // (The coordinate vectors have to be filled in one way or another).
88// Vector<double> timeVector(70);
89// Vector<double> baselineVector(60);
90// Vector<double> freqVector(50);
91// Vector<double> polVector(4);
92// Record values;
93// values.define ("ID", 4); // ID=4
94// values.define ("time", timeVector);
95// values.define ("baseline", baselineVector);
96// values.define ("freq", freqVector);
97// values.define ("pol", polVector);
98// table.addRow (4200);
99// accessor.addHypercube (IPosition(4,4,50,60,70), // cube shape
100// IPosition(4,4,5,6,7), // tile shape
101// values); // id/coord values
102// </srcblock>
103// </example>
104
105// <todo asof="$DATE:$">
106// # A List of bugs, limitations, extensions or planned refinements.
107// <li> A base class RO_Tiled(Data)StManAccessor may once be needed
108// for access to a tiled data storage manager in a readonly table
109// </todo>
110
112 public:
113 // Construct the object for the data manager in the table.
114 // An exception is thrown if the data manager type does not
115 // match the type of this TiledDataStManAccessor object.
116 // Also an exception is thrown if the table is not open for read/write.
119
121
122 // Copy constructor (reference semantics).
124
125 // Assignment (reference semantics).
127
128 // Add a hypercube.
129 // The possible coordinate- and id-values have to be given in the
130 // record (where the field names should be equal to the
131 // coordinate and id column names).
132 void addHypercube(const IPosition& cubeShape, const IPosition& tileShape, const Record& values);
133
134 // Extend the hypercube with the given number of elements in
135 // the last dimension.
136 // The record should contain the id values (to get the correct
137 // hypercube) and coordinate values for the elements added.
138 void extendHypercube(uInt incrInLastDim, const Record& values);
139
140 private:
141 // # Declare the data members.
143};
144
145} // namespace casacore
146
147#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.
ROTiledStManAccessor()
Default constructor should be used with care.
String: the storage and methods of handling collections of characters.
Definition String.h:355
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.
For temporary backward namespace compatibility, use casa as alias for casacore.
Definition mainpage.dox:28
unsigned int uInt
Definition aipstype.h:49