LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
ServiceRegistry.cc
Go to the documentation of this file.
1 // ======================================================================
2 //
3 // ServiceRegistry
4 //
5 // ======================================================================
6 
9 
11 using art::ServiceToken;
13 
15 ServiceRegistry::setContext(ServiceToken const& iNewToken)
16 {
17  ServiceToken result{manager_};
18  manager_ = iNewToken.manager_;
19  return result;
20 }
21 
22 void
24 {
25  manager_ = iOldToken.manager_;
26 }
27 
30 {
31  return ServiceToken{manager_};
32 }
33 
36 {
37  auto result = std::make_shared<ServicesManager>(
38  iPS, ServiceRegistry::instance().lm_, reg);
39  return ServiceToken{result};
40 }
41 
44 {
45  static ServiceRegistry me;
46  return me;
47 }
48 
49 // ======================================================================
std::shared_ptr< ServicesManager > manager_
Definition: ServiceToken.h:86
static ServiceRegistry & instance()
void unsetContext(ServiceToken const &iOldToken)
ServiceToken presentToken() const
std::shared_ptr< ServicesManager > manager_
std::vector< fhicl::ParameterSet > ParameterSets
cet::LibraryManager lm_
static ServiceToken createSet(ParameterSets const &, ActivityRegistry &)