|
|
Go to the documentation of this file. 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_;
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()
config
parse the configuration file
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[])