28 #ifndef TABLES_CONCATTABLE_H
29 #define TABLES_CONCATTABLE_H
33 #include <casacore/casa/aips.h>
34 #include <casacore/tables/Tables/BaseTable.h>
35 #include <casacore/tables/Tables/ConcatRows.h>
36 #include <casacore/tables/Tables/TableRecord.h>
37 #include <casacore/tables/Tables/Table.h>
38 #include <casacore/casa/BasicSL/String.h>
39 #include <casacore/casa/Arrays/Vector.h>
134 const String& subDirName);
296 Bool byColumn)
const;
const TableDesc & tableDesc() const
Get the table description.
int tableOption() const
Get the table option.
virtual ~ConcatTable()
The destructor flushes (i.e.
void makeConcatCol()
Create the ConcatColumn objects for all columns in the description.
virtual void addColumn(const ColumnDesc &columnDesc, const String &dataManager, Bool byName, Bool addToParent)
virtual BaseColumn * getColumn(const String &columnName) const
Get a column object using its name.
virtual uInt getModifyCounter() const
Get the modify counter.
virtual void renameHypercolumn(const String &newName, const String &oldName)
Rename a hypercolumn.
virtual TableRecord & rwKeywordSet()
Get read/write access to the table keyword set.
void initialize()
Initialize.
void setup(BaseTable *btp, const Vector< String > &columnNames)
Setup the main parts of the object.
static void getLayout(TableDesc &desc, AipsIO &ios)
Return the layout of a table (i.e.
virtual void removeColumn(const Vector< String > &columnNames)
Remove a column.
virtual void flush(Bool fsync, Bool recursive)
Flush the table, i.e.
virtual int tableType() const
It returns the type of the parent table.
virtual void renameColumn(const String &newName, const String &oldName)
Rename a column.
virtual void unlock()
Unlock the table.
ConcatTable(AipsIO &, const String &name, rownr_t nrrow, int option, const TableLock &lockOptions, const TSMOption &tsmOption)
Create a concat table out of a file (written by writeConcatTable).
virtual void addColumn(const ColumnDesc &columnDesc, const DataManager &dataManager, Bool addToParent)
std::map< String, ConcatColumn * > colMap_p
virtual Bool isWritable() const
Test if all underlying tables are opened as writable.
ConcatTable(const ConcatTable &)
Copy constructor is forbidden, because copying a table requires some more knowledge (like table name ...
void handleSubTables()
Handle the subtales that have to be concatenated.
virtual DataManager * findDataManager(const String &name, Bool byColumn) const
Find the data manager with the given name or for the given column.
ConcatTable(const Block< String > &tableNames, const Block< String > &subTables, const String &subDirName, int option, const TableLock &lockOptions, const TSMOption &tsmOption)
Table asTable()
Create a (temporary) Table object from it.
virtual Bool hasLock(FileLocker::LockType) const
Has this process the read or write lock, thus can the table be read or written safely?
virtual void removeRow(rownr_t rownr)
Remove the given row.
virtual Bool asBigEndian() const
Is the table stored in big or little endian format? It returns the endianness of the first underlying...
void showStructureExtra(std::ostream &) const
Show the extra table structure info (names of used tables).
virtual void addColumn(const TableDesc &tableDesc, const DataManager &dataManager, Bool addToParent)
virtual void addColumn(const ColumnDesc &columnDesc, Bool addToParent)
Add one or more columns to the table.
const ConcatRows & rows() const
Get the rows object.
virtual void deepCopy(const String &newName, const Record &dataManagerInfo, const StorageOption &, int tableOption, Bool, int endianFormat, Bool noRows) const
Copy the table and all its subtables.
virtual TableDesc actualTableDesc() const
Get the actual table description.
virtual TableRecord & keywordSet()
Get readonly access to the table keyword set.
ConcatTable & operator=(const ConcatTable &)
Assignment is forbidden, because copying a table requires some more knowledge (like table name of res...
void addInfo()
Add lines containing the concatenated tables to the info.
virtual Bool canRemoveColumn(const Vector< String > &columnNames) const
Test if columns can be removed (no).
void writeConcatTable(Bool fsync)
Write a reference table.
virtual const StorageOption & storageOption() const
Get the storage option used for the table.
void getConcat(AipsIO &, int option, const TableLock &lockOptions, const TSMOption &tsmOption)
Read a concat table from a file.
virtual void resync()
Resync the Table object with the table files.
ConcatTable(const Block< Table > &tables, const Block< String > &subTables, const String &subDirName)
Create a virtual table as the concatenation of the given tables.
Block< BaseColumn * > getRefColumns(const String &columnName)
Get the column objects in the referenced tables.
virtual Bool isMultiUsed(Bool checkSubTable) const
Is the table in use (i.e.
virtual void reopenRW()
Try to reopen the table (the underlying ones) for read/write access.
virtual Bool canRemoveRow() const
Test if it is possible to remove a row from this table (no).
virtual Bool canRenameColumn(const String &columnName) const
Test if a column can be renamed (no).
virtual void mergeLock(const TableLock &lockOptions)
Merge the given lock info with the existing one.
void openTables(const Block< String > &tableNames, int option, const TableLock &lockOptions, const TSMOption &tsmOption)
Open all tables in the required way.
void addConcatCol(const TableDesc &tdesc)
Add multiple columns, with internal bookeeping (columns map).
virtual BaseColumn * getColumn(uInt columnIndex) const
Get a column object using its index.
virtual void copy(const String &newName, int tableOption) const
This is doing a shallow copy.
void checkAddColumn(const String &name, Bool addToParent)
Check if the column can be added, thus does not exist yet.
virtual Bool lock(FileLocker::LockType, uInt nattempts)
Try to lock the table for read or write access.
Block< String > subTableNames_p
virtual const TableLock & lockOptions() const
Get the locking info.
virtual Record dataManagerInfo() const
Get the data manager info (of the first underlying table).
virtual void getPartNames(Block< String > &names, Bool recursive) const
Get the names of the tables this table consists of.
void addConcatCol(const ColumnDesc &cd)
Add a column, with internal bookeeping (columns map).
Abstract base class for a data manager.
LockType
Define the possible lock types.
String: the storage and methods of handling collections of characters.
this file contains all the compiler specific defines
bool Bool
Define the standard types used by Casacore.
uInt64 rownr_t
Define the type of a row number in a table.