#include "AliAltroDecoder.h"
#include "AliAltroData.h"
#include "AliAltroBunch.h"
+#include "AliHLTTPCTransform.h"
ClassImp(AliHLTTPCDigitReaderDecoder)
return 0;
}
+void AliHLTTPCDigitReaderDecoder::SetUnsorted(bool unsorted)
+{
+ // see header file for class documentation
+
+ // The DigitReaderDecoder does not support sorted data, forward to
+ // default if sorted data requested
+ if (!unsorted) AliHLTTPCDigitReader::SetUnsorted(unsorted);
+}
+
bool AliHLTTPCDigitReaderDecoder::NextChannel()
{
// see header file for class documentation
- return fAltroDecoder->NextChannel(&fAltroData);
+ Bool_t result=fAltroDecoder->NextChannel(&fAltroData);
+ if(result && !fMapping->IsValidHWAddress(fAltroData.GetHadd())){
+ result = fAltroDecoder->NextChannel(&fAltroData);
+ }
+ return result;
}
int AliHLTTPCDigitReaderDecoder::NextBunch()
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()
return fAltroBunch->GetBunchSize();
}
+int AliHLTTPCDigitReaderDecoder::GetRowOffset() const
+{
+ return fMapping->GetRowOffset();
+}
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;
+ }
+}