--- chewbacca/YodaProfiler/src/PamelaDBOperations.cpp 2008/09/25 12:13:54 1.2 +++ chewbacca/YodaProfiler/src/PamelaDBOperations.cpp 2008/09/25 15:30:10 1.3 @@ -1377,9 +1377,13 @@ UInt_t lastPkt = 0; UInt_t rhtime = 0; UInt_t rttime = 0; + // + if ( IsDebug() ) printf(" A firstev %i lastev %i nevents %i \n",firstev,lastev,lastev-firstev+1); + // if ( !mishead ){ codh = ehh->GetCounter(); - if ( lastev+1 == firstev || (lastev == firstev && lastev != -1) ){ + if ( (lastev+1 == firstev && lastev != -1) || (lastev == firstev && lastev != -1) ){ + if ( IsDebug() ) printf(" B firstev %i lastev %i nevents %i \n",firstev,lastev,lastev-firstev+1); firstev = 1; lastev = 0; } else { @@ -1392,7 +1396,8 @@ }; if ( !mistrail ){ codt = eht->GetCounter(); - if ( lastev+1 == firstev || (lastev == firstev && lastev != -1)){ + if ( (lastev+1 == firstev && lastev != -1) || (lastev == firstev && lastev != -1)){ + if ( IsDebug() ) printf(" C firstev %i lastev %i nevents %i \n",firstev,lastev,lastev-firstev+1); lastev = 0; firstev = lastev+1; } else { @@ -1409,7 +1414,7 @@ if ( mishead ) { glrun->Set_GL_RUNH0(); // - if ( lastev+1 == firstev || (lastev == firstev && lastev != -1) ){ + if ( (lastev+1 == firstev && lastev != -1) || (lastev == firstev && lastev != -1) ){ firstObt = lastObt; firstPkt = lastPkt; rhtime = rttime; @@ -1428,7 +1433,7 @@ if ( mistrail ){ glrun->Set_GL_RUNT0(); // - if ( lastev+1 == firstev || (lastev == firstev && lastev != -1) ){ + if ( (lastev+1 == firstev && lastev != -1) || (lastev == firstev && lastev != -1) ){ lastObt = firstObt; lastPkt = firstPkt; rttime = rhtime;