]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/misc/AliL3DDLTPCRawStream.h
New version of SPD raw-data reconstruction. The format now correponds to the actual...
[u/mrichter/AliRoot.git] / HLT / misc / AliL3DDLTPCRawStream.h
1 // @(#) $Id$
2
3 #ifndef ALIL3DDLTPCRAWSTREAM_H
4 #define ALIL3DDLTPCRAWSTREAM_H
5
6 #include "AliL3RootTypes.h"
7
8 class AliL3DDLRawReader;
9
10 class AliL3DDLTPCRawStream 
11 {
12   public :
13     AliL3DDLTPCRawStream(AliL3DDLRawReader* rawReader);
14     virtual ~AliL3DDLTPCRawStream();
15
16     virtual Bool_t   Next();
17     Bool_t SetDDLID(Int_t d); //choose ddlid to readout
18
19     Int_t     GetSector() const {return fSector;};
20     Int_t     GetPrevSector() const {return fPrevSector;};
21     Bool_t    IsNewSector() const {return fSector != fPrevSector;};
22     Int_t     GetRow() const {return fRow;};
23     Int_t     GetPrevRow() const {return fPrevRow;};
24     Bool_t    IsNewRow() const {return (fRow != fPrevRow) || IsNewSector();};
25     Int_t     GetPad() const {return fPad;};
26     Int_t     GetPrevPad() const {return fPrevPad;};
27     Bool_t    IsNewPad() const {return (fPad != fPrevPad) || IsNewRow();};
28     Int_t     GetTime() const {return fTime;};
29     Int_t     GetSignal() const {return fSignal;};
30
31   protected :
32     UShort_t         Get10BitWord(UChar_t* buffer, Int_t position) const;
33
34     static const Int_t fgkOffset  = 1;         // offset of signal
35     static const Int_t fgkDataMax = 10000000;  // size of array for uncompressed raw data
36
37     AliL3DDLRawReader* fRawReader;  // object for reading the raw data
38
39     UShort_t*        fData;         //[fgkDataMax] uncompressed raw data
40     Int_t            fDataSize;     // actual size of the uncompressed raw data
41     Int_t            fPosition;     // current position in fData
42     Int_t            fCount;        // counter of words to be read for current trailer
43     Int_t            fBunchLength;  // remaining number of signal bins in the current bunch
44
45     Int_t            fSector;       // index of current sector
46     Int_t            fPrevSector;   // index of previous sector
47     Int_t            fRow;          // index of current row
48     Int_t            fPrevRow;      // index of previous row
49     Int_t            fPad;          // index of current pad
50     Int_t            fPrevPad;      // index of previous pad
51     Int_t            fTime;         // index of current time bin
52     Int_t            fSignal;       // signal in ADC counts
53
54     ClassDef(AliL3DDLTPCRawStream, 1) // AliL3DDLTPCRawStream
55 };
56
57 #endif