CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC4_patch1/src/EventFilter/Utilities/src/ModuleWebRegistry.cc

Go to the documentation of this file.
00001 #include "EventFilter/Utilities/interface/ModuleWebRegistry.h"
00002 #include "EventFilter/Utilities/interface/ModuleWeb.h"
00003 
00004 #include <iostream>
00005 
00006 namespace evf{
00007 ModuleWebRegistry::ModuleWebRegistry(const edm::ParameterSet &ps){
00008 }
00009 
00010 
00011 
00012 bool ModuleWebRegistry::checkWeb(const std::string &name){return clm_.find(name) != clm_.end();}
00013 
00014 void ModuleWebRegistry::invoke(xgi::Input *in, xgi::Output *out, const std::string &name)
00015 {
00016   idct i = clm_.find(name);
00017   if(i != clm_.end())
00018     {
00019       try{
00020         (*i).second->defaultWebPage(in,out);
00021       }
00022       catch(...)
00023         {
00024           std::cout << "exception caught when calling moduleweb page for " << name << std::endl;
00025         }
00026     }
00027 }
00028 
00029 void ModuleWebRegistry::openBackDoor(const std::string &name, unsigned int timeout_sec, bool * started)
00030 {
00031   idct i = clm_.find(name);
00032   if(i != clm_.end())
00033     {
00034       try{
00035         (*i).second->openBackDoor(timeout_sec,started);
00036       }
00037       catch(...)
00038         {
00039           std::cout << "exception caught when calling open backdoor for " << name << std::endl;
00040         }
00041     }
00042 }
00043 
00044 void ModuleWebRegistry::closeBackDoor(const std::string &name)
00045 {
00046   idct i = clm_.find(name);
00047   if(i != clm_.end())
00048     {
00049       try{
00050         (*i).second->closeBackDoor();
00051       }
00052       catch(...)
00053         {
00054           std::cout << "exception caught when calling close backdoor for " << name << std::endl;
00055         }
00056     }
00057 }
00058 
00059 void ModuleWebRegistry::publishForkInfo(std::string name, moduleweb::ForkInfoObj * forkInfoObj)
00060 {
00061     idct i = clm_.find(name);
00062     if(i != clm_.end())
00063     {
00064         (*i).second->publishForkInfo(forkInfoObj);
00065     }
00066 
00067 }
00068 
00069 void ModuleWebRegistry::publish(xdata::InfoSpace *is)
00070 {
00071     idct i = clm_.begin();
00072     while (i != clm_.end())
00073       {
00074         (*i).second->publish(is);
00075         i++;
00076       }
00077 
00078 }
00079 void ModuleWebRegistry::publishToXmas(xdata::InfoSpace *is)
00080 {
00081     idct i = clm_.begin();
00082     while (i != clm_.end())
00083       {
00084         (*i).second->publishToXmas(is);
00085         i++;
00086       }
00087 
00088 }
00089 void ModuleWebRegistry::clear(){clm_.clear();}
00090 
00091 
00092 } //end namespace evf