Changeset 12410 for trunk/FACT++/src/EventBuilder.c
- Timestamp:
- 11/05/11 21:47:45 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/EventBuilder.c
r12408 r12410 1193 1193 debugRead (i, jrd, rd[i].evtID, rd[i].ftmID, rd[i].runID, 1, tsec, tusec); // i=socket; jrd=#bytes; ievt=eventid; 1=finished event 1194 1194 1195 //we have a complete buffer, copy to WORK area1195 /* //we have a complete buffer, copy to WORK area 1196 1196 int jr; 1197 1197 roi[0] = ntohs (rd[i].rBuf->S[head_len / 2 + 2]); 1198 for (jr = 0; jr < 9; jr++) { 1198 for (jr = 1; jr < 9; jr++) { 1199 roi[jr] = 1200 ntohs (rd[i]. 1201 rBuf->S[head_len / 2 + 2 + jr * (roi[jr-1] + 4)]); 1202 1203 } 1204 */ 1205 //we have a complete buffer, copy to WORK area 1206 int jr, kr; 1207 int checkRoi; 1208 roi[0] = ntohs (rd[i].rBuf->S[head_len / 2 + 2]); 1209 for (kr = 1; kr < 4; kr++) 1210 { 1211 checkRoi = ntohs(rd[i].rBuf->S[head_len/ 2 + 2 1212 + kr*(roi[0]+4)]); 1213 if (checkRoi != roi[0]) 1214 { 1215 snprintf (str, MXSTR, "Inconsistent Roi accross board patches a %d %d %d", kr, checkRoi, roi[0]); 1216 factOut (kError, 1, str); 1217 goto EndBuf; 1218 } 1219 1220 } 1221 for (jr = 1; jr < 9; jr++) { 1199 1222 roi[jr] = 1200 1223 ntohs (rd[i]. 1201 rBuf->S[head_len / 2 + 2 + jr * (roi[0] + 4)]); 1224 rBuf->S[head_len / 2 + 2 + 4 * jr * (roi[jr-1] + 4)]); 1225 for (kr = 1; kr < 4; kr++) 1226 { 1227 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 board 1229 + 4*jr*(roi[jr-1]+4)]); //shift up to the correct pixel 1230 if (checkRoi != roi[jr]) 1231 { 1232 snprintf (str, MXSTR, "Inconsistent Roi accross board patches b %d %d %d %d", kr, jr, roi[jr], checkRoi); 1233 factOut (kError, 1, str); 1234 goto EndBuf; 1235 } 1236 } 1202 1237 } 1203 1238 //get index into mBuffer for this event (create if needed)
Note:
See TracChangeset
for help on using the changeset viewer.