Agora  1.2.0
Agora project
Agora_recorder::Hdf5Lib Class Reference

#include <hdf5_lib.h>

Public Member Functions

 Hdf5Lib (H5std_string hdf5_name, H5std_string group_name)
 
 ~Hdf5Lib ()
 
void CreateDataset (const std::string &dataset_name, const std::array< hsize_t, kDsDimsNum > &chunk_dims, const std::array< hsize_t, kDsDimsNum > &init_dims, const ssize_t extend_dimension=0, const H5::PredType &type=H5::PredType::STD_I16BE)
 
void FinalizeDataset (const std::string &dataset_name)
 
void ExtendDataset (const std::string &dataset_name, const std::array< hsize_t, kDsDimsNum > &extended_dims)
 
herr_t WriteDataset (const std::string &dataset_name, const std::array< hsize_t, kDsDimsNum > &start, const std::array< hsize_t, kDsDimsNum > &count, const short *wrt_data)
 
herr_t WriteDataset (const std::string &dataset_name, const std::array< hsize_t, kDsDimsNum > &start, const std::array< hsize_t, kDsDimsNum > &count, const float *wrt_data)
 
void WriteAttribute (const char name[], double val)
 
void WriteAttribute (const char name[], const std::vector< double > &val)
 
void WriteAttribute (const char name[], const std::vector< std::complex< int16_t >> &val)
 
void WriteAttribute (const char name[], const std::vector< std::complex< float >> &val)
 
void WriteAttribute (const char name[], size_t val)
 
void WriteAttribute (const char name[], int val)
 
void WriteAttribute (const char name[], const std::vector< size_t > &val)
 
void WriteAttribute (const char name[], const std::string &val)
 
void WriteAttribute (const char name[], const std::vector< std::string > &val)
 

Private Attributes

H5std_string hdf5_name_
 
H5std_string group_name_
 
std::unique_ptr< H5::H5File > file_
 
std::unique_ptr< H5::Group > group_
 
std::map< std::string, size_t > ds_name_id_
 Datset lookup table. More...
 
std::vector< std::unique_ptr< H5::DataSet > > datasets_
 

Constructor & Destructor Documentation

◆ Hdf5Lib()

Agora_recorder::Hdf5Lib::Hdf5Lib ( H5std_string  hdf5_name,
H5std_string  group_name 
)

Disable for debugging

◆ ~Hdf5Lib()

Agora_recorder::Hdf5Lib::~Hdf5Lib ( )

Member Function Documentation

◆ CreateDataset()

void Agora_recorder::Hdf5Lib::CreateDataset ( const std::string &  dataset_name,
const std::array< hsize_t, kDsDimsNum > &  chunk_dims,
const std::array< hsize_t, kDsDimsNum > &  init_dims,
const ssize_t  extend_dimension = 0,
const H5::PredType &  type = H5::PredType::STD_I16BE 
)

Dataset -> Data Type + Dataspace extend_dimension -1 for no extension

◆ ExtendDataset()

void Agora_recorder::Hdf5Lib::ExtendDataset ( const std::string &  dataset_name,
const std::array< hsize_t, kDsDimsNum > &  extended_dims 
)

◆ FinalizeDataset()

void Agora_recorder::Hdf5Lib::FinalizeDataset ( const std::string &  dataset_name)

◆ WriteAttribute() [1/9]

void Agora_recorder::Hdf5Lib::WriteAttribute ( const char  name[],
const std::string &  val 
)

◆ WriteAttribute() [2/9]

void Agora_recorder::Hdf5Lib::WriteAttribute ( const char  name[],
const std::vector< double > &  val 
)

◆ WriteAttribute() [3/9]

void Agora_recorder::Hdf5Lib::WriteAttribute ( const char  name[],
const std::vector< size_t > &  val 
)

◆ WriteAttribute() [4/9]

void Agora_recorder::Hdf5Lib::WriteAttribute ( const char  name[],
const std::vector< std::complex< float >> &  val 
)

◆ WriteAttribute() [5/9]

void Agora_recorder::Hdf5Lib::WriteAttribute ( const char  name[],
const std::vector< std::complex< int16_t >> &  val 
)

◆ WriteAttribute() [6/9]

void Agora_recorder::Hdf5Lib::WriteAttribute ( const char  name[],
const std::vector< std::string > &  val 
)

◆ WriteAttribute() [7/9]

void Agora_recorder::Hdf5Lib::WriteAttribute ( const char  name[],
double  val 
)

◆ WriteAttribute() [8/9]

void Agora_recorder::Hdf5Lib::WriteAttribute ( const char  name[],
int  val 
)

◆ WriteAttribute() [9/9]

void Agora_recorder::Hdf5Lib::WriteAttribute ( const char  name[],
size_t  val 
)

◆ WriteDataset() [1/2]

herr_t Agora_recorder::Hdf5Lib::WriteDataset ( const std::string &  dataset_name,
const std::array< hsize_t, kDsDimsNum > &  start,
const std::array< hsize_t, kDsDimsNum > &  count,
const float *  wrt_data 
)

Select the hyperslab

◆ WriteDataset() [2/2]

herr_t Agora_recorder::Hdf5Lib::WriteDataset ( const std::string &  dataset_name,
const std::array< hsize_t, kDsDimsNum > &  start,
const std::array< hsize_t, kDsDimsNum > &  count,
const short *  wrt_data 
)

Select the hyperslab

Member Data Documentation

◆ datasets_

std::vector<std::unique_ptr<H5::DataSet> > Agora_recorder::Hdf5Lib::datasets_
private

◆ ds_name_id_

std::map<std::string, size_t> Agora_recorder::Hdf5Lib::ds_name_id_
private

Datset lookup table.

◆ file_

std::unique_ptr<H5::H5File> Agora_recorder::Hdf5Lib::file_
private

◆ group_

std::unique_ptr<H5::Group> Agora_recorder::Hdf5Lib::group_
private

◆ group_name_

H5std_string Agora_recorder::Hdf5Lib::group_name_
private

◆ hdf5_name_

H5std_string Agora_recorder::Hdf5Lib::hdf5_name_
private

The documentation for this class was generated from the following files: