CMS 3D CMS Logo

RunIndex.h
Go to the documentation of this file.
1 #ifndef FWCore_Utilities_RunIndex_h
2 #define FWCore_Utilities_RunIndex_h
3 // -*- C++ -*-
4 //
5 // Package: FWCore/Utilities
6 // Class : edm::RunIndex
7 //
19 //
20 // Original Author: Chris Jones
21 // Created: Fri, 26 Apr 2013 19:38:56 GMT
22 //
23 
24 // system include files
25 
26 // user include files
27 
28 // forward declarations
29 namespace edm {
30  class RunPrincipal;
31 
32  class RunIndex {
33  public:
34  ~RunIndex() = default;
35  RunIndex(const RunIndex&) = default;
36  RunIndex& operator=(const RunIndex&) = default;
37 
38  // ---------- const member functions ---------------------
39  bool operator==(const RunIndex& iIndex) const { return value() == iIndex.value(); }
40  operator unsigned int() const { return value_; }
41 
44  unsigned int value() const { return value_; }
45 
46  static RunIndex invalidRunIndex();
47 
48  private:
50  friend class RunPrincipal;
51  explicit RunIndex(unsigned int iIndex) : value_(iIndex) {}
52 
53  RunIndex() = delete;
54 
55  // ---------- member data --------------------------------
56  unsigned int value_;
57 
58  static const unsigned int invalidValue_;
59  };
60 } // namespace edm
61 
62 #endif
unsigned int value() const
Definition: RunIndex.h:44
~RunIndex()=default
static RunIndex invalidRunIndex()
Definition: RunIndex.cc:9
RunIndex()=delete
RunIndex(unsigned int iIndex)
Definition: RunIndex.h:51
bool operator==(const RunIndex &iIndex) const
Definition: RunIndex.h:39
static const unsigned int invalidValue_
Definition: RunIndex.h:58
HLT enums.
unsigned int value_
Definition: RunIndex.h:56
RunIndex & operator=(const RunIndex &)=default