LDMX Software
EventSummary.cxx
1
3
4#include <iostream>
5
6ClassImp(ldmx::EventSummary);
7
8namespace ldmx {
9const std::string EventSummary::BRANCH = "EventSummary";
10
11void EventSummary::clear(Option_t*) {
12 event_number_ = 0;
13 timestamp_ns_ = 0;
14 nsystems_ = 0;
15 system_ids_.clear();
16 payload_size_ = 0;
17 error_flags_ = 0;
18}
19
20std::ostream& operator<<(std::ostream& o, const EventSummary& c) {
21 return o << "EventSummary { " << "eventNumber: " << c.getEventNumber()
22 << ", timestamp: " << c.getTimestampNs() << " ns"
23 << ", nSystems: " << c.getNSystems()
24 << ", payloadSize: " << c.getPayloadSize() << " bytes"
25 << ", errorFlags: 0x" << std::hex << c.getErrorFlags() << std::dec
26 << " }";
27}
28
29} // namespace ldmx
Class that provides a summary of event assembly with metadata and error flags.
Provides summary information about an assembled event, including error flags for data quality assessm...
uint32_t nsystems_
Number of subsystems that contributed to this event.
uint64_t getTimestampNs() const
Get the timestamp in nanoseconds.
uint32_t error_flags_
Error flags bitmask.
void clear(Option_t *o="")
Clear information from this object.
static const std::string BRANCH
Name of EventSummary branch.
uint64_t getPayloadSize() const
Get the total payload size in bytes.
uint64_t event_number_
The event number.
std::vector< uint64_t > system_ids_
List of subsystem IDs that participated in this event.
uint32_t getErrorFlags() const
Get the error flags for this event.
uint64_t timestamp_ns_
The event timestamp in nanoseconds.
uint64_t getEventNumber() const
Get the event number.
uint32_t getNSystems() const
Get the number of systems in this event.
uint64_t payload_size_
Total payload size in bytes.