22 {
23
24 if(boardId != 0xDA) std::cerr << "ERROR: You set the wrong board data to TrigTOFT!!!" << std::endl;
25
26 m_window = window;
27
28 for (uint32_t i = 0; i < datasize; i++) {
29 int winId = int (i/14);
30
31
32 if(i==(1+winId*14)) {
33 for(uint32_t condId = 1,loop = 0; loop < 6; condId <<=1,loop++) {
34 if(data[i] & condId) m_tofTrigCondi[loop][winId] = 1;
35 }
36 }
37
38
39 if(i >= (6+winId*14) && i <= (13+winId*14)) {
40 if(i == (6+winId*14) || i == (10+winId*14)) {
41 for(uint32_t btofId = 1,loop = 0; loop < 16; btofId <<=1,loop++) {
42 if(data[i] & btofId) {
43 if(i == (6+winId*14)) m_btofHitMap[loop+72][winId] = 1;
44 if(i == (10+winId*14)) m_btofHitMap[loop+72+88][winId] = 1;
45 }
46 }
47 }
48 else {
49 for(uint32_t btofId = 1,loop = 0; loop < 24; btofId <<=1,loop++) {
50 if(data[i] & btofId) {
51 if(i >= (7+winId*14) && i <= (9+winId*14)) m_btofHitMap[loop+(9+winId*14-i)*24][winId] = 1;
52 else m_btofHitMap[loop+(13+winId*14-i)*24+88][winId] = 1;
53 }
54 }
55 }
56 }
57
58
59 if(i>=(4+winId*14) && i<=(5+winId*14)) {
60 for(uint32_t eetofId = 1,loop = 0; loop < 24; eetofId <<=1,loop++) {
61 if(data[i] & eetofId) m_eetofHitMap[loop+(5+winId*14-i)*24][winId] = 1;
62 }
63 }
64
65
66 if(i>=(2+winId*14) && i<=(3+winId*14)) {
67 for(uint32_t wetofId = 1,loop = 0; loop < 24; wetofId <<=1,loop++) {
68 if(data[i] & wetofId) m_wetofHitMap[loop+(3+winId*14-i)*24][winId] = 1;
69 }
70 }
71 }
72}