Changeset 14734
- Timestamp:
- 12/05/12 15:17:50 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/EventBuilder.c
r14225 r14734 1563 1563 && evtCtrl.pcTime[k0] < g_actTime - 30) { 1564 1564 int id = evtCtrl.evtBuf[k0]; 1565 snprintf (str, MXSTR, "%5d skip incomplete evt %8d %8d %2d", 1566 mBuffer[id].evNum, evtCtrl.evtBuf[k0], k0, 1565 snprintf (str, MXSTR, "%5d skip incomplete evt %8d %8d %2d", mBuffer[id].evNum, evtCtrl.evtBuf[k0], k0, 1567 1566 evtCtrl.evtStat[k0]); 1568 1567 factOut (kWarn, 601, str); … … 2360 2359 //i.e. max run Id and lastEvt >= 0 2361 2360 //this condition is sufficient because all pending events were written already in the loop just above 2362 unsigned int maxStartedRun = 0; 2363 for (j=0;j<MAX_RUN;j++) 2361 //actrun 2362 uint32_t lastStartedTime = 0; 2363 uint32_t runIdFound = 0; 2364 if (actrun != 0) 2365 {//If we have an active run, look for its start time 2366 for (j=0;j<MAX_RUN;j++) 2367 { 2368 if (runCtrl[j].runId == actrun) 2369 { 2370 lastStartedTime = runCtrl[j].lastTime; 2371 runIdFound = 1; 2372 } 2373 } 2374 } 2375 else 2376 runIdFound = 1; 2377 2378 if (runIdFound == 0) 2364 2379 { 2365 if ((runCtrl[j].runId > maxStartedRun) && 2366 (runCtrl[j].lastEvt > -1) && 2367 (runCtrl[j].runId != 0)) 2368 maxStartedRun = runCtrl[j].runId; 2380 snprintf(str, MXSTR, "An Active run (number %ud) has been registered, but it could not be found in the runs list", actrun); 2381 factOut(kInfo, 000, str); 2369 2382 } 2370 2383 // snprintf(str, MXSTR, "Maximum runId: %d", maxStartedRun); … … 2376 2389 { 2377 2390 if ((runCtrl[j].fileId < 0) && 2378 (runCtrl[j]. runId < maxStartedRun) &&2391 (runCtrl[j].lastTime < lastStartedTime) && 2379 2392 (runCtrl[j].runId != 0)) 2380 2393 { 2381 snprintf (str, MXSTR, "writeEvt: No file will be opened for run %ud. Last run: %ud (started)", runCtrl[j].runId, maxStartedRun);2394 snprintf (str, MXSTR, "writeEvt: No file will be opened for run %ud. Last run: %ud (started)", runCtrl[j].runId, actrun); 2382 2395 factOut (kInfo, 000, str); 2383 2396 ;//TODO notify that this run will never be opened … … 2389 2402 || runCtrl[j].lastTime < g_actTime - 300 2390 2403 || runCtrl[j].maxEvt <= runCtrl[j].actEvt 2391 || (runCtrl[j]. runId < maxStartedRun&& runCtrl[j].runId != 0))) //ETIENNE added the condition at this line. dunno what to do with run 0: skipping it2404 || (runCtrl[j].lastTime < lastStartedTime && runCtrl[j].runId != 0))) //ETIENNE added the condition at this line. dunno what to do with run 0: skipping it 2392 2405 { 2393 2406 if (runCtrl[j].runId == gi_myRun)
Note:
See TracChangeset
for help on using the changeset viewer.