1 #ifndef art_Framework_Services_Registry_ServiceRegistry_h 2 #define art_Framework_Services_Registry_ServiceRegistry_h 16 #include "cetlib/LibraryManager.h" 24 class ActivityRegistry;
50 template <
typename T, art::ServiceScope>
58 return mgr->isAvailable<T>();
62 <<
" no ServiceRegistry has been set for this thread";
80 typename = std::enable_if_t<detail::ServiceHelper<T>::scope_val !=
87 <<
" no ServiceRegistry has been set for this thread";
93 typename = std::enable_if_t<detail::ServiceHelper<T>::scope_val ==
100 <<
" no ServiceRegistry has been set for this thread";
109 std::shared_ptr<ServicesManager>
manager_{
nullptr};
Operate(Operate const &)=delete
ServiceToken setContext(ServiceToken const &iNewToken)
static ServiceRegistry & instance()
void unsetContext(ServiceToken const &iOldToken)
ServiceToken presentToken() const
std::shared_ptr< ServicesManager > manager_
static bool isAvailable()
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
std::vector< fhicl::ParameterSet > ParameterSets
ServiceRegistry()=default
ServiceRegistry & operator=(ServiceRegistry const &)=delete
static std::string const & service()
Operate(ServiceToken const &iToken)
Operate & operator=(Operate const &)=delete
static ServiceToken createSet(ParameterSets const &, ActivityRegistry &)