]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSRawStreamSDD.cxx
Remove some of the bkg calc alterantives; add switch for histos for time calibration...
[u/mrichter/AliRoot.git] / ITS / AliITSRawStreamSDD.cxx
index 379153fadd8193dd46ca55b69e1b468e0ee965fd..1cf27439a1cfd07fddab35f3860c67073309b644 100644 (file)
@@ -192,7 +192,7 @@ Bool_t AliITSRawStreamSDD::Next()
          fNfifo[iFifoIdx] = fCarlosId;
        } else if (fData>=fIFifoWord[0]&&fData<=fIFifoWord[3]){ // FIFO word
          fCarlosId = fNfifo[fData-fIFifoWord[0]];          
-       } else if(fData==0x3FFFFFFF){ // Carlos footer
+       } else if(fData==0x3FFFFFFF && fCarlosId>=0 && fCarlosId<kModulesPerDDL){ // Carlos footer
          fICountFoot[fCarlosId]++; // stop before the last word (last word=jitter)
          if(fICountFoot[fCarlosId]==3){
            fCompletedModule=kTRUE;
@@ -208,9 +208,11 @@ Bool_t AliITSRawStreamSDD::Next()
        }
       } else if (nData30 == 0x02 || nData30 == 0x03) {
        fChannel = nData30-2;
-       fChannelData[fCarlosId][fChannel] += 
-         (ULong64_t(fData & 0x3FFFFFFF) << fLastBit[fCarlosId][fChannel]);
-       fLastBit[fCarlosId][fChannel] += 30;
+       if(fCarlosId>=0 && fCarlosId<kModulesPerDDL){
+         fChannelData[fCarlosId][fChannel] += 
+           (ULong64_t(fData & 0x3FFFFFFF) << fLastBit[fCarlosId][fChannel]);
+         fLastBit[fCarlosId][fChannel] += 30;
+       }
       } else if (nData28== 0x04) {
        // JTAG word -- do nothing
       } else {                               // unknown data format
@@ -221,7 +223,9 @@ Bool_t AliITSRawStreamSDD::Next()
       
       if(fCarlosId>=0 && fCarlosId <kModulesPerDDL){
        Int_t nDDL=fRawReader->GetDDLID();
-       fModuleID = GetModuleNumber(nDDL,fCarlosId);
+       if(nDDL>=0){
+         fModuleID = GetModuleNumber(nDDL,fCarlosId);
+       }
       }
     } else {  // decode data
       if (fReadCode[fCarlosId][fChannel]) {// read the next code word