FWCore
Utilities
interface
ESGetToken.h
Go to the documentation of this file.
1
#ifndef FWCore_Utilities_ESGetToken_h
2
#define FWCore_Utilities_ESGetToken_h
3
// -*- C++ -*-
4
//
5
// Package: FWCore/Utilities
6
// Class : ESGetToken
7
//
17
#include "
FWCore/Utilities/interface/ESInputTag.h
"
18
#include "
FWCore/Utilities/interface/ESIndices.h
"
19
#include <limits>
20
21
namespace
edm
{
22
class
EDConsumerBase;
23
class
ESProducer
;
24
class
ESConsumesCollector;
25
class
EventSetup
;
26
class
EventSetupImpl;
27
namespace
eventsetup {
28
class
EventSetupRecord;
29
}
30
31
// A ESGetToken is created by calls to 'esConsumes' from an EDM
32
// module.
33
template
<
typename
ESProduct,
typename
ESRecord>
34
class
ESGetToken
{
35
friend
class
EDConsumerBase
;
36
friend
class
ESProducer
;
37
friend
class
ESConsumesCollector
;
38
friend
class
EventSetup
;
39
friend
class
EventSetupImpl
;
40
friend
class
eventsetup::EventSetupRecord
;
41
42
public
:
43
constexpr
ESGetToken
() noexcept =
default
;
44
45
constexpr
ESGetToken
(
ESGetToken
<ESProduct, ESRecord>
const
&) noexcept =
default
;
46
constexpr
ESGetToken
(
ESGetToken
<ESProduct, ESRecord>&&) noexcept =
default
;
47
48
constexpr
ESGetToken
<ESProduct, ESRecord>&
operator
=(
ESGetToken
<ESProduct, ESRecord>&&) noexcept =
default
;
49
constexpr
ESGetToken
<ESProduct, ESRecord>&
operator
=(
ESGetToken
<ESProduct, ESRecord>
const
&) noexcept =
default
;
50
51
constexpr
unsigned
int
transitionID
()
const
noexcept {
return
m_transitionID
; }
52
constexpr
bool
isInitialized
()
const
noexcept {
return
transitionID
() !=
std::numeric_limits<unsigned int>::max
(); }
53
constexpr
ESTokenIndex
index
()
const
noexcept {
return
m_index
; }
54
constexpr
bool
hasValidIndex
()
const
noexcept {
return
index
() !=
invalidIndex
(); }
55
static
constexpr
ESTokenIndex
invalidIndex
() noexcept {
return
ESTokenIndex
{
std::numeric_limits<int>::max
()}; }
56
57
private
:
58
explicit
constexpr
ESGetToken
(
unsigned
int
transitionID
,
ESTokenIndex
index
,
char
const
*
label
) noexcept
59
:
m_label
{
label
},
m_transitionID
{
transitionID
},
m_index
{
index
} {}
60
61
constexpr
char
const
*
name
()
const
noexcept {
return
m_label
; }
62
char
const
*
m_label
{
nullptr
};
63
unsigned
int
m_transitionID
{
std::numeric_limits<unsigned int>::max
()};
64
ESTokenIndex
m_index
{
std::numeric_limits<int>::max
()};
65
};
66
67
}
// namespace edm
68
69
#endif
edm::ESGetToken::name
constexpr char const * name() const noexcept
Definition:
ESGetToken.h:61
edm::ESTokenIndex
Definition:
ESIndices.h:54
mixOne_cfi.ESProducer
ESProducer
Definition:
mixOne_cfi.py:33
edm::ESGetToken::index
constexpr ESTokenIndex index() const noexcept
Definition:
ESGetToken.h:53
edm::eventsetup::EventSetupRecord
Definition:
EventSetupRecord.h:82
edm::ESGetToken::m_index
ESTokenIndex m_index
Definition:
ESGetToken.h:64
edm::ESConsumesCollector
Definition:
ESConsumesCollector.h:58
edm::EventSetupImpl
Definition:
EventSetupImpl.h:44
edm
HLT enums.
Definition:
AlignableModifier.h:19
edm::ESGetToken::ESGetToken
constexpr ESGetToken() noexcept=default
watchdog.const
const
Definition:
watchdog.py:83
ESIndices.h
Utilities.operator
operator
Definition:
Utilities.py:24
edm::ESGetToken::isInitialized
constexpr bool isInitialized() const noexcept
Definition:
ESGetToken.h:52
edm::ESGetToken::hasValidIndex
constexpr bool hasValidIndex() const noexcept
Definition:
ESGetToken.h:54
edm::ESGetToken::invalidIndex
static constexpr ESTokenIndex invalidIndex() noexcept
Definition:
ESGetToken.h:55
edm::EDConsumerBase
Definition:
EDConsumerBase.h:62
edm::ESGetToken::m_transitionID
unsigned int m_transitionID
Definition:
ESGetToken.h:63
edm::ESGetToken::ESGetToken
constexpr ESGetToken(unsigned int transitionID, ESTokenIndex index, char const *label) noexcept
Definition:
ESGetToken.h:58
edm::ESGetToken::transitionID
constexpr unsigned int transitionID() const noexcept
Definition:
ESGetToken.h:51
writedatasetfile.default
default
Definition:
writedatasetfile.py:11
SiStripPI::max
Definition:
SiStripPayloadInspectorHelper.h:169
edm::EventSetup
Definition:
EventSetup.h:57
ESGetToken
edm::ESGetToken
Definition:
EventSetup.h:48
ESInputTag.h
edm::ESGetToken::m_label
char const * m_label
Definition:
ESGetToken.h:62
edm::ESProducer
Definition:
ESProducer.h:101
EventSetup
label
const char * label
Definition:
PFTauDecayModeTools.cc:11
Generated for CMSSW Reference Manual by
1.8.16