#ifndef GET4_MBSPROCESSOR_H #define GET4_MBSPROCESSOR_H #include "base/StreamProc.h" namespace get4 { enum { NumGet4Channels = 4, FineCounterBins = 0x80 }; double BinWidthPs() { return 50.; } struct Get4MbsChRec { base::H1handle fRisFineTm{nullptr}; ///< histograms of rising stamp for each channel base::H1handle fRisCal{nullptr}; ///< calibration of rising edge base::H1handle fFalFineTm{nullptr}; ///< histograms of falling stamp for each channel base::H1handle fFalCal{nullptr}; ///< calibration of falling edge base::H1handle fTotTm{nullptr}; ///< histograms of time-over threshold for each channel double firstr; double firstf; double lastr; double lastf; long rising_stat[FineCounterBins]; double rising_calibr[FineCounterBins]; long falling_stat[FineCounterBins]; double falling_calibr[FineCounterBins]; void clearTimes() { firstr = 0.; firstf = 0.; lastr = 0.; lastf = 0.; } double gettm(bool r, bool first = true) { return r ? (first ? firstr : lastr) : (first ? firstf : lastf); } void init() { fRisFineTm = nullptr; fRisCal = nullptr; fFalFineTm = nullptr; fFalCal = nullptr; fTotTm = nullptr; clearTimes(); for (unsigned i=0;i GET4; /// fRef; ///