1 #ifndef DYSCO_STORAGE_MAN_COLUMN_H
2 #define DYSCO_STORAGE_MAN_COLUMN_H
14 namespace dyscostman {
48 double distributionTruncation) = 0;
124 namespace dyscostman {
133 const unsigned char *data,
167 size_t antennaCount) {
size_t OffsetInBlock() const
DyscoStManColumn(DyscoStMan *parent, int dtype)
Constructor, to be overloaded by subclass.
DyscoStMan & storageManager() const
Get the storage manager for this column.
Contains DyscoStMan and its global register function register_dyscostman().
bool areOffsetsInitialized() const
uint64_t nBlocksInFile() const
Get the actual number of blocks in the file.
size_t getRowWithinBlock(uint64_t row) const
virtual casacore::Bool isWritable() const override
Whether this column is writable.
void readCompressedData(size_t blockIndex, const DyscoStManColumn *column, unsigned char *dest, size_t size)
virtual size_t ExtraHeaderSize() const
Get number of bytes needed for column header of this column.
size_t getBlockIndex(uint64_t row) const
Return index of block that contains the given measurement set row.
void operator=(const DyscoStManColumn &source)=delete
void initializeRowsPerBlock(size_t rowsPerBlock, size_t antennaCount)
StManColumnBase(int dataType)
Default constructor.
Base table column storage manager class.
DyscoStMan * _storageManager
size_t nRowsInBlock() const
Number of rows in one "time-block", i.e.
size_t getBlockIndex(uint64_t row) const
size_t nAntennae() const
Number of antennae used in a time block.
size_t getRowWithinBlock(uint64_t row) const
Return the offset of the row within the block.
uint64_t getRowIndex(size_t block) const
Calculate first measurement set row index of a given block index.
virtual void shutdown()=0
To be called before destructing the class.
void writeCompressedData(size_t blockIndex, const DyscoStManColumn *column, const unsigned char *data, size_t size)
uint64_t getRowIndex(size_t block) const
virtual void InitializeAfterNRowsPerBlockIsKnown()=0
size_t nRowsInBlock() const
uint64_t nBlocksInFile() const
The number of rows that are actually stored in the file.
bool Bool
Define the standard types used by Casacore.
Base class for columns of the DyscoStMan.
virtual void SerializeExtraHeader(std::ostream &stream) const =0
virtual void UnserializeExtraHeader(std::istream &stream)=0
virtual size_t CalculateBlockSize(size_t nRowsInBlock, size_t nAntennae) const =0
bool areOffsetsInitialized() const
This method returns true when the number of rows per block and the number of antennae per block are k...
virtual void Prepare(DyscoDistribution distribution, Normalization normalization, double studentsTNu, double distributionTruncation)=0
virtual ~DyscoStManColumn()
Destructor.
void readCompressedData(size_t blockIndex, unsigned char *dest, size_t size)
Read a row of compressed data from the stman file.
void writeCompressedData(size_t blockIndex, const unsigned char *data, size_t size)
Write a row of compressed data to the stman file.
void initializeRowsPerBlock(size_t rowsPerBlock, size_t antennaCount, bool writeToHeader)
To be called by a column once it determines rowsPerBlock and antennaCount.
void SetOffsetInBlock(size_t offsetInBlock)
The main class for the Dysco storage manager.