@brief A digit reader implementation for unpacked TPC data.
*/
-#if __GNUC__== 3
-using namespace std;
-#endif
-
#include <cassert>
#include "AliHLTTPCDigitReaderUnpacked.h"
#include "AliHLTTPCDigitData.h"
#include "AliHLTStdIncludes.h"
#include "AliHLTTPCMapping.h"
+using namespace std;
+
ClassImp(AliHLTTPCDigitReaderUnpacked)
AliHLTTPCDigitReaderUnpacked::AliHLTTPCDigitReaderUnpacked()
AliHLTTPCDigitRowData* pCurrent=pRow;
assert(pCurrent);
pRow=NULL;
+ if (!pCurrent) return -EINVAL;
Byte_t *tmp = (Byte_t*) pCurrent;
Int_t size = sizeof(AliHLTTPCDigitRowData) + pCurrent->fNDigit*sizeof(AliHLTTPCDigitData);
tmp += size;
return (AliHLTUInt32_t)(fMapping->GetHwAddress((UInt_t)GetSortedRow(),(UInt_t)GetSortedPad()));//fTPCRawStream->GetHWAddress();
}
+AliHLTTPCDigitData AliHLTTPCDigitReaderUnpacked::GetSortedDigit(){
+ // see header file for class documentation
+ assert(fData);
+ if (!fData) return AliHLTTPCDigitData();
+ return fData[fBinRowPositionSorted.at(fBin)];
+}
+
Int_t AliHLTTPCDigitReaderUnpacked::GetSortedTime(){
// see header file for class documentation
assert(fData);
fPrevPad = GetSortedPad();
fPrevRow = GetSortedRow();
fDataBunch.push_back(GetSortedSignal());
- fDigitsVector.push_back(fData[fBin]);
+ fDigitsVector.push_back(GetSortedDigit());
do{
if(NextSignal()){
fPrevTime = GetSortedTime();
//fDataBunch.insert(fDataBunch.begin(), GetSortedSignal());// add the signal to the beginning of the buffer
fDataBunch.push_back(GetSortedSignal());// add the signal to the beginning of the buffer
- fDigitsVector.push_back(fData[fBin]);
+ fDigitsVector.push_back(GetSortedDigit());
}
else{//end of bunch but not of channel
break;