CMS 3D CMS Logo

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