FWCore
ServiceRegistry
interface
Service.h
Go to the documentation of this file.
1
#ifndef ServiceRegistry_Service_h
2
#define ServiceRegistry_Service_h
3
// -*- C++ -*-
4
//
5
// Package: ServiceRegistry
6
// Class : Service
7
//
16
//
17
// Original Author: Chris Jones
18
// Created: Wed Sep 7 15:17:17 EDT 2005
19
//
20
21
// system include files
22
23
// user include files
24
#include "
FWCore/ServiceRegistry/interface/ServiceRegistry.h
"
25
26
// forward declarations
27
28
namespace
edm
{
29
template
<
class
T>
30
class
Service
{
31
public
:
32
Service
() {}
33
//virtual ~Service();
34
35
// ---------- const member functions ---------------------
36
T
*
operator->
()
const
{
return
&(
ServiceRegistry::instance
().template get<T>()); }
37
38
T
&
operator*
()
const
{
return
ServiceRegistry::instance
().template get<T>(); }
39
40
bool
isAvailable
()
const
{
return
ServiceRegistry::instance
().template isAvailable<T>(); }
41
42
operator
bool
()
const
{
return
isAvailable
(); }
43
44
// ---------- static member functions --------------------
45
46
// ---------- member functions ---------------------------
47
48
private
:
49
};
50
51
}
// namespace edm
52
53
#endif
edm::Service
Definition:
Service.h:30
edm::Service::operator*
T & operator*() const
Definition:
Service.h:38
ServiceRegistry.h
edm::Service::operator->
T * operator->() const
Definition:
Service.h:36
edm::ServiceRegistry::instance
static ServiceRegistry & instance()
Definition:
ServiceRegistry.cc:90
edm::Service::Service
Service()
Definition:
Service.h:32
electrons_cff.bool
bool
Definition:
electrons_cff.py:366
edm
HLT enums.
Definition:
AlignableModifier.h:19
edm::Service::isAvailable
bool isAvailable() const
Definition:
Service.h:40
T
long double T
Definition:
Basic3DVectorLD.h:48
Generated for CMSSW Reference Manual by
1.8.14