34 #include <InternalErr.h>
36 #include <mime_util.h>
37 #include "config_hdf5.h"
43 void read_cfdds(DDS&,
const string&,hid_t);
44 void read_cfdas(DAS&,
const string&,hid_t);
46 void read_cfdds(DDS & dds,
const string &filename,hid_t myfile_id) {
48 BESDEBUG(
"h5",
"Coming to CF DDS read function read_cfdds "<<endl);
51 dds.set_dataset_name(name_path(filename));
53 hid_t fileid = myfile_id;
54 H5CFModule moduletype;
57 fileid = H5Fopen(filename.c_str(),H5F_ACC_RDONLY,H5P_DEFAULT);
60 "h5_cf_dds handler: Cannot open the HDF5 file ";
62 throw InternalErr(__FILE__, __LINE__, msg);
66 moduletype = check_module(fileid);
67 if (moduletype == HDF_EOS5) {
68 map_eos5_cfdds(dds,fileid, filename);
71 map_gmh5_cfdds(dds,fileid, filename);
77 void read_cfdas(DAS & das,
const string &filename,hid_t myfile_id) {
79 BESDEBUG(
"h5",
"Coming to CF DAS read function read_cfdas "<<endl);
80 hid_t fileid = myfile_id;
81 H5CFModule moduletype;
84 fileid = H5Fopen(filename.c_str(),H5F_ACC_RDONLY,H5P_DEFAULT);
87 "h5_cf_das handler: Cannot open the HDF5 file ";
89 throw InternalErr(__FILE__, __LINE__, msg);
93 moduletype = check_module(fileid);
94 if (moduletype == HDF_EOS5) {
95 map_eos5_cfdas(das,fileid, filename);
98 map_gmh5_cfdas(das,fileid, filename);