Convenience wrappers for some common and verbose HDF5 operations. More...
Functions | |
| template<typename T > | |
| const H5::PredType & | type () |
Fetches the HDF5 DataType object that describes the type T. | |
| template<> | |
| const H5::PredType & | type< double > () |
| template<> | |
| const H5::PredType & | type< Int > () |
| template<> | |
| const H5::PredType & | type< int > () |
| template<typename T > | |
| void | add_attr (H5::H5Object &obj, std::string attr_name, T value) |
Adds a scalar attribute attr_name with value value to obj. | |
| template<typename T > | |
| T | get_attr (H5::H5Object &obj, std::string attr_name) |
Returns the value of attribute attr_name from obj. | |
| template<typename T > | |
| T | get_attr (std::string file_name, std::string attr_name) |
Returns the value of attribute attr_name from HDF5 file named file_name. | |
| template<typename T > | |
| void | write (H5::DataSet &dset, Int row, Int col, T value) |
| Writes an entry to a 2D HDF5 DataSet. | |
| template<typename T > | |
| T | read (H5::DataSet &dset, Int row, Int col) |
| Reads an entry from a 2D HDF5 DataSet. | |
| template<> | |
| const H5::PredType & | type< double > () |
| template<> | |
| const H5::PredType & | type< Int > () |
| template<> | |
| const H5::PredType & | type< int > () |
Convenience wrappers for some common and verbose HDF5 operations.
| T hexed::hdf5_utils::get_attr | ( | H5::H5Object & | obj, |
| std::string | attr_name ) |
Returns the value of attribute attr_name from obj.
attr_name must have been previously created with C++ type T.
| T hexed::hdf5_utils::get_attr | ( | std::string | file_name, |
| std::string | attr_name ) |
Returns the value of attribute attr_name from HDF5 file named file_name.
attr_name must have been previously created with C++ type T.