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 
34  class EDPutToken
35  {
36  friend class ProductRegistryHelper;
37 
38  public:
39  using value_type = unsigned int;
40 
42 
43  template<typename T>
45 
46  // ---------- const member functions ---------------------
47  value_type index() const { return m_value; }
48  bool isUninitialized() const { return m_value == s_uninitializedValue; }
49 
50  private:
51  //for testing
52  friend class TestEDPutToken;
53 
54  static const unsigned int s_uninitializedValue = 0xFFFFFFFF;
55 
56  explicit EDPutToken(unsigned int iValue) : m_value(iValue) { }
57 
58  // ---------- member data --------------------------------
60  };
61 
62  template<typename T>
63  class EDPutTokenT
64  {
65  friend class ProductRegistryHelper;
66  friend class EDPutToken;
67 
68  public:
70 
71 
73 
74  // ---------- const member functions ---------------------
75  value_type index() const { return m_value; }
76  bool isUninitialized() const { return m_value == s_uninitializedValue; }
77 
78  private:
79  //for testing
80  friend class TestEDPutToken;
81 
82  static const unsigned int s_uninitializedValue = 0xFFFFFFFF;
83 
84  explicit EDPutTokenT(unsigned int iValue) : m_value(iValue) { }
85 
86  // ---------- member data --------------------------------
88  };
89 }
90 
91 #endif
EDPutToken::value_type value_type
Definition: EDPutToken.h:69
value_type m_value
Definition: EDPutToken.h:87
value_type index() const
Definition: EDPutToken.h:75
friend class TestEDPutToken
Definition: EDPutToken.h:52
EDPutToken(unsigned int iValue)
Definition: EDPutToken.h:56
EDPutToken(EDPutTokenT< T > iOther)
Definition: EDPutToken.h:44
value_type index() const
Definition: EDPutToken.h:47
bool isUninitialized() const
Definition: EDPutToken.h:48
static const unsigned int s_uninitializedValue
Definition: EDPutToken.h:54
unsigned int value_type
Definition: EDPutToken.h:39
value_type m_value
Definition: EDPutToken.h:59
bool isUninitialized() const
Definition: EDPutToken.h:76
HLT enums.
EDPutTokenT(unsigned int iValue)
Definition: EDPutToken.h:84