CMS 3D CMS Logo

RunAuxiliary.h
Go to the documentation of this file.
1 #ifndef DataFormats_Provenance_RunAuxiliary_h
2 #define DataFormats_Provenance_RunAuxiliary_h
3 
4 #include <iosfwd>
5 #include <set>
6 
10 
11 // Auxiliary run data that is persistent
12 
13 namespace edm {
14  class RunAux;
15  class RunAuxiliary {
16  public:
17  friend void conversion(RunAux const&, RunAuxiliary&);
19  RunAuxiliary(RunID const& theId, Timestamp const& theTime, Timestamp const& theEndTime)
20  : processHistoryID_(), id_(theId), beginTime_(theTime), endTime_(theEndTime) {}
21  RunAuxiliary(RunNumber_t const& run, Timestamp const& theTime, Timestamp const& theEndTime)
22  : processHistoryID_(), id_(run), beginTime_(theTime), endTime_(theEndTime) {}
23  void write(std::ostream& os) const;
26  RunID const& id() const { return id_; }
27  RunID& id() { return id_; }
28  Timestamp const& beginTime() const { return beginTime_; }
29  Timestamp const& endTime() const { return endTime_; }
30  RunNumber_t run() const { return id_.run(); }
31  void setBeginTime(Timestamp const& time) {
33  beginTime_ = time;
34  }
35  void setEndTime(Timestamp const& time) {
37  endTime_ = time;
38  }
39  void mergeAuxiliary(RunAuxiliary const& aux);
40 
41  private:
42  // This is the ID of the full process history (not the reduced process history).
43  // In cases where Run's are merged, the ID of the first process history encountered
44  // is stored here.
46 
48  // Times from DAQ
51 
52  private:
53  void mergeNewTimestampsIntoThis_(RunAuxiliary const& newAux);
54  };
55 
56  inline std::ostream& operator<<(std::ostream& os, const RunAuxiliary& p) {
57  p.write(os);
58  return os;
59  }
60 
61 } // namespace edm
62 
63 #endif
static Timestamp invalidTimestamp()
Definition: Timestamp.h:75
ProcessHistoryID processHistoryID_
Definition: RunAuxiliary.h:45
ProcessHistoryID const & processHistoryID() const
Definition: RunAuxiliary.h:24
RunNumber_t run() const
Definition: RunAuxiliary.h:30
void write(std::ostream &os) const
Definition: RunAuxiliary.cc:10
Timestamp const & endTime() const
Definition: RunAuxiliary.h:29
RunAuxiliary(RunID const &theId, Timestamp const &theTime, Timestamp const &theEndTime)
Definition: RunAuxiliary.h:19
Timestamp endTime_
Definition: RunAuxiliary.h:50
RunAuxiliary(RunNumber_t const &run, Timestamp const &theTime, Timestamp const &theEndTime)
Definition: RunAuxiliary.h:21
void mergeNewTimestampsIntoThis_(RunAuxiliary const &newAux)
Definition: RunAuxiliary.cc:20
RunID const & id() const
Definition: RunAuxiliary.h:26
friend void conversion(RunAux const &, RunAuxiliary &)
Definition: RunAux.cc:11
Timestamp const & beginTime() const
Definition: RunAuxiliary.h:28
Timestamp beginTime_
Definition: RunAuxiliary.h:49
void mergeAuxiliary(RunAuxiliary const &aux)
Definition: RunAuxiliary.cc:15
HLT enums.
void setEndTime(Timestamp const &time)
Definition: RunAuxiliary.h:35
void setBeginTime(Timestamp const &time)
Definition: RunAuxiliary.h:31
void setProcessHistoryID(ProcessHistoryID const &phid)
Definition: RunAuxiliary.h:25
unsigned int RunNumber_t
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger table.
RunNumber_t run() const
Definition: RunID.h:26