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
static const unsigned int s_uninitializedValue
Definition: EDGetToken.h:52
unsigned int index() const
Definition: EDGetToken.h:69
friend class TestEDGetToken
Definition: EDGetToken.h:50
EDGetToken(unsigned int iValue)
Definition: EDGetToken.h:54
EDGetTokenT(unsigned int iValue)
Definition: EDGetToken.h:78
bool isUninitialized() const
Definition: EDGetToken.h:46
unsigned int m_value
Definition: EDGetToken.h:57
EDGetToken(EDGetTokenT< T > iOther)
Definition: EDGetToken.h:42
unsigned int m_value
Definition: EDGetToken.h:81
HLT enums.
bool isUninitialized() const
Definition: EDGetToken.h:70
unsigned int index() const
Definition: EDGetToken.h:45