Main Page
Namespaces
Classes
Package Documentation
CVS Directory
WorkBook
Offline Guide
Release schedule
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
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
// $Id: Service.h,v 1.2 2005/09/12 19:09:56 chrjones Exp $
20
//
21
22
// system include files
23
24
// user include files
25
#include "
FWCore/ServiceRegistry/interface/ServiceRegistry.h
"
26
27
// forward declarations
28
29
namespace
edm {
30
template
<
class
T>
31
class
Service
32
{
33
34
public
:
35
Service
() {}
36
//virtual ~Service();
37
38
// ---------- const member functions ---------------------
39
T
*
operator->
()
const
{
40
return
&(
ServiceRegistry::instance
().template get<T>());
41
}
42
43
T
&
operator*
()
const
{
44
return
ServiceRegistry::instance
().template get<T>();
45
}
46
47
bool
isAvailable
()
const
{
48
return
ServiceRegistry::instance
().template isAvailable<T>();
49
}
50
51
operator
bool()
const
{
52
return
isAvailable
();
53
}
54
55
// ---------- static member functions --------------------
56
57
// ---------- member functions ---------------------------
58
59
private
:
60
};
61
62
}
63
64
#endif
edm::Service::operator*
T & operator*() const
Definition:
Service.h:43
edm::Service
Definition:
Service.h:31
ServiceRegistry.h
edm::Service::isAvailable
bool isAvailable() const
Definition:
Service.h:47
edm::ServiceRegistry::instance
static ServiceRegistry & instance()
Definition:
ServiceRegistry.cc:108
edm::Service::Service
Service()
Definition:
Service.h:35
T
long double T
Definition:
Basic3DVectorLD.h:59
edm::Service::operator->
T * operator->() const
Definition:
Service.h:39
Generated for CMSSW Reference Manual by
1.8.5