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);
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.
VirtualType getScale(uInt rownr)
Get the scale value for this row.
TableExprNode array(const TableExprNode &values, const TableExprNodeSet &shape)
Create an array of the given shape and fill it with the values.
Templated virtual column engine for a table array of any type.
Templated virtual column engine to scale a table array.
void getArray(uInt rownr, Array< VirtualType > &array)
Get an array in the given row.
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
void create(uInt initialNrrow)
Initialize the object for a new table.
VirtualType getOffset(uInt rownr)
Get the offset value for this row.
ScalarColumn< VirtualType > * offsetColumn_p
DataManager * clone() const
Clone the engine object.
virtual String dataManagerType() const
Return the type name of the engine (i.e.
~ScaledArrayEngine()
Destructor is mandatory.
virtual String dataManagerName() const
Get the name given to the engine (is the virtual column name).
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.
virtual Record dataManagerSpec() const
Record a record containing data manager specifications.
static void registerClass()
Register the class name and the static makeObject "constructor".
A hierarchical collection of named fields of various types.
void putSlice(uInt rownr, const Slicer &slicer, const Array< VirtualType > &array)
Put into a section of the array in the given row.
bool Bool
Define the standard types used by Casacore.
void putArray(uInt rownr, const Array< VirtualType > &array)
Put an array in the given row.
void getColumnSlice(const Slicer &slicer, Array< VirtualType > &array)
Get a section of all arrays in the column.
template <class T, class U> class vector;
Specify which elements to extract from an n-dimensional array.
void putArrayColumn(const Array< VirtualType > &array)
Put an entire column.
Abstract base class for a data manager.
String: the storage and methods of handling collections of characters.
void getSlice(uInt rownr, const Slicer &slicer, Array< VirtualType > &array)
Get a section of the array in the given row.
void putColumnSlice(const Slicer &slicer, const Array< VirtualType > &array)
Put a section of all arrays in the column.
this file contains all the compiler specific defines
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.