Go to the documentation of this file.
28 #ifndef TABLES_STMANAIPSIO_H
29 #define TABLES_STMANAIPSIO_H
33 #include <casacore/casa/aips.h>
34 #include <casacore/tables/DataMan/DataManager.h>
35 #include <casacore/tables/DataMan/StManColumn.h>
36 #include <casacore/casa/Containers/Block.h>
37 #include <casacore/casa/BasicSL/Complex.h>
38 #include <casacore/casa/Arrays/IPosition.h>
39 #include <casacore/casa/BasicSL/String.h>
40 #include <casacore/casa/IO/ByteIO.h>
475 const String& dataTypeID);
478 const String& dataTypeID);
481 const String& dataTypeID);
virtual void getScalarColumnCellsShortV(const RefRows &rownrs, Vector< Short > *dataPtr)
PtrBlock< StManColumnAipsIO * > colSet_p
The assembly of all columns.
uInt nrow() const
Get the nr of rows in this storage manager.
int dtype_p
The data type (for caching purposes).
virtual Bool flush(AipsIO &, Bool fsync)
Flush and optionally fsync the data.
void getuShortV(uInt rownr, uShort *dataPtr)
DataManagerColumn * makeIndArrColumn(const String &name, int dataType, const String &dataTypeID)
Create an indirect array column.
uInt nrext_p
The nr of extensions in use.
void putBlockdoubleV(uInt rownr, uInt nrmax, const double *dataPtr)
uInt uniqnr_p
Unique nr for column in this storage manager.
void * allocData(uInt nrval, Bool byPtr)
Allocate an extension with the data type of the column.
uInt findExt(uInt rownr, Bool setCache)
Find the extension in which the row number is.
Abstract base class for a data manager.
void putBlockuShortV(uInt rownr, uInt nrmax, const uShort *dataPtr)
OpenOption
Define the possible ByteIO open options.
void putShortV(uInt rownr, const Short *dataPtr)
void addRow(uInt nrrow)
Add rows to all columns.
Bool canAddRow() const
Does the storage manager allow to add rows? (yes)
void getComplexV(uInt rownr, Complex *dataPtr)
A drop-in replacement for Block<T*>.
void putfloatV(uInt rownr, const float *dataPtr)
void getBoolV(uInt rownr, Bool *dataPtr)
Get a scalar value in the given row.
uInt getBlockuCharV(uInt rownr, uInt nrmax, uChar *dataPtr)
void getfloatV(uInt rownr, float *dataPtr)
void getuIntV(uInt rownr, uInt *dataPtr)
void putdoubleV(uInt rownr, const double *dataPtr)
void deleteAll()
Delete all extensions.
std::complex< Double > DComplex
void getdoubleV(uInt rownr, double *dataPtr)
void resize(uInt nrval)
Resize the data blocks.
virtual void putFile(uInt nrval, AipsIO &)
Write the column data into AipsIO.
String dataManagerName() const
Get the name given to this storage manager.
uInt getBlockdoubleV(uInt rownr, uInt nrmax, double *dataPtr)
virtual ~StManColumnAipsIO()
Frees up the storage.
void getShortV(uInt rownr, Short *dataPtr)
StManAipsIO()
Create an AipsIO storage manager.
virtual Bool ok() const
Check if the class invariants still hold.
virtual void putData(void *datap, uInt nrval, AipsIO &)
Put the data (nrval elements) in an extension (starting at datap) into AipsIO.
virtual void getScalarColumnCellsIntV(const RefRows &rownrs, Vector< Int > *dataPtr)
void putBlockShortV(uInt rownr, uInt nrmax, const Short *dataPtr)
AipsIO table storage manager class.
uInt nextExt(void *&ext, uInt &extnr, uInt nrmax) const
Get the next extension.
StManAipsIO(const String &storageManagerName)
Create an AipsIO storage manager with the given name.
String stmanName_p
Name given by user to this storage manager.
String dataManagerType() const
Get the type name of the data manager (i.e.
DataManager * clone() const
Clone this object.
virtual void getScalarColumnCellsuShortV(const RefRows &rownrs, Vector< uShort > *dataPtr)
Abstract base class for a column in a data manager.
void setHasPut()
Set the hasPut_p flag.
StManArrayFile * iosfile_p
The file containing the indirect arrays.
virtual void remove(uInt rownr)
Remove the given row.
uInt nralloc_p
The number of allocated rows in the column.
virtual void getScalarColumnCellsStringV(const RefRows &rownrs, Vector< String > *dataPtr)
void getDComplexV(uInt rownr, DComplex *dataPtr)
uInt getBlockDComplexV(uInt rownr, uInt nrmax, DComplex *dataPtr)
StManColumnAipsIO(StManAipsIO *stMan, int dataType, Bool byPtr)
Create a column of the given type.
virtual void getData(void *datap, uInt index, uInt nrval, AipsIO &, uInt version)
Get data (nrval elements) into an extension (starting at datap plus the given index).
void putBlockInt64V(uInt rownr, uInt nrmax, const Int64 *dataPtr)
void putInt64V(uInt rownr, const Int64 *dataPtr)
void putBlockIntV(uInt rownr, uInt nrmax, const Int *dataPtr)
uInt getBlockComplexV(uInt rownr, uInt nrmax, Complex *dataPtr)
int dataType() const
Return the data type of the column.
void putuIntV(uInt rownr, const uInt *dataPtr)
void putComplexV(uInt rownr, const Complex *dataPtr)
void getIntV(uInt rownr, Int *dataPtr)
uInt nrrow_p
The number of rows in the columns.
void * getArrayPtr(uInt rownr)
Get the pointer for the given row.
virtual void getScalarColumnCellsDComplexV(const RefRows &rownrs, Vector< DComplex > *dataPtr)
void deleteData(void *datap, Bool byPtr)
Delete an extension.
virtual void doCreate(uInt nrrow)
Create the number of rows in a new table.
virtual void getScalarColumnCellsfloatV(const RefRows &rownrs, Vector< float > *dataPtr)
virtual void getScalarColumnCellsuIntV(const RefRows &rownrs, Vector< uInt > *dataPtr)
void putBlockuCharV(uInt rownr, uInt nrmax, const uChar *dataPtr)
StManAipsIO * stmanPtr_p
The storage manager.
Bool byPtr_p
The data is indirectly accessed via a pointer (for the derived classes).
uInt getBlockShortV(uInt rownr, uInt nrmax, Short *dataPtr)
Block< void * > data_p
The assembly of all extensions (actually Block<T*>).
void putIntV(uInt rownr, const Int *dataPtr)
void addColumn(DataManagerColumn *)
Add a column.
void putDComplexV(uInt rownr, const DComplex *dataPtr)
virtual void getScalarColumnCellsuCharV(const RefRows &rownrs, Vector< uChar > *dataPtr)
uInt getBlockfloatV(uInt rownr, uInt nrmax, float *dataPtr)
void getuCharV(uInt rownr, uChar *dataPtr)
Block< uInt > ncum_p
The cumulative nr of rows in all extensions.
void putBlockComplexV(uInt rownr, uInt nrmax, const Complex *dataPtr)
static DataManager * makeObject(const String &dataManagerType, const Record &spec)
Make the object from the string.
virtual void getFile(uInt nrval, AipsIO &)
Read the column data from AipsIO.
StManAipsIO(const StManAipsIO &)
Forbid copy constructor.
Bool canAddColumn() const
Does the storage manager allow to add columns? (yes)
this file contains all the compiler specific defines
uInt getBlockBoolV(uInt rownr, uInt nrmax, Bool *dataPtr)
Get scalars from the given row on with a maximum of nrmax values.
virtual void getScalarColumnCellsdoubleV(const RefRows &rownrs, Vector< double > *dataPtr)
void removeRow(uInt rownr)
Delete a row from all columns.
uInt getBlockuShortV(uInt rownr, uInt nrmax, uShort *dataPtr)
void getInt64V(uInt rownr, Int64 *dataPtr)
void putBlockStringV(uInt rownr, uInt nrmax, const String *dataPtr)
virtual void deleteManager()
The data manager will be deleted (because all its columns are requested to be deleted).
void putArrayPtr(uInt rownr, void *dataPtr)
Put the pointer for the given row.
void removeData(void *datap, uInt inx, uInt nrvalAfter)
Remove an entry (i.e.
void putBoolV(uInt rownr, const Bool *dataPtr)
Put a scalar value into the given row.
virtual void getScalarColumnCellsComplexV(const RefRows &rownrs, Vector< Complex > *dataPtr)
virtual void reopenRW()
Reopen the storage manager files for read/write.
DataManagerColumn * makeDirArrColumn(const String &name, int dataType, const String &dataTypeID)
Create a direct array column.
void putStringV(uInt rownr, const String *dataPtr)
StManAipsIO(const String &storageManagerName, const Record &)
void putBlockuIntV(uInt rownr, uInt nrmax, const uInt *dataPtr)
StManColumnAipsIO & operator=(const StManColumnAipsIO &)
Forbid assignment.
virtual void resync(uInt nrrow)
Resync the storage manager with the new file contents.
DataManagerColumn * makeScalarColumn(const String &name, int dataType, const String &dataTypeID)
Create a column in the storage manager on behalf of a table column.
virtual void reopenRW()
Reopen the storage manager files for read/write.
virtual void create(uInt nrrow)
Let the storage manager create files as needed for a new table.
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
void putBlockDComplexV(uInt rownr, uInt nrmax, const DComplex *dataPtr)
Bool hasPut_p
Has anything been put since the last flush?
Bool canRemoveRow() const
Does the storage manager allow to delete rows? (yes)
uInt getBlockInt64V(uInt rownr, uInt nrmax, Int64 *dataPtr)
String: the storage and methods of handling collections of characters.
uInt uniqueNr()
Get a unique column number for the column (it is only unique for this storage manager).
virtual void getScalarColumnCellsInt64V(const RefRows &rownrs, Vector< Int64 > *dataPtr)
bool Bool
Define the standard types used by Casacore.
std::complex< Float > Complex
virtual void getScalarColumnCellsBoolV(const RefRows &rownrs, Vector< Bool > *dataPtr)
Get the scalar values in some cells of the column.
Bool canRemoveColumn() const
Does the storage manager allow to delete columns? (yes)
virtual void open(uInt nrrow, AipsIO &)
Open the storage manager file for an existing table and read in the data and let the StManColumnAipsI...
void putuShortV(uInt rownr, const uShort *dataPtr)
StManAipsIO & operator=(const StManAipsIO &)
Forbid assignment.
virtual void addRow(uInt newNrrow, uInt oldNrrow)
Add (newNrrow-oldNrrow) rows to the column.
StManArrayFile * openArrayFile(ByteIO::OpenOption opt)
Open (if needed) the file for indirect arrays with the given mode.
uInt getBlockIntV(uInt rownr, uInt nrmax, Int *dataPtr)
uInt getBlockuIntV(uInt rownr, uInt nrmax, uInt *dataPtr)
void putuCharV(uInt rownr, const uChar *dataPtr)
uInt getBlockStringV(uInt rownr, uInt nrmax, String *dataPtr)
void getStringV(uInt rownr, String *dataPtr)
void removeColumn(DataManagerColumn *)
Delete a column.
StManColumnAipsIO(const StManColumnAipsIO &)
Forbid copy constructor.
void putBlockBoolV(uInt rownr, uInt nrmax, const Bool *dataPtr)
Put nrmax scalars from the given row on.
void putBlockfloatV(uInt rownr, uInt nrmax, const float *dataPtr)