42#include <BESRequestHandlerList.h>
43#include <BESResponseHandlerList.h>
44#include <BESResponseNames.h>
46#include <BESContainerStorageList.h>
47#include <BESFileContainerStorage.h>
48#include <BESCatalogDirectory.h>
49#include <BESCatalogList.h>
50#include <BESDapService.h>
54#include <TheBESKeys.h>
59#include "CmrCatalog.h"
60#include "CmrContainerStorage.h"
62#define prolog std::string("CmrModule::").append(__func__).append("() - ")
64void CmrModule::initialize(
const string &modname)
67 BESDEBUG(MODULE, prolog <<
"BEGIN (modname: " << modname <<
")" << endl);
68 if (!BESCatalogList::TheCatalogList()->ref_catalog(CMR_CATALOG_NAME)) {
69 BESDEBUG(MODULE, prolog <<
"Enabling Cmr Catalog Module." << endl);
70 BESCatalogList::TheCatalogList()->add_catalog(
new cmr::CmrCatalog(CMR_CATALOG_NAME));
73 BESDEBUG(MODULE, prolog <<
"CMR Catalog Module is not enabled." << endl);
76 if (!BESContainerStorageList::TheList()->ref_persistence(CMR_CATALOG_NAME) &&
78 BESDEBUG(MODULE, prolog <<
"Enabling CmrContainerStorage for access." << endl);
79 BESContainerStorageList::TheList()->add_persistence(
new cmr::CmrContainerStorage(CMR_CATALOG_NAME));
82 BESDEBUG(MODULE, prolog <<
"CmrContainerStorage is not enabled." << endl);
85 BESDEBUG(MODULE,
"Done Initializing CMR Handler: " << modname << endl);
88void CmrModule::terminate(
const string &modname)
90 BESDEBUG(MODULE, prolog <<
"Cleaning CMR Module: " << modname << endl);
95 BESContainerStorageList::TheList()->deref_persistence(CMR_CATALOG_NAME);
97 BESCatalogList::TheCatalogList()->deref_catalog(CMR_CATALOG_NAME);
99 BESDEBUG(MODULE, prolog <<
"Done Cleaning CMR Module: " << modname << endl);
111 strm << BESIndent::LMarg << prolog <<
"(" << (
void *)
this <<
")" << endl;
static void Register(const std::string &flagName)
register the specified debug flag
virtual void dump(std::ostream &strm) const
dump the contents of this object to the specified ostream
static TheBESKeys * TheKeys()
Access to the singleton.