28 #ifndef TABLES_SCALEDARRAYENGINE_H
29 #define TABLES_SCALEDARRAYENGINE_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/tables/DataMan/BaseMappedArrayEngine.h>
38 template<
class T>
class ScalarColumn;
161 const String& storedColumnName,
163 VirtualType offset = 0);
177 const String& storedColumnName,
178 const String& scaleColumnName,
179 VirtualType offset = 0);
181 const String& storedColumnName,
182 const String& scaleColumnName,
183 const String& offsetColumnName);
329 #ifndef CASACORE_NO_AUTO_TEMPLATES
330 #include <casacore/tables/DataMan/ScaledArrayEngine.tcc>
Abstract base class for a data manager.
static String className()
Return the name of the class.
void getArray(rownr_t rownr, Array< VirtualType > &array)
Get an array in the given row.
virtual String dataManagerName() const
Get the name given to the engine (is the virtual column name).
static DataManager * makeObject(const String &dataManagerType, const Record &spec)
VirtualType getOffset(rownr_t rownr)
Get the offset value for this row.
virtual Record dataManagerSpec() const
Record a record containing data manager specifications.
DataManager * clone() const
Clone the engine object.
void putArrayColumn(const Array< VirtualType > &array)
Put an entire column.
void scaleOnPut(VirtualType scale, VirtualType offset, const Array< VirtualType > &array, Array< StoredType > &stored)
Scale and/or offset array to stored.
ScaledArrayEngine(const ScaledArrayEngine< VirtualType, StoredType > &)
Copy constructor is only used by clone().
void putColumnSlice(const Slicer &slicer, const Array< VirtualType > &array)
Put a section of all arrays in the column.
ScaledArrayEngine(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.
void scaleColumnOnGet(Array< VirtualType > &array, const Array< StoredType > &stored)
Scale and/or offset stored to array for the entire column.
void scaleColumnOnPut(const Array< VirtualType > &array, Array< StoredType > &stored)
Scale and/or offset array to stored for the entire column.
void scaleOnGet(VirtualType scale, VirtualType offset, Array< VirtualType > &array, const Array< StoredType > &stored)
Scale and/or offset stored to array.
void getColumnSlice(const Slicer &slicer, Array< VirtualType > &array)
Get a section of all arrays in the column.
ScaledArrayEngine(const Record &spec)
Construct from a record specification as created by getmanagerSpec().
VirtualType getScale(rownr_t rownr)
Get the scale value for this row.
void putSlice(rownr_t rownr, const Slicer &slicer, const Array< VirtualType > &array)
Put into a section of the array in the given row.
virtual String dataManagerType() const
Return the type name of the engine (i.e.
~ScaledArrayEngine()
Destructor is mandatory.
static void registerClass()
Register the class name and the static makeObject "constructor".
void getArrayColumn(Array< VirtualType > &array)
Get an entire column.
ScaledArrayEngine(const String &virtualColumnName, const String &storedColumnName, const String &scaleColumnName, VirtualType offset=0)
Construct an engine to scale the arrays in a column.
ScaledArrayEngine(const String &virtualColumnName, const String &storedColumnName, const String &scaleColumnName, const String &offsetColumnName)
ScalarColumn< VirtualType > * offsetColumn_p
void create64(rownr_t initialNrrow)
Initialize the object for a new table.
void prepare()
Preparing consists of setting the writable switch and adding the initial number of rows in case of cr...
void getSlice(rownr_t rownr, const Slicer &slicer, Array< VirtualType > &array)
Get a section of the array in the given row.
ScalarColumn< VirtualType > * scaleColumn_p
void putArray(rownr_t rownr, const Array< VirtualType > &array)
Put an array in the given row.
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.