11 #ifndef ARICHRATECALMODULE_H
12 #define ARICHRATECALMODULE_H
14 #include <framework/core/HistoModule.h>
31 class ARICHRateCalModule :
public HistoModule {
62 virtual void event()
override;
68 virtual void endRun()
override;
77 unsigned int calbyte(
const int* buf);
78 unsigned int calword(
const int* buf);
81 TH2* h_rate2D[100] = {NULL};
89 unsigned int m_ibyte = 0;
95 inline unsigned int ARICHRateCalModule::calbyte(
const int* buf)
97 int shift = (3 - m_ibyte % 4) * 8;
98 unsigned int val = 0xff & (buf[m_ibyte / 4] >> shift);
103 inline unsigned int ARICHRateCalModule::calword(
const int* buf)
105 return (calbyte(buf) << 24) | (calbyte(buf) << 16)
106 | (calbyte(buf) << 8) | calbyte(buf);