test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RunID.h
Go to the documentation of this file.
1 #ifndef DataFormats_Provenance_RunID_h
2 #define DataFormats_Provenance_RunID_h
3 // -*- C++ -*-
4 //
5 // Package: DataFormats/Provenance
6 // Class : RunID
7 //
16 //
17 //
18 
19 // system include files
20 #include <iosfwd>
21 
22 // user include files
24 
25 // forward declarations
26 namespace edm {
27 
28 class RunID
29 {
30  public:
31 
33  explicit RunID(RunNumber_t iRun) :
34  run_(iRun) {}
35 
36  //virtual ~RunID();
37 
38  // ---------- const member functions ---------------------
39  RunNumber_t run() const { return run_; }
40 
41  //moving from one RunID to another one
42  RunID next() const {
43  return RunID(run_+1);
44  }
45  RunID previous() const {
46  if(run_ != 0) {
47  return RunID(run_-1);
48  }
49  return RunID(0);
50  }
51 
52  bool operator==(RunID const& iRHS) const {
53  return iRHS.run_ == run_;
54  }
55  bool operator!=(RunID const& iRHS) const {
56  return !(*this == iRHS);
57  }
58 
59  bool operator<(RunID const& iRHS) const {
60  return run_ < iRHS.run_;
61  }
62  bool operator<=(RunID const& iRHS) const {
63  return run_ <= iRHS.run_;
64  }
65  bool operator>(RunID const& iRHS) const {
66  return run_ > iRHS.run_;
67  }
68  bool operator>=(RunID const& iRHS) const {
69  return run_ >= iRHS.run_;
70  }
71  // ---------- static functions ---------------------------
72 
74  return 0xFFFFFFFFU;
75  }
76 
77  static RunID firstValidRun() {
78  return RunID(1);
79  }
80  // ---------- member functions ---------------------------
81 
82  private:
83  //RunID(RunID const&); // stop default
84 
85  //RunID const& operator=(RunID const&); // stop default
86 
87  // ---------- member data --------------------------------
89 };
90 
91 std::ostream& operator<<(std::ostream& oStream, RunID const& iID);
92 
93 }
94 #endif
RunNumber_t run() const
Definition: RunID.h:39
RunNumber_t run_
Definition: RunID.h:88
RunNumber_t const invalidRunNumber
static RunID firstValidRun()
Definition: RunID.h:77
bool operator<(RunID const &iRHS) const
Definition: RunID.h:59
bool operator>(RunID const &iRHS) const
Definition: RunID.h:65
bool operator==(RunID const &iRHS) const
Definition: RunID.h:52
bool operator>=(RunID const &iRHS) const
Definition: RunID.h:68
RunID()
Definition: RunID.h:32
bool operator!=(RunID const &iRHS) const
Definition: RunID.h:55
bool operator<=(RunID const &iRHS) const
Definition: RunID.h:62
RunID next() const
Definition: RunID.h:42
unsigned int RunNumber_t
RunID previous() const
Definition: RunID.h:45
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger tbale.
static RunNumber_t maxRunNumber()
Definition: RunID.h:73
RunID(RunNumber_t iRun)
Definition: RunID.h:33