28 #ifndef TABLES_SCALEDARRAYENGINE_H
29 #define TABLES_SCALEDARRAYENGINE_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);
271 void scaleOnGet (VirtualType scale, VirtualType offset,
278 void scaleOnPut (VirtualType scale, VirtualType offset,
329 #ifndef CASACORE_NO_AUTO_TEMPLATES
330 #include <casacore/tables/DataMan/ScaledArrayEngine.tcc>
331 #endif //# CASACORE_NO_AUTO_TEMPLATES
static String className()
Return the name of the class.
DataManager * clone() const
Clone the engine object.
void putArray(rownr_t rownr, const Array< VirtualType > &array)
Put an array in the given row.
TableExprNode array(const TableExprNode &values, const TableExprNodeSet &shape)
Create an array of the given shape and fill it with the values.
void putSlice(rownr_t rownr, const Slicer &slicer, const Array< VirtualType > &array)
Put into a section of the array in the given row.
Templated virtual column engine for a table array of any type.
Templated virtual column engine to scale a table array.
static DataManager * makeObject(const String &dataManagerType, const Record &spec)
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...
ScalarColumn< VirtualType > * scaleColumn_p
virtual Record dataManagerSpec() const
Record a record containing data manager specifications.
ScalarColumn< VirtualType > * offsetColumn_p
~ScaledArrayEngine()
Destructor is mandatory.
void prepare()
Preparing consists of setting the writable switch and adding the initial number of rows in case of cr...
void scaleOnPut(VirtualType scale, VirtualType offset, const Array< VirtualType > &array, Array< StoredType > &stored)
Scale and/or offset array to stored.
static void registerClass()
Register the class name and the static makeObject "constructor".
A hierarchical collection of named fields of various types.
bool Bool
Define the standard types used by Casacore.
void getColumnSlice(const Slicer &slicer, Array< VirtualType > &array)
Get a section of all arrays in the column.
A templated N-D Array class with zero origin. Array<T, Alloc> is a templated, N-dimensional, Array class. The origin is zero, but by default indices are zero-based. This Array class is the base class for the Vector, Matrix, and Cube subclasses.
Specify which elements to extract from an n-dimensional array.
void putArrayColumn(const Array< VirtualType > &array)
Put an entire column.
void getSlice(rownr_t rownr, const Slicer &slicer, Array< VirtualType > &array)
Get a section of the array in the given row.
uInt64 rownr_t
Define the type of a row number in a table.
void getArray(rownr_t rownr, Array< VirtualType > &array)
Get an array in the given row.
void create64(rownr_t initialNrrow)
Initialize the object for a new table.
virtual String dataManagerType() const
Return the type name of the engine (i.e.
Abstract base class for a data manager.
String: the storage and methods of handling collections of characters.
VirtualType getScale(rownr_t rownr)
Get the scale value for this row.
void putColumnSlice(const Slicer &slicer, const Array< VirtualType > &array)
Put a section of all arrays in the column.
virtual String dataManagerName() const
Get the name given to the engine (is the virtual column name).
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 getArrayColumn(Array< VirtualType > &array)
Get an entire column.
void scaleColumnOnGet(Array< VirtualType > &array, const Array< StoredType > &stored)
Scale and/or offset stored to array for the entire column.
VirtualType getOffset(rownr_t rownr)
Get the offset value for this row.