3 /**************************************************************************
4 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6 * Authors: Matthias Richter <Matthias.Richter@ift.uib.no> *
7 * Timm Steinbeck <timm@kip.uni-heidelberg.de> *
8 * Jochen Thaeder <thaeder@kip.uni-heidelberg.de> *
9 * for The ALICE Off-line Project. *
11 * Permission to use, copy, modify and distribute this software and its *
12 * documentation strictly for non-commercial purposes is hereby granted *
13 * without fee, provided that the above copyright notice appears in all *
14 * copies and that both the copyright notice and this permission notice *
15 * appear in the supporting documentation. The authors make no claims *
16 * about the suitability of this software for any purpose. It is *
17 * provided "as is" without express or implied warranty. *
18 **************************************************************************/
20 /** @file AliHLTTPCDigitReaderUnpacked.cxx
21 @author Timm Steinbeck, Jochen Thaeder, Matthias Richter
23 @brief A digit reader implementation for unpacked TPC data.
30 #include "AliHLTTPCDigitReaderUnpacked.h"
31 #include "AliHLTTPCDigitData.h"
32 #include "AliHLTTPCRawDataFormat.h"
33 #include "AliHLTTPCTransform.h"
34 #include "AliHLTStdIncludes.h"
36 ClassImp(AliHLTTPCDigitReaderUnpacked)
38 AliHLTTPCDigitReaderUnpacked::AliHLTTPCDigitReaderUnpacked()
52 AliHLTTPCDigitReaderUnpacked::AliHLTTPCDigitReaderUnpacked(const AliHLTTPCDigitReaderUnpacked& src)
64 HLTFatal("copy constructor not for use");
67 AliHLTTPCDigitReaderUnpacked& AliHLTTPCDigitReaderUnpacked::operator=(const AliHLTTPCDigitReaderUnpacked& src)
78 HLTFatal("assignment operator not for use");
82 AliHLTTPCDigitReaderUnpacked::~AliHLTTPCDigitReaderUnpacked(){
85 int AliHLTTPCDigitReaderUnpacked::InitBlock(void* ptr,unsigned long size, Int_t patch, Int_t slice){
86 AliHLTTPCUnpackedRawData *tmpptr;
90 tmpptr = (AliHLTTPCUnpackedRawData*) fPtr;
91 fDigitRowData = (AliHLTTPCDigitRowData*) tmpptr->fDigits;
92 fActRowData = (AliHLTTPCDigitRowData*) fDigitRowData;
96 fFirstRow=AliHLTTPCTransform::GetFirstRow(patch);
97 fLastRow=AliHLTTPCTransform::GetLastRow(patch);
102 if ((Int_t)fActRowData->fRow != fRow){
103 HLTWarning("Row number should match! fActRowData->fRow=%d fRow=%d", fActRowData->fRow, fRow);
107 bool AliHLTTPCDigitReaderUnpacked::Next(){
108 bool rreadvalue = true;
112 if ( fBin >= (Int_t)fActRowData->fNDigit ){
116 if ((fRow >= fFirstRow) && (fRow <= fLastRow)){
119 Byte_t *tmp = (Byte_t*) fActRowData;
120 Int_t size = sizeof(AliHLTTPCDigitRowData) + fActRowData->fNDigit*sizeof(AliHLTTPCDigitData);
122 fActRowData = (AliHLTTPCDigitRowData*) tmp;
124 if (((Byte_t*)fPtr) + fSize <= tmp){
136 if ((Int_t)fActRowData->fRow != fRow){
137 HLTWarning("Row number should match! fActRowData->fRow=%d fRow=%d", fActRowData->fRow, fRow);
141 fData = fActRowData->fDigitData;
146 int AliHLTTPCDigitReaderUnpacked::GetRow(){
152 int AliHLTTPCDigitReaderUnpacked::GetPad(){
154 rpad = (int)fData[fBin].fPad;
158 int AliHLTTPCDigitReaderUnpacked::GetSignal(){
160 rsignal = (int)fData[fBin].fCharge;
164 int AliHLTTPCDigitReaderUnpacked::GetTime(){
166 rtime = (int)fData[fBin].fTime;