CMS 3D CMS Logo

ESGetTokenGeneric.h
Go to the documentation of this file.
1 #ifndef FWCore_Utilities_ESGetTokenGeneric_h
2 #define FWCore_Utilities_ESGetTokenGeneric_h
3 // -*- C++ -*-
4 //
5 // Package: FWCore/Utilities
6 // Class : ESGetTokenGeneric
7 //
18 #include <limits>
19 
20 namespace edm {
21  class EDConsumerBase;
22  class EventSetup;
23  class EventSetupImpl;
24  namespace eventsetup {
25  class EventSetupRecord;
26  }
27 
28  // A ESGetTokenGeneric is created by calls to 'esConsumes' from an EDM
29  // module.
31  friend class EDConsumerBase;
32  friend class EventSetup;
33  friend class EventSetupImpl;
35 
36  public:
37  constexpr ESGetTokenGeneric() noexcept = default;
38 
39  constexpr ESGetTokenGeneric(ESGetTokenGeneric const&) noexcept = default;
40  constexpr ESGetTokenGeneric(ESGetTokenGeneric&&) noexcept = default;
41 
42  constexpr ESGetTokenGeneric& operator=(ESGetTokenGeneric&&) noexcept = default;
43  constexpr ESGetTokenGeneric& operator=(ESGetTokenGeneric const&) noexcept = default;
44 
45  constexpr unsigned int transitionID() const noexcept { return m_transitionID; }
46  constexpr TypeIDBase const& recordType() const noexcept { return m_recordType; }
47  constexpr bool isInitialized() const noexcept { return transitionID() != std::numeric_limits<unsigned int>::max(); }
48  constexpr ESTokenIndex index() const noexcept { return m_index; }
49  constexpr bool hasValidIndex() const noexcept { return index() != invalidIndex(); }
50  static constexpr ESTokenIndex invalidIndex() noexcept { return ESTokenIndex{std::numeric_limits<int>::max()}; }
51 
52  private:
53  explicit constexpr ESGetTokenGeneric(unsigned int transitionID,
55  TypeIDBase const& recordType) noexcept
57 
61  };
62 
63 } // namespace edm
64 
65 #endif
edm::ESTokenIndex
Definition: ESIndices.h:55
edm::eventsetup::EventSetupRecord
Definition: EventSetupRecord.h:83
edm::ESGetTokenGeneric::transitionID
constexpr unsigned int transitionID() const noexcept
Definition: ESGetTokenGeneric.h:45
edm::EventSetupImpl
Definition: EventSetupImpl.h:48
edm::ESGetTokenGeneric::m_index
ESTokenIndex m_index
Definition: ESGetTokenGeneric.h:60
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::ESGetTokenGeneric::isInitialized
constexpr bool isInitialized() const noexcept
Definition: ESGetTokenGeneric.h:47
edm::ESGetTokenGeneric::invalidIndex
static constexpr ESTokenIndex invalidIndex() noexcept
Definition: ESGetTokenGeneric.h:50
watchdog.const
const
Definition: watchdog.py:83
ESIndices.h
Utilities.operator
operator
Definition: Utilities.py:24
edm::EDConsumerBase
Definition: EDConsumerBase.h:70
edm::ESGetTokenGeneric
Definition: ESGetTokenGeneric.h:30
TypeIDBase.h
edm::ESGetTokenGeneric::m_transitionID
unsigned int m_transitionID
Definition: ESGetTokenGeneric.h:59
writedatasetfile.default
default
Definition: writedatasetfile.py:11
edm::ESGetTokenGeneric::ESGetTokenGeneric
constexpr ESGetTokenGeneric(unsigned int transitionID, ESTokenIndex index, TypeIDBase const &recordType) noexcept
Definition: ESGetTokenGeneric.h:53
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
edm::ESGetTokenGeneric::m_recordType
TypeIDBase m_recordType
Definition: ESGetTokenGeneric.h:58
edm::ESGetTokenGeneric::recordType
constexpr TypeIDBase const & recordType() const noexcept
Definition: ESGetTokenGeneric.h:46
edm::EventSetup
Definition: EventSetup.h:57
edm::ESGetTokenGeneric::index
constexpr ESTokenIndex index() const noexcept
Definition: ESGetTokenGeneric.h:48
edm::ESGetTokenGeneric::ESGetTokenGeneric
constexpr ESGetTokenGeneric() noexcept=default
edm::ESGetTokenGeneric::hasValidIndex
constexpr bool hasValidIndex() const noexcept
Definition: ESGetTokenGeneric.h:49
edm::TypeIDBase
Definition: TypeIDBase.h:29
EventSetup