CMS 3D CMS Logo

EDGetToken.h
Go to the documentation of this file.
1 #ifndef FWCore_Utilities_EDGetToken_h
2 #define FWCore_Utilities_EDGetToken_h
3 // -*- C++ -*-
4 //
5 // Package: FWCore/Utilities
6 // Class : EDGetToken
7 //
20 //
21 // Original Author: Chris Jones
22 // Created: Wed, 03 Apr 2013 17:54:11 GMT
23 //
24 
25 // system include files
26 
27 // user include files
28 
29 // forward declarations
30 namespace edm {
31  class EDConsumerBase;
32  template <typename T>
33  class EDGetTokenT;
34 
35  class EDGetToken {
36  friend class EDConsumerBase;
37 
38  public:
40 
41  template <typename T>
43 
44  // ---------- const member functions ---------------------
45  unsigned int index() const { return m_value; }
46  bool isUninitialized() const { return m_value == s_uninitializedValue; }
47 
48  private:
49  //for testing
50  friend class TestEDGetToken;
51 
52  static const unsigned int s_uninitializedValue = 0xFFFFFFFF;
53 
54  explicit EDGetToken(unsigned int iValue) : m_value(iValue) {}
55 
56  // ---------- member data --------------------------------
57  unsigned int m_value;
58  };
59 
60  template <typename T>
61  class EDGetTokenT {
62  friend class EDConsumerBase;
63  friend class EDGetToken;
64 
65  public:
67 
68  // ---------- const member functions ---------------------
69  unsigned int index() const { return m_value; }
70  bool isUninitialized() const { return m_value == s_uninitializedValue; }
71 
72  private:
73  //for testing
74  friend class TestEDGetToken;
75 
76  static const unsigned int s_uninitializedValue = 0xFFFFFFFF;
77 
78  explicit EDGetTokenT(unsigned int iValue) : m_value(iValue) {}
79 
80  // ---------- member data --------------------------------
81  unsigned int m_value;
82  };
83 } // namespace edm
84 
85 #endif
edm::EDGetTokenT::index
unsigned int index() const
Definition: EDGetToken.h:69
edm::EDGetToken::s_uninitializedValue
static const unsigned int s_uninitializedValue
Definition: EDGetToken.h:52
edm::EDGetTokenT
Definition: EDGetToken.h:33
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::EDGetToken::TestEDGetToken
friend class TestEDGetToken
Definition: EDGetToken.h:50
edm::EDConsumerBase
Definition: EDConsumerBase.h:62
edm::EDGetTokenT::s_uninitializedValue
static const unsigned int s_uninitializedValue
Definition: EDGetToken.h:76
edm::EDGetTokenT::isUninitialized
bool isUninitialized() const
Definition: EDGetToken.h:70
edm::EDGetToken::EDGetToken
EDGetToken(unsigned int iValue)
Definition: EDGetToken.h:54
edm::EDGetToken::isUninitialized
bool isUninitialized() const
Definition: EDGetToken.h:46
edm::EDGetToken::m_value
unsigned int m_value
Definition: EDGetToken.h:57
edm::EDGetTokenT::EDGetTokenT
EDGetTokenT()
Definition: EDGetToken.h:66
edm::EDGetToken::index
unsigned int index() const
Definition: EDGetToken.h:45
edm::EDGetToken::EDGetToken
EDGetToken(EDGetTokenT< T > iOther)
Definition: EDGetToken.h:42
edm::EDGetToken::EDGetToken
EDGetToken()
Definition: EDGetToken.h:39
edm::EDGetToken
Definition: EDGetToken.h:35
edm::EDGetTokenT::EDGetTokenT
EDGetTokenT(unsigned int iValue)
Definition: EDGetToken.h:78
edm::EDGetTokenT::m_value
unsigned int m_value
Definition: EDGetToken.h:81
edm::EDGetTokenT::TestEDGetToken
friend class TestEDGetToken
Definition: EDGetToken.h:74