CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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) {}
24  void write(std::ostream& os) const;
27  RunID const& id() const { return id_; }
28  RunID& id() { return id_; }
29  Timestamp const& beginTime() const { return beginTime_; }
30  Timestamp const& endTime() const { return endTime_; }
31  RunNumber_t run() const { return id_.run(); }
32  void setBeginTime(Timestamp const& time) {
34  beginTime_ = time;
35  }
36  void setEndTime(Timestamp const& time) {
38  endTime_ = time;
39  }
40  void mergeAuxiliary(RunAuxiliary const& aux);
41 
42  private:
43  // This is the ID of the full process history (not the reduced process history).
44  // In cases where Run's are merged, the ID of the first process history encountered
45  // is stored here.
47 
48  // Run ID
50  // Times from DAQ
53 
54  private:
55  void mergeNewTimestampsIntoThis_(RunAuxiliary const& newAux);
56  };
57 
58  inline std::ostream& operator<<(std::ostream& os, const RunAuxiliary& p) {
59  p.write(os);
60  return os;
61  }
62 
63 } // namespace edm
64 
65 #endif
static Timestamp invalidTimestamp()
Definition: Timestamp.h:82
ProcessHistoryID processHistoryID_
Definition: RunAuxiliary.h:46
RunNumber_t run() const
Definition: RunID.h:36
Timestamp const & endTime() const
Definition: RunAuxiliary.h:30
RunID const & id() const
Definition: RunAuxiliary.h:27
Timestamp const & beginTime() const
Definition: RunAuxiliary.h:29
RunAuxiliary(RunID const &theId, Timestamp const &theTime, Timestamp const &theEndTime)
Definition: RunAuxiliary.h:19
Timestamp endTime_
Definition: RunAuxiliary.h:52
RunAuxiliary(RunNumber_t const &run, Timestamp const &theTime, Timestamp const &theEndTime)
Definition: RunAuxiliary.h:21
void mergeNewTimestampsIntoThis_(RunAuxiliary const &newAux)
Definition: RunAuxiliary.cc:20
friend void conversion(RunAux const &, RunAuxiliary &)
void write(std::ostream &os) const
Definition: RunAuxiliary.cc:10
Timestamp beginTime_
Definition: RunAuxiliary.h:51
void mergeAuxiliary(RunAuxiliary const &aux)
Definition: RunAuxiliary.cc:15
ProcessHistoryID const & processHistoryID() const
Definition: RunAuxiliary.h:25
void setEndTime(Timestamp const &time)
Definition: RunAuxiliary.h:36
void setBeginTime(Timestamp const &time)
Definition: RunAuxiliary.h:32
void setProcessHistoryID(ProcessHistoryID const &phid)
Definition: RunAuxiliary.h:26
unsigned int RunNumber_t
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger tbale.
RunNumber_t run() const
Definition: RunAuxiliary.h:31