11 for(
int i = 0; i < 48; i++)
13 m_dataGroup12_One[i] = 0;
14 m_dataGroup12_Zero[i] = 0;
15 m_dataGroup34_One[i] = 0;
16 m_dataGroup34_Zero[i] = 0;
18 m_dataGroup5_One[i] = 0;
19 m_dataGroup5_Zero[i] = 0;
26 if(boardId != 0xD3) std::cerr <<
"ERROR: You set the wrong board data to TrigGTL!!!" << std::endl;
27 if(datasize%window != 0) std::cerr <<
"WARNING: The data in GTL maybe not complete!!!" << std::endl;
29 for(uint32_t i = 0; i < datasize; i++) {
30 uint32_t dataId = ((data[i] >> 24) & 0x7);
31 for(uint32_t j = 0, mask = 1; j < 24; j++, mask <<= 1) {
33 if((data[i] & mask) != 0) {
34 m_dataGroup12_One[j] += 1;
36 if(m_dataGroup12_One[j] == 0) m_dataGroup12_Zero[j] += 1;
39 if((data[i] & mask) != 0) {
40 m_dataGroup12_One[j+24] += 1;
42 if(m_dataGroup12_One[j+24] == 0) m_dataGroup12_Zero[j+24] += 1;
45 if((data[i] & mask) != 0) {
46 m_dataGroup34_One[j] += 1;
48 if(m_dataGroup34_One[j] == 0) m_dataGroup34_Zero[j] += 1;
51 if((data[i] & mask) != 0) {
52 m_dataGroup34_One[j+24] += 1;
54 if(m_dataGroup34_One[j+24] == 0) m_dataGroup34_Zero[j+24] += 1;
57 if((data[i] & mask) != 0) {
58 m_dataGroup5_One[j] += 1;
60 if(m_dataGroup5_One[j] == 0) m_dataGroup5_Zero[j] += 1;
void setGTLTrigData(uint32_t boardId, uint32_t window, uint32_t datasize, const uint32_t *data)