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> class EDPutTokenT;
33  namespace test {
34  class TestProcessorConfig;
35  }
36 
37  class EDPutToken
38  {
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  {
68  friend class ProductRegistryHelper;
69  friend class EDPutToken;
71 
72  public:
74 
75 
76  EDPutTokenT() : m_value{s_uninitializedValue} {}
77 
78  // ---------- const member functions ---------------------
79  value_type index() const { return m_value; }
80  bool isUninitialized() const { return m_value == s_uninitializedValue; }
81 
82  private:
83  //for testing
84  friend class TestEDPutToken;
85 
86  static const unsigned int s_uninitializedValue = 0xFFFFFFFF;
87 
88  explicit EDPutTokenT(unsigned int iValue) : m_value(iValue) { }
89 
90  // ---------- member data --------------------------------
92  };
93 }
94 
95 #endif
EDPutToken::value_type value_type
Definition: EDPutToken.h:73
value_type m_value
Definition: EDPutToken.h:91
value_type index() const
Definition: EDPutToken.h:79
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:80
HLT enums.
EDPutTokenT(unsigned int iValue)
Definition: EDPutToken.h:88