38#include <BESRequestHandlerList.h>
39#include <BESDapService.h>
40#include <BESContainerStorageList.h>
41#include <BESFileContainerStorage.h>
42#include <BESCatalogDirectory.h>
43#include <BESCatalogList.h>
47#include "FFRequestHandler.h"
49#define FF_CATALOG "catalog"
51void FFModule::initialize(
const string &modname)
53 BESDEBUG(
"ff",
"Initializing FF module " << modname << endl);
55 BESRequestHandler *handler =
new FFRequestHandler(modname);
56 BESRequestHandlerList::TheList()->add_handler(modname, handler);
60 if (!BESCatalogList::TheCatalogList()->ref_catalog(FF_CATALOG)) {
61 BESCatalogList::TheCatalogList()->add_catalog(
new BESCatalogDirectory(FF_CATALOG));
64 BESDEBUG(
"ff",
" catalog already exists, skipping" << endl);
67 if (!BESContainerStorageList::TheList()->ref_persistence(FF_CATALOG)) {
68 BESContainerStorageList::TheList()->add_persistence(
new BESFileContainerStorage(FF_CATALOG));
71 BESDEBUG(
"ff",
" storage already exists, skipping" << endl);
76 BESDEBUG(
"ff",
"Done Initializing FF module " << modname << endl);
79void FFModule::terminate(
const string &modname)
81 BESDEBUG(
"ff",
"Cleaning FF module " << modname << endl);
83 BESRequestHandler *rh = BESRequestHandlerList::TheList()->remove_handler(modname);
86 BESContainerStorageList::TheList()->deref_persistence( FF_CATALOG);
88 BESCatalogList::TheCatalogList()->deref_catalog( FF_CATALOG);
90 BESDEBUG(
"ff",
"Done Cleaning FF module " << modname << endl);
101 strm << BESIndent::LMarg <<
"FFModule::dump - (" << (
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
virtual void dump(std::ostream &strm) const
dumps information about this object