]>
Commit | Line | Data |
---|---|---|
3ea47630 | 1 | #ifndef ALIALTRORAWSTREAM_H |
2 | #define ALIALTRORAWSTREAM_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 is a base class for reading raw data digits in Altro format | |
11 | /// | |
12 | /////////////////////////////////////////////////////////////////////////////// | |
13 | ||
14 | #include <TObject.h> | |
15 | ||
16 | class AliRawReader; | |
17 | ||
18 | ||
19 | class AliAltroRawStream: public TObject { | |
20 | public : | |
21 | AliAltroRawStream(AliRawReader* rawReader); | |
22 | virtual ~AliAltroRawStream(); | |
23 | ||
24 | virtual Bool_t Next(); | |
25 | ||
0ba5477a | 26 | Int_t GetSector() const { return fSector; } // Provide index of current sector |
27 | Int_t GetPrevSector() const { return fPrevSector; } // Provide index of previous sector | |
28 | Int_t GetRow() const { return fRow; } // Provide index of current row | |
29 | Int_t GetPrevRow() const { return fPrevRow; } // Provide index of previous row | |
30 | Int_t GetPad() const { return fPad; } // Provide index of current pad | |
31 | Int_t GetPrevPad() const { return fPrevPad; } // Provide index of previous pad | |
32 | Int_t GetTimeBin() const { return fTime; } // Provide index of current time bin | |
33 | Int_t GetADC() const { return fSignal; } // Provide signal in ADC counts | |
34 | Int_t GetTimeLength() const { return fTimeBunch; } // Provide total length of current time bunch | |
35 | ||
3ea47630 | 36 | protected: |
37 | Int_t fSector; // index of current sector | |
38 | Int_t fPrevSector; // index of previous sector | |
39 | Int_t fRow; // index of current row | |
40 | Int_t fPrevRow; // index of previous row | |
41 | Int_t fPad; // index of current pad | |
42 | Int_t fPrevPad; // index of previous pad | |
43 | Int_t fTime; // index of current time bin | |
44 | Int_t fSignal; // signal in ADC counts | |
634692a1 | 45 | Int_t fTimeBunch; // total length of the current time bunch |
3ea47630 | 46 | |
47 | AliRawReader* fRawReader; // object for reading the raw data | |
48 | ||
49 | private : | |
50 | AliAltroRawStream(const AliAltroRawStream& stream); | |
51 | AliAltroRawStream& operator = (const AliAltroRawStream& stream); | |
52 | ||
53 | UShort_t Get10BitWord(UChar_t* buffer, Int_t position) const; | |
54 | ||
55 | UChar_t* fData; // raw data | |
56 | Int_t fPosition; // current (10 bit) position in fData | |
57 | Int_t fCount; // counter of words to be read for current trailer | |
58 | Int_t fBunchLength; // remaining number of signal bins in the current bunch | |
59 | ||
60 | ClassDef(AliAltroRawStream, 0) // base class for reading Altro raw digits | |
61 | }; | |
62 | ||
63 | #endif |