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  //for testing
51  friend class TestEDGetToken;
52 
53  static const unsigned int s_uninitializedValue = 0xFFFFFFFF;
54 
55  explicit EDGetToken(unsigned int iValue) : m_value(iValue) { }
56 
57  // ---------- member data --------------------------------
58  unsigned int m_value;
59  };
60 
61  template<typename T>
62  class EDGetTokenT
63  {
64  friend class EDConsumerBase;
65  friend class EDGetToken;
66 
67  public:
68 
70 
71  // ---------- const member functions ---------------------
72  unsigned int index() const { return m_value; }
73  bool isUninitialized() const { return m_value == s_uninitializedValue; }
74 
75  private:
76  //for testing
77  friend class TestEDGetToken;
78 
79  static const unsigned int s_uninitializedValue = 0xFFFFFFFF;
80 
81  explicit EDGetTokenT(unsigned int iValue) : m_value(iValue) { }
82 
83  // ---------- member data --------------------------------
84  unsigned int m_value;
85  };
86 }
87 
88 #endif
static const unsigned int s_uninitializedValue
Definition: EDGetToken.h:53
unsigned int index() const
Definition: EDGetToken.h:72
friend class TestEDGetToken
Definition: EDGetToken.h:51
EDGetToken(unsigned int iValue)
Definition: EDGetToken.h:55
static const unsigned int s_uninitializedValue
Definition: EDGetToken.h:79
EDGetTokenT(unsigned int iValue)
Definition: EDGetToken.h:81
bool isUninitialized() const
Definition: EDGetToken.h:47
unsigned int m_value
Definition: EDGetToken.h:58
EDGetToken(EDGetTokenT< T > iOther)
Definition: EDGetToken.h:43
unsigned int m_value
Definition: EDGetToken.h:84
friend class TestEDGetToken
Definition: EDGetToken.h:77
bool isUninitialized() const
Definition: EDGetToken.h:73
unsigned int index() const
Definition: EDGetToken.h:46