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 
19  public: // TYPES
20  static constexpr BranchType branch_type = InRun;
21 
22  public: // MEMBER FUNCTIONS -- Special Member Functions
23  ~RunAuxiliary();
24 
25  RunAuxiliary();
26 
27  RunAuxiliary(RunID const& theId,
28  Timestamp const& theTime,
29  Timestamp const& theEndTime);
30 
32  Timestamp const& theTime,
33  Timestamp const& theEndTime);
34 
35  RunAuxiliary(RunAuxiliary const&);
36 
38 
40 
42 
43  public:
44  void write(std::ostream&) const;
45 
47 
49 
50  unsigned rangeSetID() const noexcept;
51 
52  void setRangeSetID(unsigned const id) const;
53 
54  RunID const& id() const noexcept;
55 
56  RunID const& runID() const noexcept;
57 
58  void runID(RunID const&);
59 
60  RunNumber_t run() const noexcept;
61 
62  Timestamp const& beginTime() const noexcept;
63 
64  void beginTime(Timestamp const&);
65 
66  Timestamp const& endTime() const noexcept;
67 
68  void endTime(Timestamp const&);
69 
70  bool mergeAuxiliary(RunAuxiliary const&);
71 
72  private:
75 
76  // most recent process that put a RunProduct into this run
77  // is the last on the list, this defines what "latest" is
79 
80  // allEventsProcessHistories_ contains all the ProcessHistoryIDs for all
81  // events in this run seen so far.
82  // Note: The default ctor for set is not noexcept.
83  std::set<ProcessHistoryID> allEventsProcessHistories_{};
84 
85  mutable unsigned rangeSetID_{-1u};
89  };
90 
91  std::ostream& operator<<(std::ostream&, const RunAuxiliary&);
92 
93 } // namespace art
94 
95 #endif /* canvas_Persistency_Provenance_RunAuxiliary_h */
96 
97 // Local Variables:
98 // mode: c++
99 // End:
RunID const & runID() const noexcept
void write(std::ostream &) const
Timestamp const & beginTime() const noexcept
Definition: RunAuxiliary.cc:85
unsigned rangeSetID() const noexcept
Definition: RunAuxiliary.cc:73
bool mergeAuxiliary(RunAuxiliary const &)
std::ostream & operator<<(std::ostream &os, const GroupSelector &gs)
RunAuxiliary & operator=(RunAuxiliary const &)
ProcessHistoryID processHistoryID_
Definition: RunAuxiliary.h:78
void setProcessHistoryID(ProcessHistoryID const &) const
Definition: RunAuxiliary.cc:97
unsigned rangeSetID_
Definition: RunAuxiliary.h:85
RunNumber_t run() const noexcept
Timestamp const & endTime() const noexcept
Definition: RunAuxiliary.cc:91
ProcessHistoryID & processHistoryID() const noexcept
Definition: RunAuxiliary.cc:67
BranchType
Definition: BranchType.h:20
Timestamp beginTime_
Definition: RunAuxiliary.h:87
void mergeNewTimestampsIntoThis_(RunAuxiliary const &)
std::set< ProcessHistoryID > allEventsProcessHistories_
Definition: RunAuxiliary.h:83
static constexpr BranchType branch_type
Definition: RunAuxiliary.h:20
void mergeNewProcessHistoryIntoThis_(RunAuxiliary const &)
Timestamp endTime_
Definition: RunAuxiliary.h:88
void setRangeSetID(unsigned const id) const
IDNumber_t< Level::Run > RunNumber_t
Definition: IDNumber.h:120