]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/TPCLib/AliHLTTPCDigitReader32Bit.cxx
test if I have commit rights
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCDigitReader32Bit.cxx
index 8a67342adc23f0fae81c0075803578dbf13c98b6..76b27a09f98e8ec4bd9be43b2ffb04c4c33a2f87 100644 (file)
@@ -1,4 +1,4 @@
-
+// $Id$
 //**************************************************************************
 //* This file is property of and copyright by the ALICE HLT Project        * 
 //* ALICE Experiment at CERN, All rights reserved.                         *
 //* provided "as is" without express or implied warranty.                  *
 //**************************************************************************
 
-/** @file   AliHLTTPCDigitReader32Bit.cxx
-    @author Kenneth Aamodt
-    @date   
-    @brief  DigitReader implementation for the 32 bit offline decoder
-*/
+/// @file   AliHLTTPCDigitReader32Bit.cxx
+/// @author Kenneth Aamodt
+/// @date   
+/// @brief  DigitReader implementation for the 32 bit offline decoder
+///
 
 #if __GNUC__>= 3
 using namespace std;
@@ -33,17 +33,16 @@ using namespace std;
 #include "AliRawReader.h"
 #include "AliRawReaderMemory.h"
 #include "AliAltroRawStreamV3.h"
-#include "AliHLTTPCTransform.h"
 
 ClassImp(AliHLTTPCDigitReader32Bit)
 
 AliHLTTPCDigitReader32Bit::AliHLTTPCDigitReader32Bit()
   :
   AliHLTTPCDigitReader(),
-  fRawReader(NULL),
   fRawReaderMemory(NULL),
   fAltroRawStreamV3(NULL),
-  fMapping(NULL)
+  fMapping(NULL),
+  fSkipDataReadingFlag(kFALSE)
 {
   // see header file for class documentation
   // or
@@ -71,7 +70,6 @@ AliHLTTPCDigitReader32Bit::~AliHLTTPCDigitReader32Bit()
     fAltroRawStreamV3 = NULL;
   }
 
-
   if(fMapping){
     delete fMapping;
   }
@@ -94,7 +92,7 @@ int AliHLTTPCDigitReader32Bit::InitBlock(void* ptr,unsigned long size, Int_t pat
   fRawReaderMemory->SetMemory(reinterpret_cast<UChar_t*>(ptr), ULong_t(size));
   fRawReaderMemory->SetEquipmentID(ddlno);
   fRawReaderMemory->Reset();
-  fRawReaderMemory->NextEvent();
+  fSkipDataReadingFlag = fRawReaderMemory->NextEvent();
 
   if(fAltroRawStreamV3 != NULL){
     delete fAltroRawStreamV3;
@@ -105,7 +103,8 @@ int AliHLTTPCDigitReader32Bit::InitBlock(void* ptr,unsigned long size, Int_t pat
   if (!fAltroRawStreamV3){
     return -ENODEV;
   }
-  fAltroRawStreamV3->NextDDL();
+
+  fSkipDataReadingFlag = fAltroRawStreamV3->NextDDL();
 
   if(!fMapping){
     fMapping = new AliHLTTPCMapping(patch);
@@ -119,7 +118,7 @@ int AliHLTTPCDigitReader32Bit::InitBlock(void* ptr,unsigned long size, Int_t pat
 int AliHLTTPCDigitReader32Bit::Reset()
 {
   // see header file for class documentation
-  fRawReaderMemory->Reset();
+  fRawReaderMemory->ClearBuffers();
   return 0;
 }
 
@@ -135,8 +134,11 @@ void AliHLTTPCDigitReader32Bit::SetUnsorted(bool unsorted)
 bool AliHLTTPCDigitReader32Bit::NextChannel()
 {
   // see header file for class documentation
-  return fAltroRawStreamV3->NextChannel(); 
+  if(fSkipDataReadingFlag == kFALSE){
+    return kFALSE;
+  }
 
+  return fAltroRawStreamV3->NextChannel(); 
 }
 
 int AliHLTTPCDigitReader32Bit::NextBunch()
@@ -185,7 +187,8 @@ int AliHLTTPCDigitReader32Bit::GetSignal()
 int AliHLTTPCDigitReader32Bit::GetTime()
 {
   // see header file for class documentation
-  int iResult=fAltroRawStreamV3->GetStartTimeBin()-fAltroRawStreamV3->GetBunchLength()+1;
+  int iResult=-1;
+  iResult=fAltroRawStreamV3->GetStartTimeBin()-fAltroRawStreamV3->GetBunchLength()+1;
   return iResult;
 }
 
@@ -199,6 +202,7 @@ int AliHLTTPCDigitReader32Bit::GetRowOffset() const
 {
   return fMapping->GetRowOffset();
 }
+
 AliHLTUInt32_t AliHLTTPCDigitReader32Bit::GetAltroBlockHWaddr() const
 {
   // see header file for class documentation