CYCLUS
Classes | Functions | Variables
h5wrap Namespace Reference

Classes

class  FileNotHDF5
 
class  GroupNotFound
 
class  HDF5BoundsError
 
class  HomogenousTypeTable
 
class  PathNotFound
 

Functions

hid_t _get_PYTABLES_COMPLEX128 ()
 
template<typename T >
get_array_index (hid_t dset, int n, hid_t dtype=H5T_NATIVE_DOUBLE)
 
template<typename T >
std::set< T > h5_array_to_cpp_set (hid_t h5file, std::string data_path, hid_t dtype=H5T_NATIVE_DOUBLE)
 
template<typename T >
std::vector< T > h5_array_to_cpp_vector_1d (hid_t h5file, std::string data_path, hid_t dtype=H5T_NATIVE_DOUBLE)
 
template<typename T >
std::vector< std::vector< T > > h5_array_to_cpp_vector_2d (hid_t h5file, std::string data_path, hid_t dtype=H5T_NATIVE_DOUBLE)
 
template<typename T >
std::vector< std::vector< std::vector< T > > > h5_array_to_cpp_vector_3d (hid_t h5file, std::string data_path, hid_t dtype=H5T_NATIVE_DOUBLE)
 
bool path_exists (hid_t h5file, std::string path)
 

Variables

static hid_t PYTABLES_COMPLEX128 = _get_PYTABLES_COMPLEX128()
 

Detailed Description

Wrapper for standard HDF5 operations.

Function Documentation

◆ _get_PYTABLES_COMPLEX128()

hid_t h5wrap::_get_PYTABLES_COMPLEX128 ( )
inline

Create an HDF5 data type for complex 128 bit data, which happens to match the complex data type that is used by PyTables ^_~.

Definition at line 735 of file pyne.h.

◆ get_array_index()

template<typename T >
template double h5wrap::get_array_index ( hid_t  dset,
int  n,
hid_t  dtype = H5T_NATIVE_DOUBLE 
)

Retrieves the nth index out of the dataset dset (which has an HDF5 datatype dtype).

The value is returned as the C/C++ type given by T.

Definition at line 473 of file pyne.h.

◆ h5_array_to_cpp_set()

template<typename T >
std::set<T> h5wrap::h5_array_to_cpp_set ( hid_t  h5file,
std::string  data_path,
hid_t  dtype = H5T_NATIVE_DOUBLE 
)

Reads in data from an HDF5 file as a C++ set.

T should roughly match dtype.

Parameters
h5fileHDF5 file id for an open file.
data_pathpath to the data in the open file.
dtypeHDF5 data type for the data set at data_path.
Returns
an in memory set of type T.

Definition at line 517 of file pyne.h.

◆ h5_array_to_cpp_vector_1d()

template<typename T >
std::vector<T> h5wrap::h5_array_to_cpp_vector_1d ( hid_t  h5file,
std::string  data_path,
hid_t  dtype = H5T_NATIVE_DOUBLE 
)

Reads in data from an HDF5 file as a 1 dimiensional vector.

T should roughly match dtype.

Parameters
h5fileHDF5 file id for an open file.
data_pathpath to the data in the open file.
dtypeHDF5 data type for the data set at data_path.
Returns
an in memory 1D vector of type T.

Definition at line 548 of file pyne.h.

◆ h5_array_to_cpp_vector_2d()

template<typename T >
std::vector< std::vector<T> > h5wrap::h5_array_to_cpp_vector_2d ( hid_t  h5file,
std::string  data_path,
hid_t  dtype = H5T_NATIVE_DOUBLE 
)

Reads in data from an HDF5 file as a 2 dimiensional vector.

T should roughly match dtype.

Parameters
h5fileHDF5 file id for an open file.
data_pathpath to the data in the open file.
dtypeHDF5 data type for the data set at data_path.
Returns
an in memory 2D vector of type T.

Definition at line 578 of file pyne.h.

◆ h5_array_to_cpp_vector_3d()

template<typename T >
std::vector< std::vector< std::vector<T> > > h5wrap::h5_array_to_cpp_vector_3d ( hid_t  h5file,
std::string  data_path,
hid_t  dtype = H5T_NATIVE_DOUBLE 
)

Reads in data from an HDF5 file as a 3 dimiensional vector.

T should roughly match dtype.

Parameters
h5fileHDF5 file id for an open file.
data_pathpath to the data in the open file.
dtypeHDF5 data type for the data set at data_path.
Returns
an in memory 3D vector of type T.

Definition at line 613 of file pyne.h.

◆ path_exists()

bool h5wrap::path_exists ( hid_t  h5file,
std::string  path 
)
inline

Determines if a path exists in an hdf5 file.

Parameters
h5fileHDF5 file id for an open file.
pathpath to the data in the open file.
Returns
true or false

Definition at line 751 of file pyne.h.

Variable Documentation

◆ PYTABLES_COMPLEX128

hid_t h5wrap::PYTABLES_COMPLEX128 = _get_PYTABLES_COMPLEX128()
static

The HDF5 id for a complex data type compatible with PyTables generated data.

Definition at line 744 of file pyne.h.