1 #ifndef ServiceRegistry_ServiceRegistry_h
2 #define ServiceRegistry_ServiceRegistry_h
33 namespace serviceregistry {
67 " no ServiceRegistry has been set for this thread");
77 " no ServiceRegistry has been set for this thread");
79 return manager_->
template isAvailable<T>();
97 bool associate =
true);
101 std::vector<edm::ParameterSet>
config;
102 auto manager = std::make_shared<serviceregistry::ServicesManager>(
config);
103 auto wrapper = std::make_shared<serviceregistry::ServiceWrapper<T> >(iService);
104 manager->put(wrapper);
111 std::vector<edm::ParameterSet>
config;
112 auto manager = std::make_shared<serviceregistry::ServicesManager>(iToken, iLegacy,
config);
113 auto wrapper = std::make_shared<serviceregistry::ServiceWrapper<T> >(iService);
114 manager->put(wrapper);
120 std::vector<edm::ParameterSet>
config;
121 auto manager = std::make_shared<serviceregistry::ServicesManager>(
config);
122 manager->put(iWrapper);
129 std::vector<edm::ParameterSet>
config;
130 auto manager = std::make_shared<serviceregistry::ServicesManager>(iToken, iLegacy,
config);
131 manager->put(iWrapper);
146 std::shared_ptr<serviceregistry::ServicesManager>
manager_;
ServiceToken setContext(ServiceToken const &iNewToken)
static ServiceToken createContaining(std::shared_ptr< serviceregistry::ServiceWrapper< T > > iWrapper)
create a service token that holds the service held by iWrapper
virtual ~ServiceRegistry()
ServiceToken presentToken() const
static ServiceToken createContaining(std::auto_ptr< T > iService)
create a service token that holds the service defined by iService
static void throwThis(Code category, char const *message0="", char const *message1="", char const *message2="", char const *message3="", char const *message4="")
static ServiceToken createServicesFromConfig(std::string const &config)
ServiceRegistry const & operator=(ServiceRegistry const &)
void unsetContext(ServiceToken const &iOldToken)
static ServiceRegistry & instance()
Operate(ServiceToken const &iToken)
friend int main(int argc, char *argv[])
static ServiceToken createSet(std::vector< ParameterSet > &)
static ServiceToken createContaining(std::auto_ptr< T > iService, ServiceToken iToken, serviceregistry::ServiceLegacy iLegacy)
friend class edm::FwkImpl
static ServiceToken createContaining(std::shared_ptr< serviceregistry::ServiceWrapper< T > > iWrapper, ServiceToken iToken, serviceregistry::ServiceLegacy iLegacy)
Operate const & operator=(Operate const &)
std::shared_ptr< serviceregistry::ServicesManager > manager_
static HepMC::HEPEVT_Wrapper wrapper