LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
RunAuxiliary.h
Go to the documentation of this file.
1 #ifndef canvas_Persistency_Provenance_RunAuxiliary_h
2 #define canvas_Persistency_Provenance_RunAuxiliary_h
3 // vim: set sw=2 expandtab :
4 
9 
10 #include <iosfwd>
11 #include <set>
12 
13 // Auxiliary run data that is persistent
14 
15 namespace art {
16 
17  class RunAuxiliary {
18  public:
19  static constexpr BranchType branch_type = InRun;
20 
21  RunAuxiliary();
22 
23  RunAuxiliary(RunID const& theId,
24  Timestamp const& theTime,
25  Timestamp const& theEndTime);
26 
28  Timestamp const& theTime,
29  Timestamp const& theEndTime);
30 
32  Timestamp endTime = {}) const;
33 
34  void write(std::ostream&) const;
35  ProcessHistoryID const& processHistoryID() const noexcept;
37  unsigned rangeSetID() const noexcept;
38  void setRangeSetID(unsigned const id) const;
39 
40  RunID const& id() const noexcept;
41  RunID const& runID() const noexcept;
42  void runID(RunID const&);
43  RunNumber_t run() const noexcept;
44 
45  Timestamp const& beginTime() const noexcept;
46  Timestamp const& endTime() const noexcept;
47 
48  bool mergeAuxiliary(RunAuxiliary const&);
49 
50  private:
53  Timestamp beginTime,
56  unsigned rangeSetID);
57 
58  // most recent process that put a RunProduct into this run
59  // is the last on the list, this defines what "latest" is
61  mutable unsigned rangeSetID_{-1u};
65  };
66 
67  std::ostream& operator<<(std::ostream&, const RunAuxiliary&);
68 
69 } // namespace art
70 
71 #endif /* canvas_Persistency_Provenance_RunAuxiliary_h */
72 
73 // Local Variables:
74 // mode: c++
75 // End:
ProcessHistoryID const & processHistoryID() const noexcept
Definition: RunAuxiliary.cc:52
RunID const & runID() const noexcept
Definition: RunAuxiliary.cc:88
void write(std::ostream &) const
Timestamp const & beginTime() const noexcept
Definition: RunAuxiliary.cc:70
unsigned rangeSetID() const noexcept
Definition: RunAuxiliary.cc:58
bool mergeAuxiliary(RunAuxiliary const &)
std::ostream & operator<<(std::ostream &os, const GroupSelector &gs)
ProcessHistoryID processHistoryID_
Definition: RunAuxiliary.h:60
unsigned rangeSetID_
Definition: RunAuxiliary.h:61
RunNumber_t run() const noexcept
Timestamp const & endTime() const noexcept
Definition: RunAuxiliary.cc:76
BranchType
Definition: BranchType.h:20
Definition: MVAAlg.h:12
void setProcessHistoryID(ProcessHistoryID const &)
Definition: RunAuxiliary.cc:82
Timestamp beginTime_
Definition: RunAuxiliary.h:63
void mergeNewTimestampsIntoThis_(RunAuxiliary const &)
static constexpr BranchType branch_type
Definition: RunAuxiliary.h:19
Timestamp endTime_
Definition: RunAuxiliary.h:64
RunAuxiliary duplicateWith(Timestamp beginTime, Timestamp endTime={}) const
Definition: RunAuxiliary.cc:44
void setRangeSetID(unsigned const id) const
IDNumber_t< Level::Run > RunNumber_t
Definition: IDNumber.h:120