Go to the documentation of this file.
28 #ifndef TABLES_COLUMNSET_H
29 #define TABLES_COLUMNSET_H
33 #include <casacore/casa/aips.h>
34 #include <casacore/tables/Tables/TableLockData.h>
35 #include <casacore/tables/Tables/BaseTable.h>
36 #include <casacore/tables/Tables/StorageOption.h>
37 #include <casacore/casa/BasicSL/String.h>
56 template<
class T>
class Vector;
void removeColumn(const Vector< String > &columnNames)
Remove the columns from the map and the data manager.
void doAddColumn(const ColumnDesc &columnDesc, DataManager *dataManPtr)
Do the actual addition of a column.
void release(Bool always=False)
Release the lock.
void invalidateColumnCaches()
Invalidate the column caches for all columns.
uInt getFile(AipsIO &, Table &tab, uInt nrrow, Bool bigEndian, const TSMOption &tsmOption)
Read the data, reconstruct the data managers, and link those to the table object.
uInt nrow() const
Get nr of rows.
Record dataManagerInfo(Bool virtualOnly=False) const
Get the data manager info.
Abstract base class for a data manager.
TableLockData * lockPtr_p
OpenOption
Define the possible ByteIO open options.
void linkToLockObject(TableLockData *lockObject)
Link the ColumnSet object to the TableLockData object.
BaseTable * baseTablePtr_p
uInt resync(uInt nrrow, Bool forceSync)
Synchronize the data managers when data in them have changed.
void renameTables(const String &newName, const String &oldName)
Rename the necessary subtables in the column keywords.
void autoRelease(Bool always=False)
When the inspection interval has expired, inspect if another process needs the lock.
void linkToTable(BaseTable *baseTableObject)
Link the ColumnSet object to the BaseTable object.
void removeRow(uInt rownr)
Remove a row from all data managers.
void initDataManagers(uInt nrrow, Bool bigEndian, const TSMOption &tsmOption, Table &tab)
Initialize the data managers for a new table.
void userUnlock(Bool releaseFlag)
Release a temporary user lock if the given release flag is True.
Bool canAddRow() const
Do all data managers and engines allow to add rows?
@ Read
Acquire a read lock.
void autoReleaseLock()
Inspect the auto lock when the inspection interval has expired and release it when another process ne...
LockType
Define the possible lock types.
void checkWriteLock(Bool wait)
void checkDataManagerNames(const String &tableName) const
Check if no double data manager names have been given.
void initialize(uInt startRownr, uInt endRownr)
Initialize rows startRownr till endRownr (inclusive).
Bool putFile(Bool writeTable, AipsIO &, const TableAttr &, Bool fsync)
Write all the data and let the data managers flush their data.
Bool hasLock(FileLocker::LockType) const
Has this process the read or write lock, thus can the table be read or written safely?
void addColumn(const ColumnDesc &columnDesc, const DataManager &dataManager, Bool bigEndian, const TSMOption &tsmOption, Table &tab)
Bool canRemoveColumn(const Vector< String > &columnNames) const
Can the given columns be removed from the data manager?
void doLock(FileLocker::LockType, Bool wait)
Check if the table is locked for read or write.
MultiFileBase * multiFile_p
Block< void * > blockDataMan_p
std::map< void *, Int > checkRemoveColumn(const Vector< String > &columnNames)
Check if columns to be removed can be removed.
DataManager * getDataManager(uInt seqnr) const
Get the correct data manager.
Bool areTablesMultiUsed() const
Are subtables used in other processes.
DataManager * findDataManager(const String &name, Bool byColumn=False) const
Find the data manager with the given name or for the given column.
void addColumn(const TableDesc &tableDesc, const DataManager &dataManager, Bool bigEndian, const TSMOption &tsmOption, Table &tab)
Block< Bool > & dataManChanged()
Get the data manager change flags (used by PlainTable).
Bool canRemoveRow() const
Do all data managers and engines allow to remove rows?
void removeLastDataManager()
Remove the last data manager (used by addColumn after an exception).
TableDesc actualTableDesc() const
Get the actual table description.
int traceId() const
Get the trace-id of the table.
@ Write
Acquire a write lock.
Abstract base class to combine multiple files in a single one.
Bool readLocking() const
Is read locking needed?
void addColumn(const ColumnDesc &columnDesc, Bool bigEndian, const TSMOption &tsmOption, Table &tab)
Add a column to the table.
void addRow(uInt nrrow)
Add rows to all data managers.
Bool canRenameColumn(const String &columnName) const
Can a column be renamed in the data manager?
this file contains all the compiler specific defines
std::map< String, void * > colMap_p
void reopenRW()
Reopen the data managers for read/write.
void checkReadLock(Bool wait)
Check if the table is locked for read or write.
Bool userLock(FileLocker::LockType, Bool wait)
If needed, get a temporary user lock.
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
String uniqueDataManagerName(const String &name) const
Make a unique data manager name by appending a suffix _n if needed where n is a number that makes the...
void addDataManager(DataManager *)
Add a data manager.
String: the storage and methods of handling collections of characters.
Block< Bool > dataManChanged_p
bool Bool
Define the standard types used by Casacore.
const StorageOption & storageOption() const
Get the storage option.
void syncColumns(const ColumnSet &other, const TableAttr &defaultAttr)
Synchronize the columns after it appeared that data in the main table file have changed.
Bool checkDataManagerName(const String &name, uInt from, const String &tableName, Bool doTthrow=True) const
Check if a data manager name has not already been used.
PlainColumn * getColumn(const String &columnName) const
Get a column by name.
void setTableChanged()
Set the table to being changed.
void renameColumn(const String &newName, const String &oldName)
Rename the column in the map.
PlainColumn * getColumn(uInt columnIndex) const
Get a column by index.
void initSomeDataManagers(uInt from, Table &tab)
Let the data managers (from the given index on) initialize themselves.
void addColumn(const ColumnDesc &columnDesc, const String &dataManager, Bool byName, Bool bigEndian, const TSMOption &tsmOption, Table &tab)
virtual void setTableChanged()
Set the table to being changed.
void prepareSomeDataManagers(uInt from)
Let the data managers (from the given index on) prepare themselves.
int traceId() const
Get the table's trace-id.
ColumnSet(TableDesc *, const StorageOption &=StorageOption())
Construct from the table description.
StorageOption storageOpt_p
void openMultiFile(uInt from, const Table &tab, ByteIO::OpenOption)
Open or create the MultiFile if needed.