]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDRawStream.h
EMCAL geometry can be created independently form anything now
[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
21   public :
22
23     AliTRDRawStream();
24     AliTRDRawStream(AliRawReader* rawReader);
25     virtual ~AliTRDRawStream();
26
27     virtual Bool_t   Next();
28
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;       };
41
42     enum {kDDLOffset = 0x400};    // offset for DDL numbers
43
44   private :
45
46     AliTRDRawStream(const AliTRDRawStream &stream);
47     AliTRDRawStream &operator=(const AliTRDRawStream &stream);
48
49     AliRawReader*    fRawReader;    // Object for reading the raw data
50
51     Int_t            fCount;        // Counter of bytes to be read for current detector
52
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
62
63     ClassDef(AliTRDRawStream, 1)    // Class for reading TRD raw digits
64
65 };
66
67 #endif