31 #include "config_hdf5.h"
33 #include "InternalErr.h"
42 HDF5CFByte::HDF5CFByte(
const string & n,
const string &d) : Byte(n, d)
46 HDF5CFByte::HDF5CFByte(
const string &n,
const string &d,
const string &d_f) : Byte(n, d),filename(d_f)
50 HDF5CFByte::~HDF5CFByte()
53 BaseType *HDF5CFByte::ptr_duplicate()
58 bool HDF5CFByte::read()
60 BESDEBUG(
"h5",
"Coming to HDF5CFByte read "<<endl);
65 hid_t file_id = H5Fopen(filename.c_str(),H5F_ACC_RDONLY,H5P_DEFAULT);
67 throw InternalErr(__FILE__,__LINE__,
"Fail to obtain the HDF5 file ID .");
71 dset_id = H5Dopen2(file_id,dataset().c_str(),H5P_DEFAULT);
75 throw InternalErr(__FILE__,__LINE__,
"Fail to obtain the dataset .");
86 if (H5Dclose(dset_id) < 0) {
87 throw InternalErr(__FILE__, __LINE__,
"Unable to close the dset.");