CMS 3D CMS Logo

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  public:
31  explicit RunID(RunNumber_t iRun) : run_(iRun) {}
32 
33  //virtual ~RunID();
34 
35  // ---------- const member functions ---------------------
36  RunNumber_t run() const { return run_; }
37 
38  //moving from one RunID to another one
39  RunID next() const { return RunID(run_ + 1); }
40  RunID previous() const {
41  if (run_ != 0) {
42  return RunID(run_ - 1);
43  }
44  return RunID(0);
45  }
46 
47  bool operator==(RunID const& iRHS) const { return iRHS.run_ == run_; }
48  bool operator!=(RunID const& iRHS) const { return !(*this == iRHS); }
49 
50  bool operator<(RunID const& iRHS) const { return run_ < iRHS.run_; }
51  bool operator<=(RunID const& iRHS) const { return run_ <= iRHS.run_; }
52  bool operator>(RunID const& iRHS) const { return run_ > iRHS.run_; }
53  bool operator>=(RunID const& iRHS) const { return run_ >= iRHS.run_; }
54  // ---------- static functions ---------------------------
55 
56  static RunNumber_t maxRunNumber() { return 0xFFFFFFFFU; }
57 
58  static RunID firstValidRun() { return RunID(1); }
59  // ---------- member functions ---------------------------
60 
61  private:
62  //RunID(RunID const&); // stop default
63 
64  //RunID const& operator=(RunID const&); // stop default
65 
66  // ---------- member data --------------------------------
68  };
69 
70  std::ostream& operator<<(std::ostream& oStream, RunID const& iID);
71 
72 } // namespace edm
73 #endif
edm::RunNumber_t
unsigned int RunNumber_t
Definition: RunLumiEventNumber.h:14
edm::RunID
Definition: RunID.h:28
edm::RunID::run
RunNumber_t run() const
Definition: RunID.h:36
edm
HLT enums.
Definition: AlignableModifier.h:19
RunLumiEventNumber.h
edm::RunID::operator!=
bool operator!=(RunID const &iRHS) const
Definition: RunID.h:48
edm::RunID::RunID
RunID(RunNumber_t iRun)
Definition: RunID.h:31
edm::RunID::operator>=
bool operator>=(RunID const &iRHS) const
Definition: RunID.h:53
edm::invalidRunNumber
const RunNumber_t invalidRunNumber
Definition: RunLumiEventNumber.h:18
edm::operator<<
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger tbale.
Definition: HLTGlobalStatus.h:106
edm::RunID::operator==
bool operator==(RunID const &iRHS) const
Definition: RunID.h:47
edm::RunID::operator>
bool operator>(RunID const &iRHS) const
Definition: RunID.h:52
edm::RunID::RunID
RunID()
Definition: RunID.h:30
edm::RunID::operator<
bool operator<(RunID const &iRHS) const
Definition: RunID.h:50
edm::RunID::operator<=
bool operator<=(RunID const &iRHS) const
Definition: RunID.h:51
edm::RunID::firstValidRun
static RunID firstValidRun()
Definition: RunID.h:58
mitigatedMETSequence_cff.U
U
Definition: mitigatedMETSequence_cff.py:36
edm::RunID::maxRunNumber
static RunNumber_t maxRunNumber()
Definition: RunID.h:56
edm::RunID::next
RunID next() const
Definition: RunID.h:39
edm::RunID::previous
RunID previous() const
Definition: RunID.h:40
edm::RunID::run_
RunNumber_t run_
Definition: RunID.h:67