casacore
|
#include <DataManInfo.h>
Static Public Member Functions | |
static void | removeHypercolumns (TableDesc &tabDesc) |
Remove hypercolumn definitions from the table description. More... | |
static void | adjustTSM (TableDesc &tabDesc, Record &dminfo) |
Replace TiledDataStMan by TiledShapeStMan in the DataManagerInfo record. More... | |
static Record | adjustStMan (const Record &dminfo, const String &dmType, Bool replaceMSM=True) |
Replace non-writable storage managers by the given storage manager (usually StandardStMan or IncrementalStMan). More... | |
static void | makeUniqueNames (Record &dminfo) |
Ensure all data manager names in dminfo are unique by adding a unique suffix as needed (using function uniqueName ). More... | |
static String | uniqueName (const Record &dminfo, const String &name, Int excludeDM=-1) |
Return a unique data manager name by testing if the name already exist in of the the dm-s in the dminfo record. More... | |
static void | mergeInfo (Record &, const Record &) |
Merge the second DataManagerInfo record into the first one. More... | |
static Record | finalizeMerge (const TableDesc &, const Record &dminfo) |
Finalize the merge by merging the dminfo record with the table description to create the final dminfo record. More... | |
static void | adaptNames (Record &dminfo, const Table &) |
Adapt data manager names in dminfo if already used in the table. More... | |
static void | setTiledStMan (Record &dminfo, const Vector< String > &columns, const String &dmType, const String &dmName, const IPosition &defaultTileShape) |
Set the data managers of the given column(s) to the given tiled storage manager (normally TiledShapeStMan or TiledColumnStMan). More... | |
static Vector< String > | removeDminfoColumns (Record &dminfo, const Vector< String > &columns, const String &keepType=String()) |
Remove the given columns from the dminfo record and return a vector containing the names of the columns actually removed. More... | |
static void | adjustDesc (TableDesc &tabDesc, const Record &dminfo) |
Adjust the data manager types and groups and the hypercolumn definitions to the actual data manager info. More... | |
static void | showDataManStats (const Table &, ostream &) |
Show the Table IO statistics. More... | |
Static Private Member Functions | |
static void | mergeColumns (Record &dminfo, uInt dmindex, Record &newdm) |
Merge the column info of data manager definitions. More... | |
Class with static functions to manipulate a datamanager record.
Public interface
DataManInfo is a class to manipulate a datamanager info record and/or table description. A datamanager info record tells how the columns are stored. It is a Record containing the following fields. If omitted, a default is used.
Often an existing table description and datamanager info record are used to construct a new table, but it might be necessary to change it somewhat.
Definition at line 85 of file DataManInfo.h.
Adapt data manager names in dminfo if already used in the table.
Adjust the data manager types and groups and the hypercolumn definitions to the actual data manager info.
|
static |
Replace non-writable storage managers by the given storage manager (usually StandardStMan or IncrementalStMan).
It is possible to specify the new data manager type to use. This is needed for special storage managers like LofarStMan. If replaceMSM is set, MemoryStMan is also replaced.
Replace TiledDataStMan by TiledShapeStMan in the DataManagerInfo record.
Since TiledShapeStMan does not support ID columns, they are adjusted as well in tabDesc and dminfo.
|
static |
Finalize the merge by merging the dminfo record with the table description to create the final dminfo record.
The final dminfo record gets all columns in the TableDesc object. The given dminfo object is leading in determining a column's data manager. If not present, the data manager type given in the TableDesc is used. If empty, StandardStMan is used.
|
static |
Ensure all data manager names in dminfo
are unique by adding a unique suffix as needed (using function uniqueName
).
Empty names are set to the name of the first column (DM if no columns).
|
staticprivate |
Merge the column info of data manager definitions.
It is used by mergeInfo
to merge the new dm definitions into the existing one defined in dminfo
. It is called for each new dm, whose name/type already exists as the dmindex-th record in dminfo. It does two things:
Merge the second DataManagerInfo record into the first one.
If the same column occurs in both records, the second one is used. Columns having the same data manager name are combined in one data manager. If the second one has no name, it is considered to be equal to the first data manager of that type.
|
static |
Remove the given columns from the dminfo record and return a vector containing the names of the columns actually removed.
The columns having a data manager matching keepType
are not removed. Matching means that the beginning of the data manager name has to match, so "Tiled" matches all tiled storagemanagers.
|
static |
Remove hypercolumn definitions from the table description.
|
static |
Set the data managers of the given column(s) to the given tiled storage manager (normally TiledShapeStMan or TiledColumnStMan).
The columns are combined in a single storage manager, so the function has to be called multiple times if, say, one per column is needed. The columns already having a tiled storage manager are not changed.
|
static |
Show the Table IO statistics.
|
static |
Return a unique data manager name by testing if the name already exist in of the the dm-s in the dminfo
record.
If so, a suffix _i is added where i makes the name unique. The excludeDM-th dm is excluded, so comparing to itself can be avoided.