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);
406 #ifndef CASACORE_NO_AUTO_TEMPLATES
407 #include <casacore/tables/DataMan/ScaledComplexData.tcc>
Abstract base class for a data manager.
IPosition concatenate(const IPosition &other) const
Return an IPosition as the concetanation of this and another IPosition.
virtual DataManager * clone() const
Clone the engine object.
void scaleColumnOnPut(const Array< VirtualType > &array, Array< StoredType > &stored)
Scale and/or offset array to stored for the entire column.
IPosition storedShape(const IPosition &virtualShape) const
Determine the shape of an array in the stored column.
virtual IPosition shape(rownr_t rownr)
Get the shape of the array in the given row.
ScaledComplexData(const Record &spec)
Construct from a record specification as created by getmanagerSpec().
void scaleColumnOnGet(Array< VirtualType > &array, const Array< StoredType > &stored)
Scale and/or offset stored to array for the entire column.
virtual void putColumnSliceCells(const RefRows &rownrs, const Slicer &slicer, const Array< VirtualType > &data)
Put into a section of some arrays in the column.
void scaleOnPut(VirtualType scale, VirtualType offset, const Array< VirtualType > &array, Array< StoredType > &stored)
Scale and/or offset array to stored.
virtual void putSlice(rownr_t rownr, const Slicer &slicer, const Array< VirtualType > &array)
Put into a section of the array in the given row.
void scaleOnGet(VirtualType scale, VirtualType offset, Array< VirtualType > &array, const Array< StoredType > &stored)
Scale and/or offset stored to array.
static DataManager * makeObject(const String &dataManagerType, const Record &spec)
Define the "constructor" to construct this engine when a table is read back.
virtual void setShape(rownr_t rownr, const IPosition &shape)
Define the shape of the array in the given row.
virtual void getSlice(rownr_t rownr, const Slicer &slicer, Array< VirtualType > &array)
Get a section of the array in the given row.
virtual void create64(rownr_t initialNrrow)
Initialize the object for a new table.
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, const String &scaleColumnName, const String &offsetColumnName)
virtual void getArrayColumn(Array< VirtualType > &array)
Get an entire column.
static String className()
Return the name of the class.
ScaledComplexData(const ScaledComplexData< VirtualType, StoredType > &)
Copy constructor is only used by clone().
virtual void setShapeColumn(const IPosition &shape)
Set the shape of the FixedShape arrays in the column.
virtual void putArray(rownr_t rownr, const Array< VirtualType > &array)
Put an array in the given row.
Slicer storedSlicer(const Slicer &virtualSlicer) const
Convert the Slicer for a virtual to a Slicer for the stored.
virtual uInt ndim(rownr_t rownr)
Get the dimensionality of the array in the given row.
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 prepare()
Preparing consists of setting the writable switch and adding the initial number of rows in case of cr...
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.
String dataManagerType() const
Return the type name of the engine (i.e.
virtual void getColumnSliceCells(const RefRows &rownrs, const Slicer &slicer, Array< VirtualType > &data)
Get a section of some arrays in the column.
ScalarColumn< VirtualType > * offsetColumn_p
virtual void getColumnSlice(const Slicer &slicer, Array< VirtualType > &array)
Get a section of all arrays in the column.
virtual void putArrayColumnCells(const RefRows &rownrs, const Array< VirtualType > &data)
Put some array values in the column.
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 getArrayColumnCells(const RefRows &rownrs, Array< VirtualType > &data)
Get some array values in the column.
VirtualType getScale(rownr_t rownr)
Get the scale value for this row.
ScalarColumn< VirtualType > * scaleColumn_p
VirtualType getOffset(rownr_t rownr)
Get the offset value for this row.
static void registerClass()
Register the class name and the static makeObject "constructor".
virtual void getArray(rownr_t rownr, Array< VirtualType > &array)
Get an array in the given row.
~ScaledComplexData()
Destructor is mandatory.
virtual Record dataManagerSpec() const
Record a record containing data manager specifications.
virtual void putArrayColumn(const Array< VirtualType > &array)
Put an entire 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.
ScaledComplexData()
The default constructor is required for reconstruction of the engine when a table is read back.
String: the storage and methods of handling collections of characters.
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.
bool Bool
Define the standard types used by Casacore.
uInt64 rownr_t
Define the type of a row number in a table.