27 #ifndef I_HDF5RequestHandler_H
28 #define I_HDF5RequestHandler_H
33 #include "BESRequestHandler.h"
34 #include "HDF5_DataMemCache.h"
35 #include <BESDDSResponse.h>
36 #include <BESDataDDSResponse.h>
68 static bool get_usecf() {
return _usecf;}
69 static bool get_pass_fileid() {
return _pass_fileid;}
70 static bool get_disable_structmeta() {
return _disable_structmeta;}
71 static bool get_disable_ecsmeta() {
return _disable_ecsmeta;}
72 static bool get_keep_var_leading_underscore() {
return _keep_var_leading_underscore;}
73 static bool get_check_name_clashing() {
return _check_name_clashing;}
74 static bool get_add_path_attrs() {
return _add_path_attrs;}
75 static bool get_drop_long_string() {
return _drop_long_string;}
76 static bool get_fillvalue_check() {
return _fillvalue_check;}
77 static bool get_check_ignore_obj() {
return _check_ignore_obj;}
78 static bool get_force_flatten_coor_attr() {
return _flatten_coor_attr;}
79 static bool get_eos5_rm_convention_attr_path() {
return _eos5_rm_convention_attr_path;}
83 static bool get_default_handle_dimension() {
return _default_handle_dimension;}
85 static void set_dmr_64bit_int(libdap::DMR *dmr) { dmr_int64 = dmr;}
86 static libdap::DMR* get_dmr_64bit_int() {
return dmr_int64;}
89 static string get_stp_east_filename() {
return _stp_east_filename;}
90 static string get_stp_north_filename() {
return _stp_north_filename;}
93 static unsigned int get_mdcache_entries() {
return _mdcache_entries;}
94 static unsigned int get_lrdcache_entries() {
return _lrdcache_entries;}
95 static unsigned int get_srdcache_entries() {
return _srdcache_entries;}
96 static float get_cache_purge_level() {
return _cache_purge_level;}
99 static ObjMemCache* get_lrdata_mem_cache() {
return lrdata_mem_cache;}
100 void set_lrdata_mem_cache(
ObjMemCache* my_lrdata_mem_cache)
101 {lrdata_mem_cache=my_lrdata_mem_cache;}
103 static ObjMemCache* get_srdata_mem_cache() {
return srdata_mem_cache;}
104 void set_srdata_mem_cache(
ObjMemCache* my_srdata_mem_cache)
105 {srdata_mem_cache=my_srdata_mem_cache;}
107 static bool get_common_cache_dirs() {
return _common_cache_dirs;}
108 static void get_lrd_cache_dir_list(std::vector<string>& cur_lrd_cache_dir_list)
109 { cur_lrd_cache_dir_list = lrd_cache_dir_list;}
111 static void get_lrd_non_cache_dir_list(std::vector<string>& cur_lrd_non_cache_dir_list)
112 { cur_lrd_non_cache_dir_list = lrd_non_cache_dir_list;}
114 static void get_lrd_var_cache_file_list(std::vector<string>& cur_lrd_var_cache_file_list)
115 { cur_lrd_var_cache_file_list = lrd_var_cache_file_list;}
119 static bool get_use_disk_cache() {
return _use_disk_cache;}
120 static string get_disk_cache_dir() {
return _disk_cache_dir;}
121 static string get_disk_cachefile_prefix() {
return _disk_cachefile_prefix;}
122 static unsigned long long get_disk_cache_size() {
return _disk_cache_size;}
123 static bool get_disk_cache_comp_data() {
return _disk_cache_comp_data;}
124 static bool get_disk_cache_float_only_comp(){
return _disk_cache_float_only_comp_data;}
125 static float get_disk_comp_threshold() {
return _disk_cache_comp_threshold;}
126 static unsigned long get_disk_var_size() {
return _disk_cache_var_size; }
128 static bool get_use_eosgeo_cachefile() {
return _use_latlon_disk_cache; }
129 static string get_latlon_disk_cache_dir() {
return _latlon_disk_cache_dir;}
130 static string get_latlon_disk_cachefile_prefix() {
return _latlon_disk_cachefile_prefix;}
131 static long get_latlon_disk_cache_size() {
return _latlon_disk_cache_size;}
141 static unsigned int _mdcache_entries;
142 static unsigned int _lrdcache_entries;
143 static unsigned int _srdcache_entries;
144 static float _cache_purge_level;
155 static bool _pass_fileid;
156 static bool _disable_structmeta;
157 static bool _disable_ecsmeta;
158 static bool _keep_var_leading_underscore;
159 static bool _check_name_clashing;
160 static bool _add_path_attrs;
161 static bool _drop_long_string;
162 static bool _fillvalue_check;
163 static bool _check_ignore_obj;
164 static bool _flatten_coor_attr;
165 static bool _eos5_rm_convention_attr_path;
168 static bool _default_handle_dimension;
169 static std::string _stp_east_filename;
170 static std::string _stp_north_filename;
172 static libdap::DMR *dmr_int64;
173 static bool _use_disk_cache;
174 static std::string _disk_cache_dir;
175 static std::string _disk_cachefile_prefix;
176 static unsigned long long _disk_cache_size;
177 static bool _disk_cache_comp_data;
178 static bool _disk_cache_float_only_comp_data;
179 static float _disk_cache_comp_threshold;
180 static unsigned long _disk_cache_var_size;
183 static bool _use_disk_meta_cache;
184 static bool _use_disk_dds_cache;
185 static std::string _disk_meta_cache_path;
187 static bool _use_latlon_disk_cache;
188 static long _latlon_disk_cache_size;
189 static std::string _latlon_disk_cache_dir;
190 static std::string _latlon_disk_cachefile_prefix;
192 static bool _common_cache_dirs;
193 static std::vector<std::string> lrd_cache_dir_list;
194 static std::vector<string> lrd_non_cache_dir_list;
195 static std::vector<string> lrd_var_cache_file_list;
196 static bool obtain_lrd_common_cache_dirs();
200 static void get_dds_with_attributes(
BESDDSResponse*bdds,
BESDataDDSResponse*data_bdds,
const std::string &container_name,
const std::string &filename,
const std::string &dds_cache_fname,
const std::string &das_cache_fname,
bool dds_from_dc,
bool das_from_dc,
bool build_data);
201 static void get_dds_without_attributes_datadds(
BESDataDDSResponse*data_bdds,
const std::string &container_name,
const std::string &filename);
203 static void read_dds_from_disk_cache(
BESDDSResponse* bdds,
BESDataDDSResponse* data_bdds,
bool build_data,
const std::string & container_name,
const std::string & h5_fname,
204 const std::string & dds_cache_fname,
const std::string &das_cache_fname, hid_t h5_fd,
bool das_from_dc);
206 static void add_das_to_dds(libdap::DDS *dds,
const std::string &container_name,
const std::string &filename,
const std::string &das_cache_fname,hid_t h5_fd,
bool das_from_dc);
208 static bool write_dds_to_disk_cache(
const std::string& dds_cache_fname,libdap::DDS *dds_ptr);
210 static bool write_das_to_disk_cache(
const std::string & das_cache_fname, libdap::DAS *das_ptr);
212 static bool read_das_from_disk_cache(
const std::string & cache_filename,libdap::DAS *das_ptr);