Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
art::ServiceRegistry Class Reference

#include "/cvmfs/nova.opensciencegrid.org/externals/art/v3_05_01/source/art/Framework/Services/Registry/ServiceRegistry.h"

Public Member Functions

 ~ServiceRegistry () noexcept
 
 ServiceRegistry (ServiceRegistry const &)=delete
 
 ServiceRegistry (ServiceRegistry &&)=delete
 
ServiceRegistryoperator= (ServiceRegistry const &)=delete
 
ServiceRegistryoperator= (ServiceRegistry &&)=delete
 

Static Public Member Functions

template<typename T >
static bool isAvailable ()
 

Private Member Functions

 ServiceRegistry () noexcept
 
void setManager (ServicesManager *) noexcept
 
template<typename T >
Tget () const
 

Static Private Member Functions

static ServiceRegistryinstance () noexcept
 

Private Attributes

cet::exempt_ptr< ServicesManagermanager_ {nullptr}
 

Friends

class EventProcessor
 
template<typename T , art::ServiceScope >
class ServiceHandle
 
void art::test::set_manager_for_tests (ServicesManager *)
 

Detailed Description

Definition at line 24 of file ServiceRegistry.h.

Constructor & Destructor Documentation

art::ServiceRegistry::~ServiceRegistry ( )
noexcept
art::ServiceRegistry::ServiceRegistry ( ServiceRegistry const &  )
delete
art::ServiceRegistry::ServiceRegistry ( ServiceRegistry &&  )
delete
art::ServiceRegistry::ServiceRegistry ( )
privatenoexcept

Member Function Documentation

template<typename T >
T& art::ServiceRegistry::get ( ) const
inlineprivate

Definition at line 63 of file ServiceRegistry.h.

References art::errors::ServiceNotFound, and T.

Referenced by art::ServiceHandle< art::FileTransfer >::ServiceHandle().

64  {
65  if (!manager_) {
67  << " no ServiceRegistry has been set for this thread";
68  }
69  return manager_->get<T>();
70  }
cet::exempt_ptr< ServicesManager > manager_
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
double T
Definition: Xdiff_gwt.C:5
static ServiceRegistry& art::ServiceRegistry::instance ( )
staticprivatenoexcept
template<typename T >
static bool art::ServiceRegistry::isAvailable ( )
inlinestatic

Definition at line 47 of file ServiceRegistry.h.

References art::errors::ServiceNotFound, and T.

48  {
49  if (auto& mgr = instance().manager_) {
50  return mgr->isAvailable<T>();
51  }
53  << " no ServiceRegistry has been set for this thread";
54  }
static ServiceRegistry & instance() noexcept
cet::exempt_ptr< ServicesManager > manager_
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
double T
Definition: Xdiff_gwt.C:5
ServiceRegistry& art::ServiceRegistry::operator= ( ServiceRegistry const &  )
delete
ServiceRegistry& art::ServiceRegistry::operator= ( ServiceRegistry &&  )
delete
void art::ServiceRegistry::setManager ( ServicesManager )
privatenoexcept

Friends And Related Function Documentation

friend class EventProcessor
friend

Definition at line 28 of file ServiceRegistry.h.

template<typename T , art::ServiceScope >
friend class ServiceHandle
friend

Definition at line 32 of file ServiceRegistry.h.

Member Data Documentation

cet::exempt_ptr<ServicesManager> art::ServiceRegistry::manager_ {nullptr}
private

Definition at line 73 of file ServiceRegistry.h.


The documentation for this class was generated from the following file: