/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
-#include <TObject.h>
-#include "AliRawReader.h"
-#include "AliTPCCompression.h"
+///////////////////////////////////////////////////////////////////////////////
+///
+/// This class provides access to TPC digits in raw data.
+///
+///////////////////////////////////////////////////////////////////////////////
+#include "AliAltroRawStream.h"
-class AliTPCRawStream: public TObject {
+class AliRawReader;
+class AliAltroMapping;
+
+class AliTPCRawStream: public AliAltroRawStream {
public :
- AliTPCRawStream(AliRawReader* rawReader);
+ AliTPCRawStream(AliRawReader* rawReader, AliAltroMapping **mapping = NULL);
virtual ~AliTPCRawStream();
- virtual Bool_t Next();
-
- inline Int_t GetSector() const {return fSector;};
- inline Int_t GetPrevSector() const {return fPrevSector;};
- inline Bool_t IsNewSector() const {return fSector != fPrevSector;};
- inline Int_t GetRow() const {return fRow;};
- inline Int_t GetPrevRow() const {return fPrevRow;};
- inline Bool_t IsNewRow() const {return (fRow != fPrevRow) || IsNewSector();};
- inline Int_t GetPad() const {return fPad;};
- inline Int_t GetPrevPad() const {return fPrevPad;};
- inline Bool_t IsNewPad() const {return (fPad != fPrevPad) || IsNewRow();};
- inline Int_t GetTime() const {return fTime;};
- inline Int_t GetSignal() const {return fSignal;};
+ virtual void Reset();
+ virtual Bool_t Next();
- protected :
- UShort_t Get10BitWord(UChar_t* buffer, Int_t position);
+ inline Int_t GetSector() const { return fSector; } // Provide index of current sector
+ inline Int_t GetPrevSector() const { return fPrevSector; } // Provide index of previous sector
+ inline Bool_t IsNewSector() const {return fSector != fPrevSector;};
+ inline Int_t GetRow() const { return fRow; } // Provide index of current row
+ inline Int_t GetPrevRow() const { return fPrevRow; } // Provide index of previous row
+ inline Bool_t IsNewRow() const {return (fRow != fPrevRow) || IsNewSector();};
+ inline Int_t GetPad() const { return fPad; } // Provide index of current pad
+ inline Int_t GetPrevPad() const { return fPrevPad; } // Provide index of previous pad
+ inline Bool_t IsNewPad() const {return (fPad != fPrevPad) || IsNewRow();};
- AliRawReader* fRawReader; // object for reading the raw data
+ AliTPCRawStream& operator = (const AliTPCRawStream& stream);
+ AliTPCRawStream(const AliTPCRawStream& stream);
- AliTPCCompression fCompression; // object for decompression
- static const Int_t kNumTables = 5; // number of (de)compression tables
- static AliTPCHNode** fgRootNode; // (de)compression tables
+ protected :
- static const Int_t kDataMax = 10000000; // size of array for uncompressed raw data
- UShort_t* fData; // uncompressed raw data
- Int_t fDataSize; // actual size of the uncompressed raw data
- Int_t fPosition; // current position in fData
- Int_t fCount; // counter of words to be read for current trailer
- Int_t fBunchLength; // remaining number of signal bins in the current bunch
- static const Int_t kOffset = 1; // offset of signal
+ virtual void ApplyAltroMapping();
Int_t fSector; // index of current sector
Int_t fPrevSector; // index of previous sector
Int_t fPrevRow; // index of previous row
Int_t fPad; // index of current pad
Int_t fPrevPad; // index of previous pad
- Int_t fTime; // index of current time bin
- Int_t fSignal; // signal in ADC counts
+
+ AliAltroMapping *fMapping[6]; // Pointers to ALTRO mapping
+ Bool_t fIsMapOwner; // does object own its mappings?
ClassDef(AliTPCRawStream, 0) // base class for reading TPC raw digits
};