Read an event from a DAQ event.
81 evt.
hits.reserve(snapshotHits.size());
83 for(
auto& daqhit : snapshotHits )
87 evt.
hits.push_back( h );
91 for(
auto& daqtrighit: triggeredHits)
93 Hit* g = M[daqtrighit.getModuleID()][daqtrighit.getPMT()][daqtrighit.getT()];
94 if (g) g->
trig = daqtrighit.getTriggerMask ();
97 THROW(
Exception,
"Failed to flag snaphot hit" << (
int) daqtrighit.getPMT() <<
" " << daqtrighit.getT());
JDAQUTCExtended getTimesliceStart() const
Get start of timeslice.
int getDetectorID() const
Get detector identifier.
bool read(Vec &v, std::istream &is)
Read a Vec(tor) from a stream.
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
ULong64_t trigger_counter
trigger counter
int getRunNumber() const
Get run number.
int getFrameIndex() const
Get frame index.
static JTriggerMask_t getTriggerMask(const JDAQTriggeredHit &hit)
Get trigger mask of given hit.
int frame_index
from the raw data
unsigned int overlays
number of overlaying triggered events
const std::vector< T > & getHits() const
Get container with hits.
JUINT32_t getUTC16nanosecondcycles() const
Get time.
int run_id
DAQ run identifier.
JUINT32_t getUTCseconds() const
Get time.
int det_id
detector identifier from DAQ
int trig
non-zero if the hit is a trigger hit.
TTimeStamp t
UTC time of the start of the timeslice the event came from.
double t
hit time (from calibration or MC truth)
int dom_id
module identifier from the data (unique in the detector).
unsigned int channel_id
PMT channel id {0,1, .., 31} local to moduke.
std::vector< Hit > hits
list of hits
JTriggerCounter_t getCounter() const
Get trigger counter.
ULong64_t trigger_mask
trigger mask from raw data (i.e. the trigger bits)