Fixed the "next DDL link" condition in the iteration over pads.
authormarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 26 Aug 2010 15:24:03 +0000 (15:24 +0000)
committermarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 26 Aug 2010 15:24:03 +0000 (15:24 +0000)
TPC/AliTPCDDLRawData.cxx

index 60cae50..166f1fc 100644 (file)
@@ -127,20 +127,21 @@ void AliTPCDDLRawData::RawData(const char* inputFileName){
       if ( (data.Time==(pTimeBin+1)) &&
           (pPadNumber==data.Pad) &&
           (pRowNumber==data.Row) &&
-          (pSecNumber==data.Sec)){
+          (pSecNumber==data.Sec) &&
+          (pSubSector==data.SubSec)){
        bunchLength++;
       }//end if
       else{
        buffer->FillBuffer(pTimeBin);
        buffer->FillBuffer(bunchLength+2);
        nwords+=2;
-       if ((pPadNumber!=data.Pad)||(pRowNumber!=data.Row)||(pSecNumber!=data.Sec)){
+       if ((pPadNumber!=data.Pad)||(pRowNumber!=data.Row)||(pSecNumber!=data.Sec)||(pSubSector!=data.SubSec)){
          //Trailer is formatted and inserted!!
          buffer->WriteTrailer(nwords,pPadNumber,pRowNumber,pSecNumber);
          numPackets++;
          nwords=0;
 
-         if(pSubSector!=data.SubSec){
+         if(pSecNumber!=data.Sec || pSubSector!=data.SubSec){
            //size magic word sector number sub-sector number 0 for TPC 0 for uncompressed
            buffer->Flush();
            buffer->WriteDataHeader(kFALSE,kFALSE);