Public Member Functions | Private Attributes | List of all members
art::ServiceHandle< T, SCOPE > Class Template Reference

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

Public Member Functions

 ServiceHandle ()
 
Toperator-> () const
 
Toperator* () const
 
Tget () const
 

Private Attributes

Tinstance
 

Detailed Description

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

Definition at line 39 of file ServiceHandle.h.

Constructor & Destructor Documentation

template<typename T, art::ServiceScope SCOPE>
art::ServiceHandle< T, SCOPE >::ServiceHandle ( )
inline

Definition at line 53 of file ServiceHandle.h.

53  : instance {
54  &ServiceRegistry::instance().get<std::remove_const_t<T>>()
55  }
56  {}
57  catch (art::Exception const& x)
58  {
60  << "Unable to create ServiceHandle.\n"
61  << "Perhaps the FHiCL configuration does not specify the necessary "
62  "service?\n"
63  << "The class of the service is noted below...\n"
64  << x;
65  }
static ServiceRegistry & instance()
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66

Member Function Documentation

template<typename T, art::ServiceScope SCOPE>
T* art::ServiceHandle< T, SCOPE >::get ( ) const
inline
template<typename T, art::ServiceScope SCOPE>
T& art::ServiceHandle< T, SCOPE >::operator* ( ) const
inline

Definition at line 68 of file ServiceHandle.h.

68 { return *instance; }
template<typename T, art::ServiceScope SCOPE>
T* art::ServiceHandle< T, SCOPE >::operator-> ( ) const
inline

Definition at line 67 of file ServiceHandle.h.

67 { return instance; }

Member Data Documentation

template<typename T, art::ServiceScope SCOPE>
T* art::ServiceHandle< T, SCOPE >::instance
private

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