LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
EventAuxiliary.cc
Go to the documentation of this file.
2 // vim: set sw=2 expandtab :
3 
4 #include <ostream>
5 
6 namespace art {
7 
9 
11  Timestamp const& theTime,
12  bool isReal,
13  ExperimentType eType /*= Any*/,
14  ProcessHistoryID const& phid /*= {}*/)
15  : processHistoryID_{phid}
16  , id_{theId}
17  , time_{theTime}
18  , isRealData_{isReal}
19  , experimentType_{eType}
20  {}
21 
22  Timestamp const&
23  EventAuxiliary::time() const noexcept
24  {
25  return time_;
26  }
27 
28  EventID const&
29  EventAuxiliary::id() const noexcept
30  {
31  return id_;
32  }
33 
34  EventID const&
35  EventAuxiliary::eventID() const noexcept
36  {
37  return id();
38  }
39 
40  RunID const&
41  EventAuxiliary::runID() const noexcept
42  {
43  return id_.runID();
44  }
45 
46  SubRunID const&
47  EventAuxiliary::subRunID() const noexcept
48  {
49  return id_.subRunID();
50  }
51 
53  EventAuxiliary::run() const noexcept
54  {
55  return id_.run();
56  }
57 
59  EventAuxiliary::subRun() const noexcept
60  {
61  return id_.subRun();
62  }
63 
65  EventAuxiliary::event() const noexcept
66  {
67  return id_.event();
68  }
69 
70  bool
71  EventAuxiliary::isRealData() const noexcept
72  {
73  return isRealData_;
74  }
75 
78  {
79  return experimentType_;
80  }
81 
82  bool
84  {
85  return (id_ == other.id_) && (time_ == other.time_) &&
86  (isRealData_ == other.isRealData_) &&
87  (experimentType_ == other.experimentType_);
88  }
89 
90  void
91  EventAuxiliary::write(std::ostream& os) const
92  {
93  os << id_ << '\n';
94  }
95 
96  ProcessHistoryID const&
98  {
99  return processHistoryID_;
100  }
101 
102  void
104  {
105  processHistoryID_ = phid;
106  }
107 
108  std::ostream&
109  operator<<(std::ostream& os, EventAuxiliary const& p)
110  {
111  p.write(os);
112  return os;
113  }
114 
115 } // namespace art
ProcessHistoryID const & processHistoryID() const noexcept
RunID const & runID() const
Definition: EventID.h:92
SubRunNumber_t subRun() const noexcept
SubRunID const & subRunID() const
Definition: EventID.h:104
void setProcessHistoryID(ProcessHistoryID const &)
EventID const & eventID() const noexcept
EventNumber_t event() const noexcept
SubRunID const & subRunID() const noexcept
bool operator==(EventAuxiliary const &other) const noexcept
RunNumber_t run() const
Definition: EventID.h:98
EventAuxiliary::ExperimentType experimentType() const noexcept
RunNumber_t run() const noexcept
std::ostream & operator<<(std::ostream &os, const GroupSelector &gs)
void write(std::ostream &os) const
IDNumber_t< Level::SubRun > SubRunNumber_t
Definition: IDNumber.h:119
RunID const & runID() const noexcept
ProcessHistoryID processHistoryID_
IDNumber_t< Level::Event > EventNumber_t
Definition: IDNumber.h:118
ExperimentType experimentType_
Definition: MVAAlg.h:12
EventNumber_t event() const
Definition: EventID.h:116
bool isRealData() const noexcept
SubRunNumber_t subRun() const
Definition: EventID.h:110
EventID const & id() const noexcept
Timestamp const & time() const noexcept
IDNumber_t< Level::Run > RunNumber_t
Definition: IDNumber.h:120