1 #ifndef ALITPCRAWSTREAM_H
2 #define ALITPCRAWSTREAM_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
7 #include "AliTPCCompression.h"
12 class AliTPCRawStream: public TObject {
14 AliTPCRawStream(AliRawReader* rawReader);
15 AliTPCRawStream(const AliTPCRawStream& stream);
16 AliTPCRawStream& operator = (const AliTPCRawStream& stream);
17 virtual ~AliTPCRawStream();
19 virtual Bool_t Next();
21 Int_t GetSector() const {return fSector;};
22 Int_t GetPrevSector() const {return fPrevSector;};
23 Bool_t IsNewSector() const {return fSector != fPrevSector;};
24 Int_t GetRow() const {return fRow;};
25 Int_t GetPrevRow() const {return fPrevRow;};
26 Bool_t IsNewRow() const {return (fRow != fPrevRow) || IsNewSector();};
27 Int_t GetPad() const {return fPad;};
28 Int_t GetPrevPad() const {return fPrevPad;};
29 Bool_t IsNewPad() const {return (fPad != fPrevPad) || IsNewRow();};
30 Int_t GetTime() const {return fTime;};
31 Int_t GetSignal() const {return fSignal;};
34 UShort_t Get10BitWord(UChar_t* buffer, Int_t position) const;
36 AliRawReader* fRawReader; // object for reading the raw data
38 AliTPCCompression fCompression; // object for decompression
39 static const Int_t fgkNumTables = 5; // number of (de)compression tables
40 static AliTPCHNode** fgRootNode; // (de)compression tables
42 static const Int_t fgkDataMax = 10000000; // size of array for uncompressed raw data
43 UShort_t* fData; // uncompressed raw data
44 Int_t fDataSize; // actual size of the uncompressed raw data
45 Int_t fPosition; // current position in fData
46 Int_t fCount; // counter of words to be read for current trailer
47 Int_t fBunchLength; // remaining number of signal bins in the current bunch
48 static const Int_t fgkOffset = 1; // offset of signal
50 Int_t fSector; // index of current sector
51 Int_t fPrevSector; // index of previous sector
52 Int_t fRow; // index of current row
53 Int_t fPrevRow; // index of previous row
54 Int_t fPad; // index of current pad
55 Int_t fPrevPad; // index of previous pad
56 Int_t fTime; // index of current time bin
57 Int_t fSignal; // signal in ADC counts
59 ClassDef(AliTPCRawStream, 0) // base class for reading TPC raw digits