27#ifndef CASA_MULTIHDF5_H
28#define CASA_MULTIHDF5_H
31#include <casacore/casa/aips.h>
32#include <casacore/casa/IO/MultiFile.h>
33#include <casacore/casa/HDF5/HDF5File.h>
34#include <casacore/casa/HDF5/HDF5Group.h>
114 const std::shared_ptr<MultiFileBase>& parent,
127 (
const std::shared_ptr<MultiFileBase>& parent,
const String& name,
174 void* buffer)
override;
177 const void* buffer)
override;
OpenOption
Define the possible ByteIO open options.
Abstract base class to combine multiple logical files in a single one.
Int64 blockSize() const
Get the block size used.
const std::vector< MultiFileInfo > & info() const
Get the info object (for test purposes mainly).
~MultiHDF5() override
The destructor flushes and closes the file.
std::shared_ptr< HDF5Group > itsGroup
const std::shared_ptr< HDF5File > & getHDF5File() const
Get the HDF5File object.
void init(ByteIO::OpenOption option)
Initialize the MultiFile object.
void doOpenFile(MultiFileInfo &) override
Do the class-specific actions on opening a file.
MultiHDF5(const String &name, const std::shared_ptr< MultiFileBase > &parent, ByteIO::OpenOption, Int blockSize=0)
Open or create a MultiHDF5 which is nested in the given parent.
std::shared_ptr< MultiFileBase > makeNested(const std::shared_ptr< MultiFileBase > &parent, const String &name, ByteIO::OpenOption, Int blockSize) const override
Make the correct MultiFileBase object for a nested file.
void fsync() override
Fsync the file (i.e., force the data to be physically written).
MultiHDF5 & operator=(const MultiHDF5 &)=delete
void reopenRW() override
Open the given logical file and return its file id.
const HDF5Object & getHDF5Object() const
void readHeader(Bool always=True) override
Read the header info.
void doCloseFile(MultiFileInfo &) override
Do the class-specific actions on closing a file.
void doFlushFile() override
Flush the file itself.
std::shared_ptr< HDF5File > itsFile
void doTruncateFile(MultiFileInfo &info, uInt64 nrblk) override
Truncate the file to nrblk blocks (does nothing).
void close() override
Flush and close the file.
void doAddFile(MultiFileInfo &) override
Do the class-specific actions on adding a file.
HDF5Object * itsHDF5
This points to the HDF5Group if present, otherwise to the HDF5File.
void writeHeader() override
Write the header info.
void readBlock(MultiFileInfo &info, Int64 blknr, void *buffer) override
Read a data block.
void extend(MultiFileInfo &info, Int64 lastblk) override
Extend the virtual file to fit lastblk.
void writeBlock(MultiFileInfo &info, Int64 blknr, const void *buffer) override
Write a data block.
MultiHDF5(const MultiHDF5 &)=delete
Copy constructor and assignment not possible.
void doDeleteFile(MultiFileInfo &) override
Do the class-specific actions on deleting a file.
MultiHDF5(const String &name, ByteIO::OpenOption, Int blockSize=0)
Open or create a MultiHDF5 with the given name.
String: the storage and methods of handling collections of characters.
this file contains all the compiler specific defines
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
bool Bool
Define the standard types used by Casacore.
unsigned long long uInt64
Helper class for MultiFileBase containing info per logical file.