|
|
Go to the documentation of this file. 1 #ifndef ServiceRegistry_ServiceRegistry_h
2 #define ServiceRegistry_ServiceRegistry_h
33 namespace serviceregistry {
64 " no ServiceRegistry has been set for this thread");
74 " no ServiceRegistry has been set for this thread");
76 return manager_->template isAvailable<T>();
94 bool associate =
true);
98 std::vector<edm::ParameterSet>
config;
99 auto manager = std::make_shared<serviceregistry::ServicesManager>(
config);
100 auto wrapper = std::make_shared<serviceregistry::ServiceWrapper<T> >(
std::move(iService));
104 template <
typename T>
108 std::vector<edm::ParameterSet>
config;
109 auto manager = std::make_shared<serviceregistry::ServicesManager>(iToken, iLegacy,
config);
110 auto wrapper = std::make_shared<serviceregistry::ServiceWrapper<T> >(
std::move(iService));
115 template <
typename T>
117 std::vector<edm::ParameterSet>
config;
118 auto manager = std::make_shared<serviceregistry::ServicesManager>(
config);
119 manager->put(iWrapper);
122 template <
typename T>
126 std::vector<edm::ParameterSet>
config;
127 auto manager = std::make_shared<serviceregistry::ServicesManager>(iToken, iLegacy,
config);
128 manager->put(iWrapper);
143 std::shared_ptr<serviceregistry::ServicesManager>
manager_;
ServiceRegistry const & operator=(ServiceRegistry const &)=delete
friend class edm::FwkImpl
Operate const & operator=(Operate const &)=delete
static ServiceToken createSet(std::vector< ParameterSet > &)
static HepMC::HEPEVT_Wrapper wrapper
ServiceToken setContext(ServiceToken const &iNewToken)
static ServiceToken createContaining(std::shared_ptr< serviceregistry::ServiceWrapper< T > > iWrapper, ServiceToken iToken, serviceregistry::ServiceLegacy iLegacy)
virtual ~ServiceRegistry()
std::shared_ptr< serviceregistry::ServicesManager > manager_
static ServiceToken createServicesFromConfig(std::unique_ptr< ParameterSet > params)
ServiceToken presentToken() const
Operate(ServiceToken const &iToken)
static ServiceRegistry & instance()
static ServiceToken createContaining(std::unique_ptr< T > iService, ServiceToken iToken, serviceregistry::ServiceLegacy iLegacy)
static ServiceToken createContaining(std::unique_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="")
void unsetContext(ServiceToken const &iOldToken)
static ServiceToken createContaining(std::shared_ptr< serviceregistry::ServiceWrapper< T > > iWrapper)
create a service token that holds the service held by iWrapper
friend int main(int argc, char *argv[])