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
23 
24 // forward declarations
25 namespace edm {
26 
27  typedef unsigned int RunNumber_t;
28 
29 
30 class RunID
31 {
32 
33  public:
34 
35 
36  RunID() : run_(0) {}
37  explicit RunID(RunNumber_t iRun) :
38  run_(iRun) {}
39 
40  //virtual ~RunID();
41 
42  // ---------- const member functions ---------------------
43  RunNumber_t run() const { return run_; }
44 
45  //moving from one RunID to another one
46  RunID next() const {
47  return RunID(run_+1);
48  }
49  RunID previous() const {
50  if(run_ != 0) {
51  return RunID(run_-1);
52  }
53  return RunID(0);
54  }
55 
56  bool operator==(RunID const& iRHS) const {
57  return iRHS.run_ == run_;
58  }
59  bool operator!=(RunID const& iRHS) const {
60  return !(*this == iRHS);
61  }
62 
63  bool operator<(RunID const& iRHS) const {
64  return run_ < iRHS.run_;
65  }
66  bool operator<=(RunID const& iRHS) const {
67  return run_ <= iRHS.run_;
68  }
69  bool operator>(RunID const& iRHS) const {
70  return run_ > iRHS.run_;
71  }
72  bool operator>=(RunID const& iRHS) const {
73  return run_ >= iRHS.run_;
74  }
75  // ---------- static functions ---------------------------
76 
78  return 0xFFFFFFFFU;
79  }
80 
81  static RunID firstValidRun() {
82  return RunID(1);
83  }
84  // ---------- member functions ---------------------------
85 
86  private:
87  //RunID(RunID const&); // stop default
88 
89  //RunID const& operator=(RunID const&); // stop default
90 
91  // ---------- member data --------------------------------
93 };
94 
95 std::ostream& operator<<(std::ostream& oStream, RunID const& iID);
96 
97 }
98 #endif
RunNumber_t run() const
Definition: RunID.h:43
RunNumber_t run_
Definition: RunID.h:92
static RunID firstValidRun()
Definition: RunID.h:81
bool operator<(RunID const &iRHS) const
Definition: RunID.h:63
bool operator>(RunID const &iRHS) const
Definition: RunID.h:69
bool operator==(RunID const &iRHS) const
Definition: RunID.h:56
bool operator>=(RunID const &iRHS) const
Definition: RunID.h:72
RunID()
Definition: RunID.h:36
bool operator!=(RunID const &iRHS) const
Definition: RunID.h:59
bool operator<=(RunID const &iRHS) const
Definition: RunID.h:66
RunID next() const
Definition: RunID.h:46
unsigned int RunNumber_t
Definition: EventRange.h:32
RunID previous() const
Definition: RunID.h:49
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger tbale.
static RunNumber_t maxRunNumber()
Definition: RunID.h:77
RunID(RunNumber_t iRun)
Definition: RunID.h:37