Classes | Enumerations | Functions | Variables
h5 Namespace Reference

Contains functions and classes for manipulating HDF5 files. More...

Classes

class  Dat
 Represents a multicolumn dat file inside an HDF5 file. More...
 
class  H5File
 Opens an HDF5 file for access and allows manipulation of data. More...
 
class  Header
 Writes header info about the build, git commit, branch, etc. More...
 
class  Object
 Abstract base class representing an object in an HDF5 file. More...
 
class  SourceArchive
 Writes an archive of the source tree into a dataset. More...
 
class  StellarCollapseEos
 Reads in tabulated equation of state file from stellarcollapse.org More...
 
class  Version
 Used to store the version of the file. More...
 
class  VolumeData
 A volume data subfile written inside an H5 file. More...
 

Enumerations

enum  AccessType { AccessType::ReadWrite, AccessType::ReadOnly }
 Set the access type to the H5File. More...
 

Functions

std::ostreamoperator<< (std::ostream &os, const AccessType t) noexcept
 
template<typename T >
void write_data (hid_t group_id, const std::vector< T > &data, const std::vector< size_t > &extents, const std::string &name="scalar") noexcept
 Write a std::vector named name to the group group_id
 
void write_data (hid_t group_id, const DataVector &data, const std::string &name) noexcept
 Write a DataVector named name to the group group_id
 
template<size_t Dim>
void write_extents (hid_t group_id, const Index< Dim > &extents, const std::string &name="Extents")
 Write the extents as an attribute named name to the group group_id.
 
void write_connectivity (hid_t group_id, const std::vector< int > &connectivity) noexcept
 Write the connectivity into the group in the H5 file.
 
std::vector< std::stringget_group_names (hid_t file_id, const std::string &group_name) noexcept
 Get the names of all the groups and datasets in a group.
 
bool contains_dataset_or_group (hid_t id, const std::string &group_name, const std::string &dataset_name) noexcept
 Check if name is a dataset or group in the subgroup group_name of id. More...
 
template<typename Type >
void write_to_attribute (hid_t location_id, const std::string &name, const Type &value) noexcept
 Write a value of type Type to an HDF5 attribute named name
 
template<typename Type >
Type read_value_attribute (hid_t location_id, const std::string &name) noexcept
 Read a value of type Type from an HDF5 attribute named name
 
template<typename T >
void write_to_attribute (hid_t group_id, const std::string &name, const std::vector< T > &data) noexcept
 Write the vector data to the attribute attribute_name in the group group_id.
 
template<typename T >
std::vector< T > read_rank1_attribute (hid_t group_id, const std::string &name) noexcept
 Read rank-1 of type Type from an HDF5 attribute named name
 
std::vector< std::stringget_attribute_names (hid_t file_id, const std::string &group_name)
 Get the names of all the attributes in a group.
 
bool contains_attribute (hid_t file_id, const std::string &group_name, const std::string &attribute_name)
 Check if an attribute is in a group.
 
hid_t open_dataset (hid_t group_id, const std::string &dataset_name) noexcept
 Open an HDF5 dataset.
 
void close_dataset (hid_t dataset_id) noexcept
 Close an HDF5 dataset.
 
hid_t open_dataspace (hid_t dataset_id) noexcept
 Open an HDF5 dataspace.
 
void close_dataspace (hid_t dataspace_id) noexcept
 Close an HDF5 dataspace.
 
template<size_t Rank, typename T >
read_data (hid_t group_id, const std::string &dataset_name) noexcept
 Read an array of rank 0-3 into an object. More...
 
template<size_t Dim>
Index< Dim > read_extents (hid_t group_id, const std::string &extents_name="Extents")
 Read the HDF5 attribute representing extents from a group.
 
template void write_extents< 1 > (const hid_t group_id, const Index< 1 > &extents, const std::string &name)
 
template void write_extents< 2 > (const hid_t group_id, const Index< 2 > &extents, const std::string &name)
 
template void write_extents< 3 > (const hid_t group_id, const Index< 3 > &extents, const std::string &name)
 
template Index< 1 > read_extents< 1 > (const hid_t group_id, const std::string &extents_name)
 
template Index< 2 > read_extents< 2 > (const hid_t group_id, const std::string &extents_name)
 
template Index< 3 > read_extents< 3 > (const hid_t group_id, const std::string &extents_name)
 
 GENERATE_INSTANTIATIONS (INSTANTIATE_WRITE_DATA,(double, int, unsigned int, long, unsigned long, long long, unsigned long long, char)) GENERATE_INSTANTIATIONS(INSTANTIATE_ATTRIBUTE
 
 GENERATE_INSTANTIATIONS (INSTANTIATE_READ_SCALAR,(double, int, unsigned int, long, unsigned long, long long, unsigned long long, char),(0)) GENERATE_INSTANTIATIONS(INSTANTIATE_READ_VECTOR
 
 GENERATE_INSTANTIATIONS (INSTANTIATE_READ_MULTIARRAY,(double, int, unsigned int, long, unsigned long, long long, unsigned long long, char),(2, 3)) GENERATE_INSTANTIATIONS(INSTANTIATE_READ_DATAVECTOR
 
template<typename T >
hid_t h5_type ()
 Returns the HDF5 datatype for the corresponding type T More...
 
hid_t fortran_string () noexcept
 Create an H5 FORTRAN string.
 
auto h5f_acc_rdonly () noexcept
 
auto h5f_acc_rdwr () noexcept
 
auto h5f_acc_trunc () noexcept
 
auto h5p_default () noexcept
 
auto h5s_all () noexcept
 
auto h5s_unlimited () noexcept
 
auto h5s_scalar () noexcept
 

Variables

 double
 
unsigned int
 
unsigned unsigned long
 
unsigned unsigned long unsigned long char
 
 DataVector
 

Detailed Description

Contains functions and classes for manipulating HDF5 files.

Wraps many underlying C H5 routines making them easier to use and easier to manipulate H5 files.