LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
SubRunAuxiliary.h
Go to the documentation of this file.
1 #ifndef canvas_Persistency_Provenance_SubRunAuxiliary_h
2 #define canvas_Persistency_Provenance_SubRunAuxiliary_h
3 
4 #include <iosfwd>
5 
11 
12 // Auxiliary subRun data that is persistent
13 
14 namespace art {
15  class SubRunAuxiliary;
16 }
17 
19 public:
20  static constexpr BranchType branch_type = InSubRun;
21 
22  SubRunAuxiliary() = default;
23 
24  SubRunAuxiliary(SubRunID const& theId,
25  Timestamp const& theTime,
26  Timestamp const& theEndTime)
27  : id_{theId}, beginTime_{theTime}, endTime_{theEndTime}
28  {}
29 
31  SubRunNumber_t const theSubRun,
32  Timestamp const& theTime,
33  Timestamp const& theEndTime)
34  : id_{theRun, theSubRun}, beginTime_{theTime}, endTime_{theEndTime}
35  {}
36 
37  void write(std::ostream& os) const;
38 
39  ProcessHistoryID const&
41  {
42  return processHistoryID_;
43  }
44 
45  void
47  {
48  processHistoryID_ = phid;
49  }
50 
51  SubRunID const&
52  id() const
53  {
54  return id_;
55  }
56  RunID const&
57  runID() const
58  {
59  return id_.runID();
60  }
62  run() const
63  {
64  return id_.run();
65  }
67  subRun() const
68  {
69  return id_.subRun();
70  }
71 
72  Timestamp const&
73  beginTime() const
74  {
75  return beginTime_;
76  }
77 
78  Timestamp const&
79  endTime() const
80  {
81  return endTime_;
82  }
83 
84  void
85  setEndTime(Timestamp const& time)
86  {
88  endTime_ = time;
89  }
90 
91  void
92  setRangeSetID(unsigned const id) const
93  {
94  rangeSetID_ = id;
95  }
96  auto
97  rangeSetID() const
98  {
99  return rangeSetID_;
100  }
101 
102  bool mergeAuxiliary(SubRunAuxiliary const& newAux);
103 
104  // most recent process that processed this subRun
105  // is the last on the list, this defines what "latest" is
107  mutable unsigned rangeSetID_{-1u};
108 
110  // Times from DAQ
113 };
114 
115 inline std::ostream&
116 operator<<(std::ostream& os, art::SubRunAuxiliary const& p)
117 {
118  p.write(os);
119  return os;
120 }
121 
122 #endif /* canvas_Persistency_Provenance_SubRunAuxiliary_h */
123 
124 // Local Variables:
125 // mode: c++
126 // End:
std::ostream & operator<<(std::ostream &os, EDAnalyzer::Table< T > const &t)
Definition: EDAnalyzer.h:184
void write(std::ostream &os) const
SubRunID const & id() const
SubRunAuxiliary(RunNumber_t const theRun, SubRunNumber_t const theSubRun, Timestamp const &theTime, Timestamp const &theEndTime)
Timestamp const & endTime() const
void setProcessHistoryID(ProcessHistoryID const &phid) const
ProcessHistoryID processHistoryID_
RunID const & runID() const
Definition: SubRunID.h:78
ProcessHistoryID const & processHistoryID() const
Timestamp const & beginTime() const
RunNumber_t run() const
Definition: SubRunID.h:84
static constexpr BranchType branch_type
IDNumber_t< Level::SubRun > SubRunNumber_t
Definition: IDNumber.h:118
SubRunNumber_t subRun() const
SubRunAuxiliary()=default
void setRangeSetID(unsigned const id) const
static constexpr Timestamp invalidTimestamp()
Definition: Timestamp.h:83
SubRunAuxiliary(SubRunID const &theId, Timestamp const &theTime, Timestamp const &theEndTime)
BranchType
Definition: BranchType.h:18
HLT enums.
auto rangeSetID() const
void setEndTime(Timestamp const &time)
SubRunNumber_t subRun() const
Definition: SubRunID.h:90
bool mergeAuxiliary(SubRunAuxiliary const &newAux)
RunID const & runID() const
RunNumber_t run() const
IDNumber_t< Level::Run > RunNumber_t
Definition: IDNumber.h:119