]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/TPCLib/AliHLTTPCDigitReaderDecoder.cxx
Warning Fixed
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCDigitReaderDecoder.cxx
index 52bc108639e2db2bc8bb86268cea63f7ee05d97c..b0c3c5be3fb4f1b0a99e872bd4f80da1a30b5355 100644 (file)
@@ -34,6 +34,7 @@ using namespace std;
 #include "AliAltroDecoder.h"
 #include "AliAltroData.h"
 #include "AliAltroBunch.h"
+#include "AliHLTTPCTransform.h"
 
 ClassImp(AliHLTTPCDigitReaderDecoder)
 
@@ -161,13 +162,19 @@ int AliHLTTPCDigitReaderDecoder::GetSignal()
 int AliHLTTPCDigitReaderDecoder::GetTime()
 {
   // see header file for class documentation
+  int iResult=0;
   if(!fNextSignalMethodUsed){// this is true if the bunch approach is used
-    return fAltroBunch->GetStartTimeBin();
+    
+    iResult= fAltroBunch->GetStartTimeBin();
   }
   else{
     assert(fNextCounter>=0);
-    return fAltroBunch->GetStartTimeBin()+fNextCounter;
+    iResult = fAltroBunch->GetStartTimeBin()+fNextCounter;
   }
+  if(iResult<0 || iResult>AliHLTTPCTransform::GetNTimeBins()){
+    iResult=0;
+  }
+  return iResult;
 }
 
 int AliHLTTPCDigitReaderDecoder::GetBunchSize()
@@ -185,3 +192,13 @@ AliHLTUInt32_t AliHLTTPCDigitReaderDecoder::GetAltroBlockHWaddr() const
   // see header file for class documentation
   return (AliHLTUInt32_t)fAltroData.GetHadd();
 }
+AliHLTUInt32_t AliHLTTPCDigitReaderDecoder::GetAltroBlockHWaddr(Int_t row, Int_t pad) const
+{
+  // see header file for class documentation
+  if(fMapping){
+    return fMapping->GetHwAddress(row,pad);
+  }
+  else{
+    return 0;
+  }
+}