11 for(
int i = 0; i < 48; i++)
13 m_dataGroup1_One[i] = 0;
14 m_dataGroup1_Zero[i] = 0;
15 m_dataGroup2_One[i] = 0;
16 m_dataGroup2_Zero[i] = 0;
24 if((boardId != 0xd2)&&(boardId != 0xd4)&&(boardId != 0xd6)) std::cerr <<
"ERROR: You set the wrong board data to TrigSAF!!!" << std::endl;
26 uint32_t jBegin = 0, jEnd = 0;
27 if(boardId == 0xd2) { jBegin = 32; jEnd = jBegin+16; }
28 if(boardId == 0xd4) { jBegin = 16; jEnd = jBegin+16; }
29 if(boardId == 0xd6) { jBegin = 0; jEnd = jBegin+16; }
31 for(uint32_t i = 0; i < datasize; i++) {
32 uint32_t dataId = ((data[i] >> 16) & 0xFF);
33 for(uint32_t j = jBegin, mask = 1; j < jEnd; j++, mask <<= 1) {
35 if((data[i] & mask) != 0) {
36 m_dataGroup1_One[j] += 1;
38 if(m_dataGroup1_One[j] == 0) m_dataGroup1_Zero[j] += 1;
41 if((data[i] & mask) != 0) {
42 m_dataGroup2_One[j] += 1;
44 if(m_dataGroup2_One[j] == 0) m_dataGroup2_Zero[j] += 1;
47 if((data[i] & mask) != 0) {
52 if((data[i] & mask) != 0) {
void setSAFTrigData(uint32_t boardId, uint32_t window, uint32_t datasize, const uint32_t *data)