/*! * @file STimeBlock.h * @author Nick Ryder, on behalf of the SoLid collaboration. * @date 31 Oct 2016 */ #ifndef __STIMEBLOCK_H__ #define __STIMEBLOCK_H__ #include "SWaveform.h" #include "STriggerRecord.h" /* ! Time block container * * Data from the FPGA is conceptially split into time blocks. * The time blocks are synchronous aross the detector and nominally * 256 samples (6.4 microseconds) in length. * * Trigger decisions are made for each time block. All (zero supressed) * data within a time block is transmitted if a trigger occurs. * * Each front end FPGA sends a trigger record and the waveform * data from all triggered channels associated with a single time block. */ class STimeBlock { public: STimeBlock(uint64_t); ~STimeBlock(); std::vector * waveformblocks() {return &m_waveformblocks;}; std::vector * triggerRecords() { return &m_triggerrecords; }; bool addTriggerRecord(STriggerRecord *); bool addWaveformBlock(SWaveformBlock *); uint64_t timestamp() {return m_timestamp;}; double htime() {return m_htime;}; private: uint64_t m_timestamp, m_blocklen; int m_nblocks; double m_htime; std::vector m_waveformblocks; std::vector m_triggerrecords; }; #endif // __STIMEBLOCK_H__