- Timestamp:
- 11/09/11 00:42:40 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/EventBuilder.c
r12453 r12459 1219 1219 int jr, kr; 1220 1220 int checkRoi; 1221 roi[0] = ntohs (rd[i].rBuf->S[head_len / 2 + 2]); 1221 int roiHopper = head_len/2 + 2; //points to the very first roi 1222 roi[0] = ntohs (rd[i].rBuf->S[roiHopper]); 1223 roiHopper += roi[0]+4;//skip to the second roi (i.e. next board, same patch-pixel) 1222 1224 for (kr = 1; kr < 4; kr++) 1223 1225 { 1224 checkRoi = ntohs(rd[i].rBuf->S[head_len/ 2 + 2 1225 + kr*(roi[0]+4)]); 1226 checkRoi = ntohs(rd[i].rBuf->S[roiHopper]); 1226 1227 if (checkRoi != roi[0]) 1227 1228 { … … 1230 1231 goto EndBuf; 1231 1232 } 1232 1233 } 1233 roiHopper += checkRoi+4; 1234 } 1235 //roiHopper now points to the first pixel of board 2. Do the 8 remaining pixels 1234 1236 for (jr = 1; jr < 9; jr++) { 1235 roi[jr] = 1236 ntohs (rd[i]. 1237 rBuf->S[head_len / 2 + 2 + 9 * jr * (roi[jr-1] + 4)]); 1237 roi[jr] = ntohs(rd[i].rBuf->S[roiHopper]); 1238 checkRoi = roi[jr]; 1238 1239 for (kr = 1; kr < 4; kr++) 1239 1240 { 1240 checkRoi = ntohs(rd[i].rBuf->S[ head_len/2 + 2 //header up to first roi 1241 + kr*(roi[jr]+4) //shift up to the next board 1242 + 9*jr*(roi[jr-1]+4)]); //shift up to the correct pixel 1241 roiHopper += checkRoi+4; 1242 checkRoi = ntohs(rd[i].rBuf->S[roiHopper]); 1243 1243 if (checkRoi != roi[jr]) 1244 1244 { 1245 snprintf (str, MXSTR, "Inconsistent Roi accross board patches ");1245 snprintf (str, MXSTR, "Inconsistent Roi accross board patches B=%d P=%d %d %d", kr, jr, roi[jr], checkRoi); 1246 1246 factOut (kFatal, 1, str); 1247 1247 goto EndBuf;
Note:
See TracChangeset
for help on using the changeset viewer.