PyNE C++
|
Wrapper for standard HDF5 operations. More...
Classes | |
class | FileNotHDF5 |
Custom exception for when an existing file is not in a valid HDF5 format. More... | |
class | GroupNotFound |
Custom exception for when a group cannot be found in an HDF5 file. More... | |
class | HDF5BoundsError |
Custom exception for HDF5 indexing errors. More... | |
class | HomogenousTypeTable |
class | PathNotFound |
Custom exception for when a path is not found in an HDF5 file. More... | |
Functions | |
template<typename T > | |
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) |
hid_t | _get_PYTABLES_COMPLEX128 () |
bool | path_exists (hid_t h5file, std::string path) |
Wrapper for standard HDF5 operations.
|
inline |
Create an HDF5 data type for complex 128 bit data, which happens to match the complex data type that is used by PyTables ^_~.
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.
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.
h5file | HDF5 file id for an open file. |
data_path | path to the data in the open file. |
dtype | HDF5 data type for the data set at data_path. |
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.
h5file | HDF5 file id for an open file. |
data_path | path to the data in the open file. |
dtype | HDF5 data type for the data set at data_path. |
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.
h5file | HDF5 file id for an open file. |
data_path | path to the data in the open file. |
dtype | HDF5 data type for the data set at data_path. |
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.
h5file | HDF5 file id for an open file. |
data_path | path to the data in the open file. |
dtype | HDF5 data type for the data set at data_path. |
|
inline |
Determines if a path exists in an hdf5 file.
h5file | HDF5 file id for an open file. |
path | path to the data in the open file. |