1 #ifndef EUDAQ_INCLUDED_DetectorEvent
2 #define EUDAQ_INCLUDED_DetectorEvent
5 #include "eudaq/TLUEvent.hh"
17 explicit DetectorEvent(
unsigned runnumber,
unsigned eventnumber,
19 :
Event(runnumber, eventnumber, timestamp) {}
25 void AddEvent(std::shared_ptr<Event> &evt);
26 virtual void Print(std::ostream &)
const;
29 virtual std::string
GetType()
const {
return "DetectorEvent"; }
31 size_t NumEvents()
const {
return m_events.size(); }
32 Event *GetEvent(
size_t i) {
return m_events[i].get(); }
33 const Event *GetEvent(
size_t i)
const {
return m_events[i].get(); }
34 std::shared_ptr<Event> GetEventPtr(
size_t i)
const {
return m_events[i]; }
35 const RawDataEvent &GetRawSubEvent(
const std::string &subtype,
37 template <
typename T>
const T *GetSubEvent(
int n = 0)
const {
38 for (
size_t i = 0; i < NumEvents(); i++) {
39 const T *sev =
dynamic_cast<const T *
>(GetEvent(i));
52 std::vector<std::shared_ptr<Event>> m_events;
56 #endif // EUDAQ_INCLUDED_TLUEvent
Definition: Serializer.hh:156
Definition: DetectorEvent.hh:12
Definition: Serializer.hh:19
virtual std::string GetType() const
Return "DetectorEvent" as type.
Definition: DetectorEvent.hh:29