EventAuxiliary.cc
Go to the documentation of this file.
2 // vim: set sw=2 expandtab :
3 
4 #include <ostream>
5 
6 using namespace std;
7 
8 namespace art {
9 
10  EventAuxiliary::~EventAuxiliary() = default;
11  EventAuxiliary::EventAuxiliary() = default;
12 
13  EventAuxiliary::EventAuxiliary(EventID const& theId,
14  Timestamp const& theTime,
15  bool isReal,
16  ExperimentType eType /*= Any*/)
17  : id_{theId}, time_{theTime}, isRealData_{isReal}, experimentType_{eType}
18  {}
19 
22 
25 
26  Timestamp const&
28  {
29  return time_;
30  }
31 
32  EventID const&
34  {
35  return id_;
36  }
37 
38  EventID const&
40  {
41  return id();
42  }
43 
44  RunID const&
46  {
47  return id_.runID();
48  }
49 
50  SubRunID const&
52  {
53  return id_.subRunID();
54  }
55 
58  {
59  return id_.run();
60  }
61 
64  {
65  return id_.subRun();
66  }
67 
70  {
71  return id_.event();
72  }
73 
74  bool
76  {
77  return isRealData_;
78  }
79 
82  {
83  return experimentType_;
84  }
85 
86  bool
88  {
89  return (id_ == other.id_) && (time_ == other.time_) &&
90  (isRealData_ == other.isRealData_) &&
91  (experimentType_ == other.experimentType_);
92  }
93 
94  void
95  EventAuxiliary::write(ostream& os) const
96  {
97  os << id_ << endl;
98  }
99 
100  ostream&
101  operator<<(ostream& os, const EventAuxiliary& p)
102  {
103  p.write(os);
104  return os;
105  }
106 
107 } // namespace art
RunID const & runID() const
Definition: EventID.h:92
SubRunNumber_t subRun() const noexcept
SubRunID const & subRunID() const
Definition: EventID.h:104
EventID const & eventID() const noexcept
EventNumber_t event() const noexcept
SubRunID const & subRunID() const noexcept
bool operator==(EventAuxiliary const &other) const noexcept
STL namespace.
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
EventAuxiliary & operator=(EventAuxiliary const &)
IDNumber_t< Level::SubRun > SubRunNumber_t
Definition: IDNumber.h:119
p
Definition: test.py:223
RunID const & runID() const noexcept
IDNumber_t< Level::Event > EventNumber_t
Definition: IDNumber.h:118
ExperimentType experimentType_
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
QTextStream & endl(QTextStream &s)
IDNumber_t< Level::Run > RunNumber_t
Definition: IDNumber.h:120