CMS 3D CMS Logo

Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends

evf::ServiceWebRegistry Class Reference

#include <ServiceWebRegistry.h>

List of all members.

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.

                                                               {
  std::cout << "Service registry constructor at " << std::hex << (unsigned long) this << std::dec << std::endl;
}

Member Function Documentation

void evf::ServiceWebRegistry::clear ( void  ) [private]

Definition at line 54 of file ServiceWebRegistry.cc.

References clm_, and gather_cfg::cout.

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

{
  std::cout << "Service registry clear for " << std::hex << (unsigned long) this << std::dec << std::endl; 
  clm_.clear();
}
std::vector< ServiceWeb * > evf::ServiceWebRegistry::getWebs ( )

Definition at line 13 of file ServiceWebRegistry.cc.

References clm_, gather_cfg::cout, and i.

{
  std::cout << " service web registry " << std::hex << (unsigned long) this << std::dec 
            << " has " << clm_.size() << " services registered " << std::endl;
  std::vector<ServiceWeb*> retval;
  for(idct i = clm_.begin(); i != clm_.end(); i++)
    {
      std::cout << "service " << (*i).first << " has web " << std::endl;
      retval.push_back((*i).second);
    }
  return retval;
}
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.

{
  idct i = clm_.find(name);
  if(i != clm_.end())
    {
      try{
        (*i).second->defaultWebPage(in,out);
      }
      catch(...)
        {
          std::cout << "exception caught when calling serviceweb page for " << name << std::endl;
        }
    }
}
void evf::ServiceWebRegistry::publish ( xdata::InfoSpace *  is)

Definition at line 43 of file ServiceWebRegistry.cc.

References clm_, and i.

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

{
    idct i = clm_.begin();
    while (i != clm_.end())
      {
        (*i).second->publish(is);
        i++;
      }

}
void evf::ServiceWebRegistry::registerWeb ( std::string &  name,
ServiceWeb cl 
) [inline]

Definition at line 32 of file ServiceWebRegistry.h.

References clm_, and gather_cfg::cout.

        {
          std::cout << "**********registering " << name << " to service web registry " 
                    << std::hex << (unsigned long) this << std::dec << std::endl;
          clm_.insert(std::pair<std::string, ServiceWeb*>(name,cl));
          std::cout << "**********registry size now " << clm_.size() << std::endl;
          // CAN ONLY BIND TO xdaq::Application methods...
          //      xgi::bind(cl, func, name);  
        } 

Friends And Related Function Documentation

friend class FWEPWrapper [friend]

Definition at line 50 of file ServiceWebRegistry.h.


Member Data Documentation

Definition at line 49 of file ServiceWebRegistry.h.

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