31 #include "config_hdf5.h"
33 #include "InternalErr.h"
41 HDF5CFUInt16::HDF5CFUInt16(
const string &n,
const string &d) : UInt16(n, d)
45 HDF5CFUInt16::HDF5CFUInt16(
const string &n,
const string &d,
const string &d_f) : UInt16(n, d),filename(d_f)
50 HDF5CFUInt16::~HDF5CFUInt16()
53 BaseType *HDF5CFUInt16::ptr_duplicate()
58 bool HDF5CFUInt16::read()
61 BESDEBUG(
"h5",
"Coming to HDF5CFUInt16 read "<<endl);
67 if ((file_id = H5Fopen(filename.c_str(),H5F_ACC_RDONLY,H5P_DEFAULT))<0) {
68 throw InternalErr (__FILE__, __LINE__,
"Failed to obtain the HDF5 file ID.");
73 dset_id = H5Dopen2(file_id,dataset().c_str(),H5P_DEFAULT);
76 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.");