22 {
23
24 if((boardId != 0xd2)&&(boardId != 0xd4)&&(boardId != 0xd6)) std::cerr << "ERROR: You set the wrong board data to TrigSAF!!!" << std::endl;
25
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; }
30
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) {
34 if(dataId == 1) {
35 if((data[i] & mask) != 0) {
36 m_dataGroup1_One[j] += 1;
37 }
38 if(m_dataGroup1_One[j] == 0) m_dataGroup1_Zero[j] += 1;
39 }
40 if(dataId == 2) {
41 if((data[i] & mask) != 0) {
42 m_dataGroup2_One[j] += 1;
43 }
44 if(m_dataGroup2_One[j] == 0) m_dataGroup2_Zero[j] += 1;
45 }
46 if(dataId == 3) {
47 if((data[i] & mask) != 0) {
48 m_dataGroup3[j] = 1;
49 }
50 }
51 if(dataId == 4) {
52 if((data[i] & mask) != 0) {
53 m_dataGroup4[j] = 1;
54 }
55 }
56 }
57 }
58}