CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/EventFilter/Utilities/interface/ServiceWebRegistry.h

Go to the documentation of this file.
00001 #ifndef EVF_SERVICE_WEB_REGISTRY_H
00002 #define EVF_SERVICE_WEB_REGISTRY_H
00003 
00004 #include <string>
00005 #include <map>
00006 #include <vector>
00007 #include <iostream>
00008 #include "xgi/Method.h"
00009 #include "xdata/InfoSpace.h"
00010 
00011 namespace edm{
00012   class ParameterSet;
00013 }
00014 
00015 namespace xgi{
00016   class Input;
00017   class Output;
00018 }
00019 
00020 namespace xdaq{
00021   class Application;
00022 }
00023 
00024 namespace evf
00025 {
00026   class ServiceWeb;
00027   class ServiceWebRegistry
00028     {
00029     public:
00030       ServiceWebRegistry(const edm::ParameterSet &);
00031 
00032       void registerWeb(std::string &name, ServiceWeb *cl)
00033         {
00034           std::cout << "**********registering " << name << " to service web registry " 
00035                     << std::hex << (unsigned long) this << std::dec << std::endl;
00036           clm_.insert(std::pair<std::string, ServiceWeb*>(name,cl));
00037           std::cout << "**********registry size now " << clm_.size() << std::endl;
00038           // CAN ONLY BIND TO xdaq::Application methods...
00039           //      xgi::bind(cl, func, name);  
00040         } 
00041       void invoke(xgi::Input *, xgi::Output *, const std::string &);
00042       void publish(xdata::InfoSpace *);
00043       std::vector<ServiceWeb *> getWebs();
00044 
00045     private:
00046       typedef std::map<std::string, ServiceWeb*> dct;
00047       typedef dct::iterator idct;
00048       void clear();
00049       dct clm_;
00050       friend class FWEPWrapper;
00051     };
00052 }
00053 #endif
00054