33#include "HDF4Module.h"
34#include <BESRequestHandlerList.h>
35#include "HDF4RequestHandler.h"
36#include <BESDapService.h>
37#include <BESContainerStorageList.h>
38#include <BESFileContainerStorage.h>
39#include <BESCatalogDirectory.h>
40#include <BESCatalogList.h>
44const string HDF4_CATALOG=
"catalog";
46void HDF4Module::initialize(
const string & modname)
48 BESDEBUG(
"h4",
"Initializing HDF4 module " << modname << endl);
50 auto handler =
new HDF4RequestHandler(modname);
51 BESRequestHandlerList::TheList()->add_handler(modname, handler);
55 if( !BESCatalogList::TheCatalogList()->ref_catalog( HDF4_CATALOG ) ) {
56 BESCatalogList::TheCatalogList()->
57 add_catalog(
new BESCatalogDirectory(HDF4_CATALOG));
60 if( !BESContainerStorageList::TheList()->ref_persistence( HDF4_CATALOG ) ) {
61 auto csc =
new BESFileContainerStorage(HDF4_CATALOG);
62 BESContainerStorageList::TheList()->add_persistence(csc);
66 BESDEBUG(
"h4",
"Done Initializing HDF4 module " << modname << endl);
69void HDF4Module::terminate(
const string & modname)
71 BESDEBUG(
"h4",
"Cleaning HDF4 module " << modname << endl);
73 BESRequestHandler *rh = BESRequestHandlerList::TheList()->remove_handler(modname);
76 BESContainerStorageList::TheList()->deref_persistence(HDF4_CATALOG);
78 BESCatalogList::TheCatalogList()->deref_catalog(HDF4_CATALOG);
80 BESDEBUG(
"h4",
"Done Cleaning HDF4 module " << modname << endl);
91 strm << BESIndent::LMarg <<
"HDF4Module::dump - ("
92 << (
void *)
this <<
")" << endl;
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