Go to the documentation of this file.
28 #ifndef TABLES_SCALEDCOMPLEXDATA_H
29 #define TABLES_SCALEDCOMPLEXDATA_H
33 #include <casacore/casa/aips.h>
34 #include <casacore/tables/DataMan/BaseMappedArrayEngine.h>
39 template<
class T>
class ScalarColumn;
147 template<
class VirtualType,
class StoredType>
166 const String& storedColumnName,
168 VirtualType offset = 0);
182 const String& storedColumnName,
183 const String& scaleColumnName,
184 VirtualType offset = 0);
186 const String& storedColumnName,
187 const String& scaleColumnName,
188 const String& offsetColumnName);
409 #ifndef CASACORE_NO_AUTO_TEMPLATES
410 #include <casacore/tables/DataMan/ScaledComplexData.tcc>
411 #endif //# CASACORE_NO_AUTO_TEMPLATES
virtual Bool canAccessArrayColumnCells(Bool &reask) const
The engine can access column cells.
String dataManagerType() const
Return the type name of the engine (i.e.
virtual void getArray(uInt rownr, Array< VirtualType > &array)
Get an array in the given row.
VirtualType getOffset(uInt rownr)
Get the offset value for this row.
ScalarColumn< VirtualType > * offsetColumn_p
void scaleOnGet(VirtualType scale, VirtualType offset, Array< VirtualType > &array, const Array< StoredType > &stored)
Scale and/or offset stored to array.
Abstract base class for a data manager.
ScaledComplexData(const String &virtualColumnName, const String &storedColumnName, const String &scaleColumnName, VirtualType offset=0)
Construct an engine to scale the arrays in a column.
virtual void putArray(uInt rownr, const Array< VirtualType > &array)
Put an array in the given row.
IPosition storedShape(const IPosition &virtualShape) const
Determine the shape of an array in the stored column.
virtual DataManager * clone() const
Clone the engine object.
static DataManager * makeObject(const String &dataManagerType, const Record &spec)
Define the "constructor" to construct this engine when a table is read back.
void scaleColumnOnPut(const Array< VirtualType > &array, Array< StoredType > &stored)
Scale and/or offset array to stored for the entire column.
virtual void getSlice(uInt rownr, const Slicer &slicer, Array< VirtualType > &array)
Get a section of the array in the given row.
virtual void getArrayColumn(Array< VirtualType > &array)
Get an entire column.
void scaleOnPut(VirtualType scale, VirtualType offset, const Array< VirtualType > &array, Array< StoredType > &stored)
Scale and/or offset array to stored.
virtual void putSlice(uInt rownr, const Slicer &slicer, const Array< VirtualType > &array)
Put into a section of the array in the given row.
virtual void putColumnSlice(const Slicer &slicer, const Array< VirtualType > &array)
Put a section of all arrays in the column.
ScaledComplexData(const String &virtualColumnName, const String &storedColumnName, VirtualType scale, VirtualType offset=0)
Construct an engine to scale all arrays in a column with the given offset and scale factor.
virtual void putColumnSliceCells(const RefRows &rownrs, const Slicer &slicer, const Array< VirtualType > &data)
Put into a section of some arrays in the column.
Slicer storedSlicer(const Slicer &virtualSlicer) const
Convert the Slicer for a virtual to a Slicer for the stored.
virtual Record dataManagerSpec() const
Record a record containing data manager specifications.
ScaledComplexData(const String &virtualColumnName, const String &storedColumnName, const String &scaleColumnName, const String &offsetColumnName)
ScaledComplexData(const ScaledComplexData< VirtualType, StoredType > &)
Copy constructor is only used by clone().
~ScaledComplexData()
Destructor is mandatory.
virtual void putArrayColumn(const Array< VirtualType > &array)
Put an entire column.
static String className()
Return the name of the class.
virtual void getColumnSlice(const Slicer &slicer, Array< VirtualType > &array)
Get a section of all arrays in the column.
virtual uInt ndim(uInt rownr)
Get the dimensionality of the array in the given row.
VirtualType getScale(uInt rownr)
Get the scale value for this row.
ScaledComplexData(const Record &spec)
Construct from a record specification as created by getmanagerSpec().
virtual void setShape(uInt rownr, const IPosition &shape)
Define the shape of the array in the given row.
this file contains all the compiler specific defines
TableExprNode array(const TableExprNode &values, const TableExprNodeSet &shape)
Create an array of the given shape and fill it with the values.
void scaleCellsOnGet(Array< VirtualType > &array, const Array< StoredType > &stored, const RefRows &rownrs)
Scale and/or offset stored to array for some cells in the column.
virtual void create(uInt initialNrrow)
Initialize the object for a new table.
ScalarColumn< VirtualType > * scaleColumn_p
static void registerClass()
Register the class name and the static makeObject "constructor".
ScaledComplexData()
The default constructor is required for reconstruction of the engine when a table is read back.
void scaleColumnOnGet(Array< VirtualType > &array, const Array< StoredType > &stored)
Scale and/or offset stored to array for the entire column.
virtual void getColumnSliceCells(const RefRows &rownrs, const Slicer &slicer, Array< VirtualType > &data)
Get a section of some arrays in the column.
virtual void getArrayColumnCells(const RefRows &rownrs, Array< VirtualType > &data)
Get some array values in the column.
template <class T, class U> class vector;
String: the storage and methods of handling collections of characters.
bool Bool
Define the standard types used by Casacore.
virtual void putArrayColumnCells(const RefRows &rownrs, const Array< VirtualType > &data)
Put some array values in the column.
virtual void setShapeColumn(const IPosition &shape)
Set the shape of the FixedShape arrays in the column.
void scaleCellsOnPut(const Array< VirtualType > &array, Array< StoredType > &stored, const RefRows &rownrs)
Scale and/or offset array to stored for some cells in the column.
virtual IPosition shape(uInt rownr)
Get the shape of the array in the given row.
virtual void prepare()
Preparing consists of setting the writable switch and adding the initial number of rows in case of cr...
IPosition concatenate(const IPosition &other) const
Return an IPosition as the concetanation of this and another IPosition.