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 {
24 AliTRDRawStream(AliRawReader* rawReader);
25 virtual ~AliTRDRawStream();
27 virtual Bool_t Next();
29 Int_t GetDetector() const { return fDetector; };
30 Int_t GetPrevDetector() const { return fPrevDetector; };
31 Bool_t IsNewDetector() const { return fDetector != fPrevDetector; };
32 Int_t GetNPads() const { return fNPads; };
33 Int_t GetRow() const { return fRow; };
34 Int_t GetPrevRow() const { return fPrevRow; };
35 Bool_t IsNewRow() const { return (fRow != fPrevRow) || IsNewDetector(); };
36 Int_t GetColumn() const { return fColumn; };
37 Int_t GetPrevColumn() const { return fPrevColumn; };
38 Bool_t IsNewColumn() const { return (fColumn != fPrevColumn) || IsNewRow(); };
39 Int_t GetTime() const { return fTime-1; };
40 Int_t GetSignal() const { return fSignal; };
42 enum {kDDLOffset = 0x400}; // offset for DDL numbers
46 AliTRDRawStream(const AliTRDRawStream &stream);
47 AliTRDRawStream &operator=(const AliTRDRawStream &stream);
49 AliRawReader* fRawReader; // Object for reading the raw data
51 Int_t fCount; // Counter of bytes to be read for current detector
53 Int_t fDetector; // Index of current detector
54 Int_t fPrevDetector; // Index of previous detector
55 Int_t fNPads; // Number of active pads
56 Int_t fRow; // Index of current pad row
57 Int_t fPrevRow; // Index of previous pad row
58 Int_t fColumn; // Index of current pad column
59 Int_t fPrevColumn; // Index of previous pad column
60 Int_t fTime; // Index of current time bin
61 Int_t fSignal; // Signal in ADC counts
63 ClassDef(AliTRDRawStream, 1) // Class for reading TRD raw digits