Changeset 15441 for trunk/FACT++/src


Ignore:
Timestamp:
04/25/13 19:49:57 (12 years ago)
Author:
tbretz
Message:
Fixed a problem when flushing buffers, events still in use could be deleted; RunUsec should not be set to the same value than RunTime
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/EventBuilder.c

    r15428 r15441  
    17701770
    17711771      //and clear all buffers (might have to wait until all others are done)
     1772      // If minclear is 0, an event could be deleted while writing is still ongoing
     1773      /*
    17721774      int minclear;
    17731775      if (gi_resetR == 1) {
     
    17771779         minclear = 0;
    17781780         factPrintf(kInfo, -1, "Flush all buffers ...");
    1779       }
     1781      }*/
     1782      const int minclear = 900;
    17801783
    17811784      int numclear = 1;
     
    19911994               if (j >= MAX_RUN) {
    19921995                   factPrintf(kFatal, 901, "procEvt: Can not find run %d for event %d in %d", irun, ievt, id);
     1996                   // FIXME: The event has to be flagged such that it will be deleted! Although that should never happen
     1997                   continue;
    19931998               }
    19941999               lastRun = j;
     
    20182023               //                     actRun.NroiTM = 0;
    20192024               actRun.RunTime = runCtrl[j].firstTime;
    2020                actRun.RunUsec = runCtrl[j].firstTime;
     2025               actRun.RunUsec = runCtrl[j].firstUsec;
    20212026               actRun.NBoard  = NBOARDS;
    20222027               actRun.NPix    = NPIX;
     
    23342339               //                     actRun.NroiTM = 0;
    23352340               actRun.RunTime = runCtrl[j].firstTime;
    2336                actRun.RunUsec = runCtrl[j].firstTime;
     2341               actRun.RunUsec = runCtrl[j].firstUsec;
    23372342               actRun.NBoard = NBOARDS;
    23382343               actRun.NPix = NPIX;
Note: See TracChangeset for help on using the changeset viewer.