/*! * @file STriggerRecord.h * @author Nick Ryder, on behalf of the SoLid collaboration. * @date 31 Oct 2016 */ #ifndef __STRIGGERRECORD_H__ #define __STRIGGERRECORD_H__ #include #include /* ! Trigger record container * * The trigger record transmitted from each FPGA for a single * time block contains information of the plane's channels * requested and included in the read out. */ class STriggerRecord { public: STriggerRecord( uint8_t plane, uint64_t timestamp, uint16_t triggermask, std::vector channeltriggers ); void addchannels(uint64_t requestedchans, uint64_t includedchans); uint64_t channelstriggered(int triggertype); std::vector triggers(uint64_t channel); uint8_t plane() {return m_plane;}; uint64_t timestamp(){return m_timestamp;}; private: uint8_t m_plane; uint64_t m_timestamp; double m_htime; /// bitwise OR of all trigger types uint16_t m_triggermask; /// Vector of bitmasks for each trigger type showing which channels triggered. std::vector m_channeltriggers; /// List of channels trigger requested and those included. uint64_t m_requestedchans, m_includedchans; // this actually comes from the data block }; #endif // __STRIGGERRECORD_H__