]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TOF/AliTOFRawStream.cxx
full chain for pass0: channels equalizing and season time shift correction
[u/mrichter/AliRoot.git] / TOF / AliTOFRawStream.cxx
index 37be5961b0c7c2fc706653ce7244dcb8caaeaa02..3d6f36c38cf8974916b03e668fead043c4462137 100644 (file)
@@ -508,8 +508,10 @@ AliTOFRawStream::~AliTOFRawStream()
   delete fDecoder;
   delete fDecoderV2;
   
-  fTOFrawData->Clear();
-  delete fTOFrawData;
+  if (fTOFrawData) {
+    fTOFrawData->Clear("C");
+    delete fTOFrawData;
+  }
 
   //delete fCableLengthMap;
 
@@ -630,6 +632,11 @@ Bool_t AliTOFRawStream::Next()
   }
 
   fDDL  = fRawReader->GetDDLID();
+  if (fDDL==-1) {
+    fRawReader->AddMajorErrorLog(kDDLdataReading);
+    AliWarning("Error when load DDL. Go to next DDL");
+    return kFALSE;
+  }
 
   fWordType = GetField(data,WORD_TYPE_MASK,WORD_TYPE_POSITION);
 
@@ -1774,6 +1781,7 @@ AliTOFRawStream::LoadRawDataBuffersV2(Int_t indexDDL, Int_t verbose)
     /* skip if bad TRM event counter detected */
     if (trmsd->GetEventCounter() != drmsd->GetLocalEventCounter()) continue;
     /* skip if bad TRM CRC detected */
+    AliDebug(2,Form("~~~~~~ %02d %02d --- TRM CRC: as written in raw data =%d and as computed =%d ~~~~~~",indexDDL,itrm,trmsd->GetEventCRC(), trmsd->GetDecoderCRC()));
     if (trmsd->GetEventCRC() != trmsd->GetDecoderCRC()) continue;
 
     /* loop over chains */