34#include <libdap/InternalErr.h>
41HDF5CFFloat32::HDF5CFFloat32(
const string & n,
const string &d) :
Float32(n, d)
45HDF5CFFloat32::HDF5CFFloat32(
const string &n,
const string &d,
const string &d_f) :
Float32(n, d),filename(d_f)
48BaseType *HDF5CFFloat32::ptr_duplicate()
50 auto HDF5CFFloat32_unique = make_unique<HDF5CFFloat32>(*
this);
51 return HDF5CFFloat32_unique.release();
54bool HDF5CFFloat32::read()
56 BESDEBUG(
"h5",
"Coming to HDF5CFFloat32 read "<<endl);
61 hid_t file_id = H5Fopen(filename.c_str(),H5F_ACC_RDONLY,H5P_DEFAULT);
63 throw InternalErr(__FILE__,__LINE__,
"Fail to obtain the HDF5 file ID .");
67 dset_id = H5Dopen2(file_id,dataset().c_str(),H5P_DEFAULT);
71 throw InternalErr(__FILE__,__LINE__,
"Fail to obtain the dataset .");
82 if (H5Dclose(dset_id) < 0) {
83 throw InternalErr(__FILE__, __LINE__,
"Unable to close the dset.");
This class provides a way to map HDF5 float to DAP float for the CF option.
void get_data(hid_t dset, void *buf)