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>
55#include "CSVRequestHandler.h"
59#define CSV_CATALOG "catalog"
61void CSVModule::initialize(
const string &modname)
63 BESDEBUG(
"csv",
"Initializing CSV Module: " << modname << endl);
65 BESRequestHandlerList::TheList()->add_handler(modname,
new CSVRequestHandler(modname));
69 if (!BESCatalogList::TheCatalogList()->ref_catalog(CSV_CATALOG)) {
70 BESCatalogList::TheCatalogList()->add_catalog(
new BESCatalogDirectory(CSV_CATALOG));
73 if (!BESContainerStorageList::TheList()->ref_persistence(CSV_CATALOG)) {
74 BESContainerStorageList::TheList()->add_persistence(
new BESFileContainerStorage(CSV_CATALOG));
79 BESDEBUG(
"csv",
"Done Initializing CSV Handler: " << modname << endl);
82void CSVModule::terminate(
const string &modname)
84 BESDEBUG(
"csv",
"Cleaning CSV Module: " << modname << endl);
86 BESRequestHandler *rh = BESRequestHandlerList::TheList()->remove_handler(modname);
89 BESContainerStorageList::TheList()->deref_persistence(CSV_CATALOG);
91 BESCatalogList::TheCatalogList()->deref_catalog(CSV_CATALOG);
93 BESDEBUG(
"csv",
"Done Cleaning CSV Module: " << modname << endl);
105 strm << BESIndent::LMarg <<
"CSVModule::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
dump the contents of this object to the specified ostream