X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=HLT%2FTPCLib%2FAliHLTTPCDigitReaderDecoder.cxx;h=5087cc7588eda9c22ce9f87d10d5e802b5fbc0b7;hb=900fdfb269d2b4fc184ca63e6fda17e00a3f1481;hp=15324aa77511c546c3c787e7cd961d365e961ad9;hpb=a74855c2d1a051d26cfa98c38c282a810b6bc7d7;p=u%2Fmrichter%2FAliRoot.git diff --git a/HLT/TPCLib/AliHLTTPCDigitReaderDecoder.cxx b/HLT/TPCLib/AliHLTTPCDigitReaderDecoder.cxx index 15324aa7751..5087cc7588e 100644 --- a/HLT/TPCLib/AliHLTTPCDigitReaderDecoder.cxx +++ b/HLT/TPCLib/AliHLTTPCDigitReaderDecoder.cxx @@ -34,6 +34,7 @@ using namespace std; #include "AliAltroDecoder.h" #include "AliAltroData.h" #include "AliAltroBunch.h" +#include "AliHLTTPCTransform.h" ClassImp(AliHLTTPCDigitReaderDecoder) @@ -87,10 +88,23 @@ int AliHLTTPCDigitReaderDecoder::InitBlock(void* ptr,unsigned long size, Int_t p 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() @@ -157,13 +171,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() @@ -172,8 +192,22 @@ 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; + } +}