CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends
evf::ServiceWebRegistry Class Reference

#include <ServiceWebRegistry.h>

Public Member Functions

std::vector< ServiceWeb * > getWebs ()
 
void invoke (xgi::Input *, xgi::Output *, const std::string &)
 
void publish (xdata::InfoSpace *)
 
void registerWeb (std::string &name, ServiceWeb *cl)
 
 ServiceWebRegistry (const edm::ParameterSet &)
 

Private Types

typedef std::map< std::string,
ServiceWeb * > 
dct
 
typedef dct::iterator idct
 

Private Member Functions

void clear ()
 

Private Attributes

dct clm_
 

Friends

class FWEPWrapper
 

Detailed Description

Definition at line 27 of file ServiceWebRegistry.h.

Member Typedef Documentation

typedef std::map<std::string, ServiceWeb*> evf::ServiceWebRegistry::dct
private

Definition at line 46 of file ServiceWebRegistry.h.

typedef dct::iterator evf::ServiceWebRegistry::idct
private

Definition at line 47 of file ServiceWebRegistry.h.

Constructor & Destructor Documentation

evf::ServiceWebRegistry::ServiceWebRegistry ( const edm::ParameterSet ps)

Definition at line 7 of file ServiceWebRegistry.cc.

References gather_cfg::cout.

7  {
8  std::cout << "Service registry constructor at " << std::hex << (unsigned long) this << std::dec << std::endl;
9 }
tuple cout
Definition: gather_cfg.py:121

Member Function Documentation

void evf::ServiceWebRegistry::clear ( void  )
private
std::vector< ServiceWeb * > evf::ServiceWebRegistry::getWebs ( )

Definition at line 13 of file ServiceWebRegistry.cc.

References clm_, gather_cfg::cout, and i.

14 {
15  std::cout << " service web registry " << std::hex << (unsigned long) this << std::dec
16  << " has " << clm_.size() << " services registered " << std::endl;
17  std::vector<ServiceWeb*> retval;
18  for(idct i = clm_.begin(); i != clm_.end(); i++)
19  {
20  std::cout << "service " << (*i).first << " has web " << std::endl;
21  retval.push_back((*i).second);
22  }
23  return retval;
24 }
int i
Definition: DBlmapReader.cc:9
tuple cout
Definition: gather_cfg.py:121
void evf::ServiceWebRegistry::invoke ( xgi::Input in,
xgi::Output out,
const std::string &  name 
)

Definition at line 27 of file ServiceWebRegistry.cc.

References clm_, gather_cfg::cout, and i.

28 {
29  idct i = clm_.find(name);
30  if(i != clm_.end())
31  {
32  try{
33  (*i).second->defaultWebPage(in,out);
34  }
35  catch(...)
36  {
37  std::cout << "exception caught when calling serviceweb page for " << name << std::endl;
38  }
39  }
40 }
int i
Definition: DBlmapReader.cc:9
tuple out
Definition: dbtoconf.py:99
tuple cout
Definition: gather_cfg.py:121
void evf::ServiceWebRegistry::publish ( xdata::InfoSpace *  is)

Definition at line 43 of file ServiceWebRegistry.cc.

References clm_, and i.

Referenced by evf::FWEPWrapper::init().

44 {
45  idct i = clm_.begin();
46  while (i != clm_.end())
47  {
48  (*i).second->publish(is);
49  i++;
50  }
51 
52 }
int i
Definition: DBlmapReader.cc:9
void evf::ServiceWebRegistry::registerWeb ( std::string &  name,
ServiceWeb cl 
)
inline

Definition at line 32 of file ServiceWebRegistry.h.

References clm_, and gather_cfg::cout.

33  {
34  std::cout << "**********registering " << name << " to service web registry "
35  << std::hex << (unsigned long) this << std::dec << std::endl;
36  clm_.insert(std::pair<std::string, ServiceWeb*>(name,cl));
37  std::cout << "**********registry size now " << clm_.size() << std::endl;
38  // CAN ONLY BIND TO xdaq::Application methods...
39  // xgi::bind(cl, func, name);
40  }
float cl
Definition: Combine.cc:71
tuple cout
Definition: gather_cfg.py:121

Friends And Related Function Documentation

friend class FWEPWrapper
friend

Definition at line 50 of file ServiceWebRegistry.h.

Member Data Documentation

dct evf::ServiceWebRegistry::clm_
private

Definition at line 49 of file ServiceWebRegistry.h.

Referenced by clear(), getWebs(), invoke(), publish(), and registerWeb().