26#ifndef TABLES_SCALEDARRAYENGINE_H
27#define TABLES_SCALEDARRAYENGINE_H
30#include <casacore/casa/aips.h>
31#include <casacore/tables/DataMan/BaseMappedArrayEngine.h>
36template<
class T>
class ScalarColumn;
159 const String& storedColumnName,
161 VirtualType offset = 0);
175 const String& storedColumnName,
176 const String& scaleColumnName,
177 VirtualType offset = 0);
179 const String& storedColumnName,
180 const String& scaleColumnName,
181 const String& offsetColumnName);
326#ifndef CASACORE_NO_AUTO_TEMPLATES
327#include <casacore/tables/DataMan/ScaledArrayEngine.tcc>
ArrayColumn< StoredType > & column()
Give access to the stored column.
void setNames(const String &virtualName, const String &storedName)
Set the virtual and stored column name.
const String & storedName() const
Get the stored column name.
const String & virtualName() const
Get the virtual column name.
Abstract base class for a data manager.
Table & table() const
Get the table this object is associated with.
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).
VirtualType getOffset(rownr_t rownr)
Get the offset value for this row.
virtual Record dataManagerSpec() const
Record a record containing data manager specifications.
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.
DataManager * clone() const
Clone the engine object.
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.
static DataManager * makeObject(const String &dataManagerType, const Record &spec)
~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.