28 #ifndef TABLES_COLUMNSET_H
29 #define TABLES_COLUMNSET_H
A 1-D Specialization of the Array class.
void checkReadLock(Bool wait)
Check if the table is locked for read or write.
MultiFileBase * multiFile_p
Bool hasLock(FileLocker::LockType) const
Has this process the read or write lock, thus can the table be read or written safely?
ColumnSet(TableDesc *, const StorageOption &=StorageOption())
Construct from the table description.
DataManager * findDataManager(const String &name, Bool byColumn=False) const
Find the data manager with the given name or for the given column.
void removeLastDataManager()
Remove the last data manager (used by addColumn after an exception).
Bool putFile(Bool writeTable, AipsIO &, const TableAttr &, Bool fsync)
Write all the data and let the data managers flush their data.
TableDesc actualTableDesc() const
Get the actual table description.
rownr_t resync(rownr_t nrrow, Bool forceSync)
Synchronize the data managers when data in them have changed.
Bool areTablesMultiUsed() const
Are subtables used in other processes.
Main interface class to a read/write table.
Abstract base class to combine multiple files in a single one.
AipsIO is the object persistency mechanism of Casacore.
void addColumn(const ColumnDesc &columnDesc, Bool bigEndian, const TSMOption &tsmOption, Table &tab)
Add a column to the table.
Envelope class for the description of a table column.
void initSomeDataManagers(uInt from, Table &tab)
Let the data managers (from the given index on) initialize themselves.
DataManager * getDataManager(uInt seqnr) const
Get the correct data manager.
Class to hold table lock data.
void renameTables(const String &newName, const String &oldName)
Rename the necessary subtables in the column keywords.
void userUnlock(Bool releaseFlag)
Release a temporary user lock if the given release flag is True.
Class to manage a set of table columns.
Bool readLocking() const
Is read locking needed?
PlainColumn * getColumn(const String &columnName) const
Get a column by name.
Bool canRenameColumn(const String &columnName) const
Can a column be renamed in the data manager?
void initDataManagers(rownr_t nrrow, Bool bigEndian, const TSMOption &tsmOption, Table &tab)
Initialize the data managers for a new table.
int traceId() const
Get the trace-id of the table.
Bool canRemoveRow() const
Do all data managers and engines allow to remove rows?
Options defining how table files are organized.
void doAddColumn(const ColumnDesc &columnDesc, DataManager *dataManPtr)
Do the actual addition of a column.
const StorageOption & storageOption() const
Get the storage option.
std::map< void *, Int > checkRemoveColumn(const Vector< String > &columnNames)
Check if columns to be removed can be removed.
void autoReleaseLock()
Inspect the auto lock when the inspection interval has expired and release it when another process ne...
Block< void * > blockDataMan_p
void invalidateColumnCaches()
Invalidate the column caches for all columns.
std::map< String, void * > colMap_p
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...
Abstract base class for tables.
void autoRelease(Bool always=False)
When the inspection interval has expired, inspect if another process needs the lock.
void openMultiFile(uInt from, const Table &tab, ByteIO::OpenOption)
Open or create the MultiFile if needed.
Options for the Tiled Storage Manager Access.
rownr_t nrow() const
Get nr of rows.
A hierarchical collection of named fields of various types.
bool Bool
Define the standard types used by Casacore.
void renameColumn(const String &newName, const String &oldName)
Rename the column in the map.
int traceId() const
Get the table's trace-id.
void syncColumns(const ColumnSet &other, const TableAttr &defaultAttr)
Synchronize the columns after it appeared that data in the main table file have changed.
void linkToLockObject(TableLockData *lockObject)
Link the ColumnSet object to the TableLockData object.
void addRow(rownr_t nrrow)
Add rows to all data managers.
Base class for a column in a plain table.
Bool canAddRow() const
Do all data managers and engines allow to add rows?
void setTableChanged()
Set the table to being changed.
void checkWriteLock(Bool wait)
rownr_t getFile(AipsIO &, Table &tab, rownr_t nrrow, Bool bigEndian, const TSMOption &tsmOption)
Read the data, reconstruct the data managers, and link those to the table object. ...
uInt64 rownr_t
Define the type of a row number in a table.
void initialize(rownr_t startRownr, rownr_t endRownr)
Initialize rows startRownr till endRownr (inclusive).
void release(Bool always=False)
Release the lock.
OpenOption
Define the possible ByteIO open options.
Abstract base class for a data manager.
Block< Bool > & dataManChanged()
Get the data manager change flags (used by PlainTable).
void linkToTable(BaseTable *baseTableObject)
Link the ColumnSet object to the BaseTable object.
void checkDataManagerNames(const String &tableName) const
Check if no double data manager names have been given.
void doLock(FileLocker::LockType, Bool wait)
Check if the table is locked for read or write.
String: the storage and methods of handling collections of characters.
Define the structure of a Casacore table.
void reopenRW()
Reopen the data managers for read/write.
void addDataManager(DataManager *)
Add a data manager.
BaseTable * baseTablePtr_p
void removeRow(rownr_t rownr)
Remove a row from all data managers.
LockType
Define the possible lock types.
void prepareSomeDataManagers(uInt from)
Let the data managers (from the given index on) prepare themselves.
Bool canRemoveColumn(const Vector< String > &columnNames) const
Can the given columns be removed from the data manager?
Block< Bool > dataManChanged_p
Some attributes of a table.
Record dataManagerInfo(Bool virtualOnly=False) const
Get the data manager info.
TableLockData * lockPtr_p
StorageOption storageOpt_p
void removeColumn(const Vector< String > &columnNames)
Remove the columns from the map and the data manager.
Bool userLock(FileLocker::LockType, Bool wait)
If needed, get a temporary user lock.
virtual void setTableChanged()
Set the table to being 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.