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