CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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> class EDGetTokenT;
33 
34  class EDGetToken
35  {
36  friend class EDConsumerBase;
37 
38  public:
39 
41 
42  template<typename T>
44 
45  // ---------- const member functions ---------------------
46  unsigned int index() const { return m_value; }
47  bool isUninitialized() const { return m_value == s_uninitializedValue; }
48 
49  private:
50 
51  static const unsigned int s_uninitializedValue = 0xFFFFFFFF;
52 
53  explicit EDGetToken(unsigned int iValue) : m_value(iValue) { }
54 
55  // ---------- member data --------------------------------
56  unsigned int m_value;
57  };
58 
59  template<typename T>
60  class EDGetTokenT
61  {
62  friend class EDConsumerBase;
63  friend class EDGetToken;
64 
65  public:
66 
68 
69  // ---------- const member functions ---------------------
70  unsigned int index() const { return m_value; }
71  bool isUninitialized() const { return m_value == s_uninitializedValue; }
72 
73  private:
74 
75  static const unsigned int s_uninitializedValue = 0xFFFFFFFF;
76 
77  explicit EDGetTokenT(unsigned int iValue) : m_value(iValue) { }
78 
79  // ---------- member data --------------------------------
80  unsigned int m_value;
81  };
82 }
83 
84 #endif
static const unsigned int s_uninitializedValue
Definition: EDGetToken.h:51
unsigned int index() const
Definition: EDGetToken.h:70
EDGetToken(unsigned int iValue)
Definition: EDGetToken.h:53
static const unsigned int s_uninitializedValue
Definition: EDGetToken.h:75
EDGetTokenT(unsigned int iValue)
Definition: EDGetToken.h:77
bool isUninitialized() const
Definition: EDGetToken.h:47
unsigned int m_value
Definition: EDGetToken.h:56
EDGetToken(EDGetTokenT< T > iOther)
Definition: EDGetToken.h:43
unsigned int m_value
Definition: EDGetToken.h:80
bool isUninitialized() const
Definition: EDGetToken.h:71
unsigned int index() const
Definition: EDGetToken.h:46