]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDRawStream.h
- Adding handling of track info in digits.
[u/mrichter/AliRoot.git] / TRD / AliTRDRawStream.h
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                               */
5
6 /* $Id$ */
7
8 ///////////////////////////////////////////////////////////////////////////////
9 ///
10 /// This class provides access to TRD digits in raw data.
11 ///
12 ///////////////////////////////////////////////////////////////////////////////
13
14 #include <TObject.h>
15
16 class AliRawReader;
17 class AliTRDparameter;
18
19 class AliTRDRawStream: public TObject {
20   public :
21     AliTRDRawStream(AliRawReader* rawReader);
22     virtual ~AliTRDRawStream();
23
24     virtual Bool_t   Next();
25
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;};
38
39     enum {kDDLOffset = 0x400};    // offset for DDL numbers
40
41   private :
42     AliTRDRawStream(const AliTRDRawStream& stream);
43     AliTRDRawStream& operator = (const AliTRDRawStream& stream);
44
45     AliRawReader*    fRawReader;    // object for reading the raw data
46
47     Int_t            fCount;        // counter of bytes to be read for current detector
48
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
58
59     ClassDef(AliTRDRawStream, 1)    // class for reading TRD raw digits
60 };
61
62 #endif