Go to the documentation of this file.
28 #ifndef TABLES_ISMBASE_H
29 #define TABLES_ISMBASE_H
33 #include <casacore/casa/aips.h>
34 #include <casacore/tables/DataMan/DataManager.h>
35 #include <casacore/casa/Containers/Block.h>
36 #include <casacore/casa/iosfwd.h>
231 uInt &offendingBucketStartRow,
232 uInt &offendingBucketNrow,
233 uInt &offendingBucketNr,
235 uInt &offendingIndex,
237 uInt &offendingPrevRow);
306 const String& dataTypeID);
310 const String& dataTypeID);
314 const String& dataTypeID);
char * tempBuffer() const
Get access to the temporary buffer.
virtual void reopenRW()
Reopen the storage manager files for read/write.
String dataManName_p
Name of data manager.
BucketCache & getCache()
Get the cache object.
uInt nrrow_p
The number of rows in the columns.
uInt bucketSize_p
The bucket size.
ISMIndex * index_p
The ISM bucket index.
AipsIO is the object persistency mechanism of Casacore
Abstract base class for a data manager.
void showIndexStatistics(ostream &os)
Show the index statistics.
OpenOption
Define the possible ByteIO open options.
uInt cacheSize() const
Get the current cache size (in buckets).
A drop-in replacement for Block<T*>.
virtual Bool canAddColumn() const
Can the storage manager add columns? (not yet)
uInt bucketSize() const
Get the bucket size (in bytes).
ISMBase(uInt bucketSize=0, Bool checkBucketSize=True, uInt cacheSize=1)
Create an incremental storage manager without a name.
virtual DataManager * clone() const
Clone this object.
BucketFile * file_p
The file containing all data.
Bool checkBucketLayout(uInt &offendingCursor, uInt &offendingBucketStartRow, uInt &offendingBucketNrow, uInt &offendingBucketNr, uInt &offendingCol, uInt &offendingIndex, uInt &offendingRow, uInt &offendingPrevRow)
Check that there are no repeated rowIds in the buckets comprising this ISM.
void setBucketDirty()
Make the current bucket in the cache dirty (i.e.
virtual Record dataManagerSpec() const
Record a record containing data manager specifications.
Cache for buckets in a part of a file.
Bool dataChanged_p
Has the data changed since the last flush?
virtual String dataManagerType() const
Get the type name of the data manager (i.e.
void readIndex()
Read the index (at the end of the file).
ISMColumn & getColumn(uInt colnr)
Get access to the given column.
File object for BucketCache.
virtual void addColumn(DataManagerColumn *)
Do the final addition of a column.
uInt uIntSize_p
The size of a uInt in external format (local or canonical).
StManArrayFile * iosfile_p
The file containing the indirect arrays.
void init()
Let the storage manager initialize itself.
virtual DataManagerColumn * makeDirArrColumn(const String &name, int dataType, const String &dataTypeID)
Create a direct array column.
Abstract base class for a column in a data manager.
uInt uniqnr_p
Unique nr for column in this storage manager.
ISMBucket * nextBucket(uInt &cursor, uInt &bucketStartRow, uInt &bucketNrrow)
Get the next bucket.
virtual Record getProperties() const
Get data manager properties that can be modified.
ISMBase & operator=(const ISMBase &that)
Assignment cannot be used.
ISMBucket * getBucket(uInt rownr, uInt &bucketStartRow, uInt &bucketNrrow)
Get the bucket containing the given row.
uInt nbucketInit_p
The initial number of buckets in the cache.
char * tempBuffer_p
A temporary read/write buffer (also for other classes).
virtual void addRow(uInt nrrow)
Add rows to the storage manager.
virtual Bool hasMultiFileSupport() const
The data manager supports use of MultiFile.
void makeIndex()
Construct the index object (if not constructed yet) and read it.
virtual Bool canAddRow() const
Can the storage manager add rows? (yes)
void showBucketLayout(ostream &os)
Show the layout of the buckets.
StManArrayFile * openArrayFile(ByteIO::OpenOption opt)
Open (if needed) the file for indirect arrays with the given mode.
virtual void setProperties(const Record &spec)
Modify data manager properties.
BucketCache * cache_p
The cache with the ISM buckets.
uInt persCacheSize_p
The persistent cache size.
static DataManager * makeObject(const String &dataManagerType, const Record &spec)
Make the object from the type name string.
Int firstFree_p
The first free bucket.
virtual DataManagerColumn * makeScalarColumn(const String &name, int dataType, const String &dataTypeID)
Create a column in the storage manager on behalf of a table column.
uInt cacheSize_p
The actual cache size.
virtual void open(uInt nrrow, AipsIO &)
Open the storage manager file for an existing table, read in the data, and let the ISMColumn objects ...
Read/write array in external format for a storage manager.
void clearCache()
Clear the cache used by this storage manager.
void writeIndex()
Write the index (at the end of the file).
ISMBase(const String &dataManagerName, uInt bucketSize, Bool checkBucketSize, uInt cacheSize)
Create an incremental storage manager with the given name.
void setCacheSize(uInt cacheSize, Bool canExceedNrBuckets)
Set the cache size (in buckets).
ISMIndex & getIndex()
Get the index object.
Bool checkBucketSize_p
Check a positive bucketsize?
The Index of the Incremental Storage Manager.
this file contains all the compiler specific defines
virtual void create(uInt nrrow)
Let the storage manager create files as needed for a new table.
virtual void showCacheStatistics(ostream &os) const
Show the statistics of all caches used.
uInt uIntSize() const
Get the size of a uInt in external format (can be canonical or local).
virtual Bool canRemoveRow() const
Can the storage manager delete rows? (yes)
virtual void removeRow(uInt rownr)
Delete a row from all columns.
virtual void resync(uInt nrrow)
Resync the storage manager with the new file contents.
A bucket in the Incremental Storage Manager.
uInt nrow() const
Get the number of rows in this storage manager.
Base class of the Incremental Storage Manager.
uInt uniqueNr()
Get a unique column number for the column (it is only unique for this storage manager).
A Column in the Incremental Storage Manager.
uInt version() const
Get the version of the class.
virtual Bool flush(AipsIO &, Bool fsync)
Flush and optionally fsync the data.
uInt nFreeBucket_p
The nr of free buckets.
String: the storage and methods of handling collections of characters.
PtrBlock< ISMColumn * > colSet_p
The assembly of all columns.
bool Bool
Define the standard types used by Casacore.
uInt version_p
The version of the class.
void recreate()
(Re)create the index, file, and cache object.
A hierarchical collection of named fields of various types.
void makeCache()
Construct the cache object (if not constructed yet).
ISMBase(const String &aDataManName, const Record &spec)
Create an incremental storage manager with the given name.
ISMBase(const ISMBase &that)
Copy constructor (only meant for clone function).
virtual void deleteManager()
The data manager will be deleted (because all its columns are requested to be deleted).
virtual void removeColumn(DataManagerColumn *)
Remove a column from the data file and the colSet_p.
void addBucket(uInt rownr, ISMBucket *bucket)
Add a bucket to the storage manager (i.e.
virtual Bool canRemoveColumn() const
Can the storage manager delete columns? (not yet)
virtual DataManagerColumn * makeIndArrColumn(const String &name, int dataType, const String &dataTypeID)
Create an indirect array column.
virtual String dataManagerName() const
Get the name given to the storage manager (in the constructor).