1 #ifndef ServiceRegistry_ServiceRegistry_h 2 #define ServiceRegistry_ServiceRegistry_h 33 namespace serviceregistry {
66 " no ServiceRegistry has been set for this thread");
76 " no ServiceRegistry has been set for this thread");
78 return manager_->template isAvailable<T>();
96 bool associate =
true);
100 std::vector<edm::ParameterSet>
config;
101 auto manager = std::make_shared<serviceregistry::ServicesManager>(
config);
102 auto wrapper = std::make_shared<serviceregistry::ServiceWrapper<T> >(
std::move(iService));
106 template <
typename T>
110 std::vector<edm::ParameterSet>
config;
111 auto manager = std::make_shared<serviceregistry::ServicesManager>(iToken, iLegacy,
config);
112 auto wrapper = std::make_shared<serviceregistry::ServiceWrapper<T> >(
std::move(iService));
117 template <
typename T>
119 std::vector<edm::ParameterSet>
config;
120 auto manager = std::make_shared<serviceregistry::ServicesManager>(
config);
121 manager->put(iWrapper);
124 template <
typename T>
128 std::vector<edm::ParameterSet>
config;
129 auto manager = std::make_shared<serviceregistry::ServicesManager>(iToken, iLegacy,
config);
130 manager->put(iWrapper);
142 std::shared_ptr<serviceregistry::ServicesManager>
manager_;
ServiceToken setContext(ServiceToken const &iNewToken)
static ServiceToken createServicesFromConfig(std::unique_ptr< ParameterSet > params)
static ServiceToken createContaining(std::shared_ptr< serviceregistry::ServiceWrapper< T > > iWrapper)
create a service token that holds the service held by iWrapper
virtual ~ServiceRegistry()
static ServiceToken createContaining(std::unique_ptr< T > iService, ServiceToken iToken, serviceregistry::ServiceLegacy iLegacy)
Operate const & operator=(Operate const &)=delete
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)
ServiceRegistry const & operator=(ServiceRegistry const &)=delete
static ServiceRegistry & instance()
static ServiceToken createContaining(std::unique_ptr< T > iService)
create a service token that holds the service defined by iService
Operate(ServiceToken const &iToken)
friend int main(int argc, char *argv[])
static ServiceToken createSet(std::vector< ParameterSet > &)
config
parse the configuration file
friend class edm::FwkImpl
static ServiceToken createContaining(std::shared_ptr< serviceregistry::ServiceWrapper< T > > iWrapper, ServiceToken iToken, serviceregistry::ServiceLegacy iLegacy)
ServiceToken presentToken() const
std::shared_ptr< serviceregistry::ServicesManager > manager_
static HepMC::HEPEVT_Wrapper wrapper