1 #ifndef ALITRDRAWSTREAM_H
2 #define ALITRDRAWSTREAM_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 ///////////////////////////////////////////////////////////////////////////////
10 /// This class provides access to TRD digits in raw data.
12 ///////////////////////////////////////////////////////////////////////////////
17 class AliTRDparameter;
19 class AliTRDRawStream: public TObject {
21 AliTRDRawStream(AliRawReader* rawReader);
22 virtual ~AliTRDRawStream();
24 virtual Bool_t Next();
26 Int_t GetDetector() const {return fDetector;};
27 Int_t GetPrevDetector() const {return fPrevDetector;};
28 Bool_t IsNewDetector() const {return fDetector != fPrevDetector;};
29 Int_t GetNPads() const {return fNPads;};
30 Int_t GetRow() const {return fRow;};
31 Int_t GetPrevRow() const {return fPrevRow;};
32 Bool_t IsNewRow() const {return (fRow != fPrevRow) || IsNewDetector();};
33 Int_t GetColumn() const {return fColumn;};
34 Int_t GetPrevColumn() const {return fPrevColumn;};
35 Bool_t IsNewColumn() const {return (fColumn != fPrevColumn) || IsNewRow();};
36 Int_t GetTime() const {return fTime-1;};
37 Int_t GetSignal() const {return fSignal;};
39 enum {kDDLOffset = 0x400}; // offset for DDL numbers
42 AliTRDRawStream(const AliTRDRawStream& stream);
43 AliTRDRawStream& operator = (const AliTRDRawStream& stream);
45 AliRawReader* fRawReader; // object for reading the raw data
47 Int_t fCount; // counter of bytes to be read for current detector
49 Int_t fDetector; // index of current detector
50 Int_t fPrevDetector; // index of previous detector
51 Int_t fNPads; // number of active pads
52 Int_t fRow; // index of current pad row
53 Int_t fPrevRow; // index of previous pad row
54 Int_t fColumn; // index of current pad column
55 Int_t fPrevColumn; // index of previous pad column
56 Int_t fTime; // index of current time bin
57 Int_t fSignal; // signal in ADC counts
59 ClassDef(AliTRDRawStream, 1) // class for reading TRD raw digits