535 unsigned int flags = H5F_ACC_TRUNC);
539 unsigned int flags = H5F_ACC_RDONLY);
586 const size_t compressionLevel);
593 const size_t compressionLevel);
617 const float* mMatrixData);
622 const size_t indexSensorSize,
623 const size_t* indexSensorData,
625 const float* matrixData);
692 const std::string& value);
744 FILE_DESCRIPTION = 2,
749 TOTAL_MEMORY_CONSUMPTION = 7,
750 PEAK_CORE_MEMORY_CONSUMPTION = 8,
751 TOTAL_EXECUTION_TIME = 9,
753 PREPROCESSING_TIME = 11,
754 SIMULATION_TIME = 12,
755 POST_PROCESSING_TIME = 13,
889 const double loadTime,
890 const double preProcessingTime,
891 const double simulationTime,
892 const double postprocessingTime);
897 double& preProcessingTime,
898 double& simulationTime,
899 double& postprocessingTime);
size_t GetDatasetNumberOfDimensions(const hid_t parentGroup, TMatrixName &datasetName)
Get number of dimensions of the dataset under a specified group.
hid_t CreateFloatDataset(const hid_t parentGroup, TMatrixName &datasetName, const TDimensionSizes &dimensionSizes, const TDimensionSizes &chunkSizes, const size_t compressionLevel)
Create a float HDF5 dataset at a specified place in the file tree (3D/4D).
void WriteMatrixDomainType(const hid_t parentGroup, TMatrixName &datasetName, const TMatrixDomainType &matrixDomainType)
Write matrix domain type into the dataset under the root group.
std::string ReadStringAttribute(const hid_t parentGroup, TMatrixName &datasetName, TMatrixName &attributeName)
Read string attribute from the dataset under the root group.
TMatrixDataType
HDF5 matrix data type (float or uint64).
static const std::string matrixDomainTypeName
String representation of the Domain type in the HDF5 file.
void Open(const std::string &fileName, unsigned int flags=H5F_ACC_RDONLY)
Open a file.
TMatrixDomainType
HDF5 Matrix domain type (real or complex).
hid_t CreateGroup(const hid_t parentGroup, TMatrixName &groupName)
Create a HDF5 group at a specified place in the file tree.
THDF5_File::TMatrixDataType ReadMatrixDataType(const hid_t parentGroup, TMatrixName &datasetName)
Read matrix data type from the dataset.
void WriteScalarValue(const hid_t parentGroup, TMatrixName &datasetName, const float value)
Write the scalar value under a specified group, float value.
void WriteCuboidToHyperSlab(const hid_t dataset, const TDimensionSizes &hyperslabPosition, const TDimensionSizes &cuboidPosition, const TDimensionSizes &cuboidSize, const TDimensionSizes &matrixDimensions, const float *mMatrixData)
Write a cuboid selected within the matrixData into a hyperslab.
bool IsOpen() const
Is the file opened?
hid_t file
HDF file handle.
const std::string TMatrixName
Datatype for matrix names.
TDimensionSizes GetDatasetDimensionSizes(const hid_t parentGroup, TMatrixName &datasetName)
Get dimension sizes of the dataset under a specified group.
void WriteMatrixDataType(const hid_t parentGroup, TMatrixName &datasetName, const TMatrixDataType &matrixDataType)
Write matrix data type into the dataset under a specified group.
THDF5_File()
Constructor of the class.
void ReadScalarValue(const hid_t parentGroup, TMatrixName &datasetName, float &value)
Read the scalar value under a specified group, float value.
static const std::string matrixDataTypeNames[]
String representation of different data types.
void WriteStringAttribute(const hid_t parentGroup, TMatrixName &datasetName, TMatrixName &attributeName, const std::string &value)
Write string attribute into the dataset under the root group.
static bool IsHDF5(const std::string &fileName)
Does the file exist?
hid_t GetRootGroup() const
Get handle to the root group.
The header file storing names of all variables/matrices/output streams used in the simulation...
The header file containing the structure with 3D dimension sizes.
static const std::string matrixDomainTypeNames[]
String representation of different domain types.
void Create(const std::string &fileName, unsigned int flags=H5F_ACC_TRUNC)
Create a file.
void WriteDataByMaskToHyperSlab(const hid_t dataset, const TDimensionSizes &hyperslabPosition, const size_t indexSensorSize, const size_t *indexSensorData, const TDimensionSizes &matrixDimensions, const float *matrixData)
Write sensor data selected by the sensor mask - Occasionally very slow, do not use! ...
hid_t CreateIndexDataset(const hid_t parentGroup, TMatrixName &datasetName, const TDimensionSizes &dimensionSizes, const TDimensionSizes &chunkSizes, const size_t compressionLevel)
Create an index HDF5 dataset at a specified place in the file tree (3D only).
THDF5_File::TMatrixDomainType ReadMatrixDomainType(const hid_t parentGroup, TMatrixName &datasetName)
Read matrix domain type from the dataset under a specified group.
void WriteHyperSlab(const hid_t dataset, const TDimensionSizes &position, const TDimensionSizes &size, const float *data)
Write a hyper-slab into the dataset - float dataset.
static const std::string matrixDataTypeName
String representation of the Data type in the HDF5 file.
hid_t OpenGroup(const hid_t parentGroup, TMatrixName &groupName)
Open a HDF5 group at a specified place in the file tree.
void CloseGroup(const hid_t group)
Close group.
virtual ~THDF5_File()
Destructor.
THDF5_File & operator=(const THDF5_File &src)
Operator = is not allowed for public.
size_t GetDatasetElementCount(const hid_t parentGroup, TMatrixName &datasetName)
Get dataset element count under a specified group.
void ReadCompleteDataset(const hid_t parentGroup, TMatrixName &datasetName, const TDimensionSizes &dimensionSizes, float *data)
Read data from the dataset under a specified group, float dataset.
std::string fileName
File name.
void CloseDataset(const hid_t dataset)
Close the HDF5 dataset.
Class wrapping the HDF5 routines.
Structure with 4D dimension sizes (3 in space and 1 in time).
hid_t OpenDataset(const hid_t parentGroup, TMatrixName &datasetName)
Open the HDF5 dataset at a specified place in the file tree.