FWCore
ServiceRegistry
interface
ServiceWrapper.h
Go to the documentation of this file.
1
#ifndef ServiceRegistry_ServiceWrapper_h
2
#define ServiceRegistry_ServiceWrapper_h
3
// -*- C++ -*-
4
//
5
// Package: ServiceRegistry
6
// Class : ServiceWrapper
7
//
16
//
17
// Original Author: Chris Jones
18
// Created: Mon Sep 5 13:33:01 EDT 2005
19
//
20
21
// system include files
22
#include <memory>
23
24
// user include files
25
#include "
FWCore/ServiceRegistry/interface/ServiceWrapperBase.h
"
26
#include "
FWCore/Utilities/interface/propagate_const.h
"
27
28
// forward declarations
29
namespace
edm
{
30
class
ParameterSet
;
31
class
ActivityRegistry
;
32
33
namespace
serviceregistry {
34
35
template
<
class
T>
36
class
ServiceWrapper
:
public
ServiceWrapperBase
{
37
public
:
38
ServiceWrapper
(std::unique_ptr<T> iService) :
service_
(
std
::
move
(iService)) {}
39
ServiceWrapper
(
const
ServiceWrapper
&) =
delete
;
// stop default
40
const
ServiceWrapper
&
operator=
(
const
ServiceWrapper
&) =
delete
;
// stop default
41
42
// ---------- const member functions ---------------------
43
T
const
&
get
()
const
{
return
*
service_
; }
44
45
// ---------- static member functions --------------------
46
47
// ---------- member functions ---------------------------
48
T
&
get
() {
return
*
service_
; }
49
50
private
:
51
// ---------- member data --------------------------------
52
edm::propagate_const<std::unique_ptr<T>
>
service_
;
53
};
54
}
// namespace serviceregistry
55
}
// namespace edm
56
57
#endif
edm::serviceregistry::ServiceWrapper::get
T & get()
Definition:
ServiceWrapper.h:48
edm::serviceregistry::ServiceWrapper::operator=
const ServiceWrapper & operator=(const ServiceWrapper &)=delete
ServiceWrapperBase.h
ServiceWrapperBase
ActivityRegistry
propagate_const.h
edm
HLT enums.
Definition:
AlignableModifier.h:19
edm::propagate_const
Definition:
propagate_const.h:32
edm::serviceregistry::ServiceWrapper::service_
edm::propagate_const< std::unique_ptr< T > > service_
Definition:
ServiceWrapper.h:52
ParameterSet
Definition:
Functions.h:16
ServiceWrapper
eostools.move
def move(src, dest)
Definition:
eostools.py:511
std
Definition:
JetResolutionObject.h:76
T
long double T
Definition:
Basic3DVectorLD.h:48
edm::serviceregistry::ServiceWrapper::get
T const & get() const
Definition:
ServiceWrapper.h:43
edm::serviceregistry::ServiceWrapper::ServiceWrapper
ServiceWrapper(std::unique_ptr< T > iService)
Definition:
ServiceWrapper.h:38
edm::serviceregistry::ServiceWrapper
Definition:
ServiceRegistry.h:35
Generated for CMSSW Reference Manual by
1.8.16