Changeset 12452 for trunk/FACT++
- Timestamp:
- 11/08/11 14:19:29 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/EventBuilder.c
r12451 r12452 1194 1194 1195 1195 /* //we have a complete buffer, copy to WORK area 1196 int jr; 1196 int jr, kr; 1197 int checkRoi; 1197 1198 roi[0] = ntohs (rd[i].rBuf->S[head_len / 2 + 2]); 1199 for (kr = 1; kr < 4; kr++) 1200 { 1201 checkRoi = ntohs(rd[i].rBuf->S[head_len/ 2 + 1202 + kr*(roi[jr-1]+4)]); 1203 if (checkRoi != roi[0]) 1204 { 1205 snprintf (str, MXSTR, "Inconsistent Roi accross board patches"); 1206 factOut (kFatal, 1, str); 1207 goto EndBuf; 1208 } 1209 1210 } 1198 1211 for (jr = 1; jr < 9; jr++) { 1199 1212 roi[jr] = … … 1222 1235 roi[jr] = 1223 1236 ntohs (rd[i]. 1224 rBuf->S[head_len / 2 + 2 + 4* jr * (roi[jr-1] + 4)]);1237 rBuf->S[head_len / 2 + 2 + 9 * jr * (roi[jr-1] + 4)]); 1225 1238 for (kr = 1; kr < 4; kr++) 1226 1239 { 1227 1240 checkRoi = ntohs(rd[i].rBuf->S[ head_len/2 + 2 //header up to first roi 1228 + kr*(roi[jr ]+4) //shift up to the next board1229 + 4*jr*(roi[jr-1]+4)]); //shift up to the correct pixel1241 + kr*(roi[jr-1]+4) //shift up to the next board 1242 + 9*jr*(roi[jr-1]+4)]); //shift up to the correct pixel 1230 1243 if (checkRoi != roi[jr]) 1231 1244 { 1232 snprintf (str, MXSTR, "Inconsistent Roi accross board patches b %d %d %d %d", kr, jr, roi[jr], checkRoi);1233 factOut (k Error, 1, str);1245 snprintf (str, MXSTR, "Inconsistent Roi accross board patches"); 1246 factOut (kFatal, 1, str); 1234 1247 goto EndBuf; 1235 1248 } … … 1340 1353 } else { 1341 1354 mBuffer[evID].fEvent->StartTM[tmS] = -1; 1355 //ETIENNE because the TM channels are always processed during drs calib, 1356 //set them to zero if they are not present 1357 //I suspect that it may be more efficient to set all the allocated mem to 1358 //zero when allocating it 1359 dest = tmS*roi[0] + NPIX*roi[0]; 1360 memset(&mBuffer[evID].fEvent->Adc_Data[dest],0,roi[0]*2); 1342 1361 } 1343 1362 } … … 1965 1984 } 1966 1985 } 1986 1967 1987 for (it = 0; it < NTMARK; it++) { 1968 1988 if (mBuffer[id].fEvent->StartTM[it] == -1) {
Note:
See TracChangeset
for help on using the changeset viewer.