37#include <BESRequestHandlerList.h>
39#include <BESDapService.h>
40#include <BESContainerStorageList.h>
41#include <BESFileContainerStorage.h>
42#include <BESCatalogDirectory.h>
43#include <BESCatalogList.h>
45#define HDF5_CATALOG "catalog"
46#define prolog std::string("HDF5RequestHandler::").append(__func__).append("() - ")
50void HDF5Module::initialize(
const string & modname)
52 BESDEBUG(HDF5_NAME, prolog <<
"Initializing HDF5 module " << modname << endl);
54 auto handler_unique = make_unique<HDF5RequestHandler>(modname);
55 auto handler = handler_unique.release();
56 BESRequestHandlerList::TheList()->add_handler(modname, handler);
60 if (!BESCatalogList::TheCatalogList()->ref_catalog(HDF5_CATALOG)) {
61 auto BESCatalogDirectory_unique = make_unique<BESCatalogDirectory>(HDF5_CATALOG);
62 BESCatalogList::TheCatalogList()->add_catalog(BESCatalogDirectory_unique.release());
65 if (!BESContainerStorageList::TheList()->ref_persistence(HDF5_CATALOG)) {
66 auto csc_unique = make_unique<BESFileContainerStorage>(HDF5_CATALOG);
67 auto csc = csc_unique.release();
68 BESContainerStorageList::TheList()->add_persistence(csc);
73 BESDEBUG(HDF5_NAME, prolog <<
"Done Initializing HDF5 " << modname << endl);
76void HDF5Module::terminate(
const string & modname)
78 BESDEBUG(HDF5_NAME, prolog <<
"Cleaning HDF5 module " << modname << endl);
80 BESRequestHandler *rh = BESRequestHandlerList::TheList()->remove_handler(modname);
83 BESContainerStorageList::TheList()->deref_persistence(HDF5_CATALOG);
85 BESCatalogList::TheCatalogList()->deref_catalog(HDF5_CATALOG);
87 BESDEBUG(HDF5_NAME, prolog <<
"Done Cleaning HDF5 module " << modname << endl);
98 strm << BESIndent::LMarg <<
"HDF5Module::dump - (" << (
void *)
this <<
")" << endl;
The starting and ending fuctions for the HDF5 OPeNDAP handler via BES.
include the entry functions to execute the handlers
static void handle_dap_service(const std::string &handler)
static function to register a handler to handle the dap services
static void Register(const std::string &flagName)
register the specified debug flag
void dump(std::ostream &strm) const override
dumps information about this object