Line data Source code
1 : #ifndef ALIT0RAWREADER_H
2 : #define ALIT0RAWREADER_H
3 : /***************************************************************************
4 : * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
5 : * reserved.
6 : *
7 : * Alla Maevskaya INR RAS alla@inr.ru
8 : *
9 : * See cxx source for full Copyright notice
10 : ***************************************************************************/
11 :
12 :
13 : #include <TTask.h>
14 : #include "AliRawReader.h"
15 : #include "AliT0Parameters.h"
16 :
17 :
18 : class AliT0RawReader : public TTask {
19 : public :
20 :
21 : AliT0RawReader(AliRawReader *rawReader,Bool_t isOnline = kFALSE) ;
22 : // AliT0RawReader(AliRawReader *rawReader,Bool_t isOnline = kTRUE) ;
23 :
24 : virtual ~AliT0RawReader();
25 0 : AliT0RawReader(const AliT0RawReader& o): TTask(o),
26 0 : fRawReader(0),
27 0 : fData(NULL),
28 0 : fPosition(0),
29 0 : fParam(0),
30 0 : fIsOnline(kFALSE),
31 0 : fBunchID(0),
32 0 : fPrintout(kFALSE)
33 0 : {}
34 :
35 0 : AliT0RawReader& operator=(const AliT0RawReader&) { return *this; }
36 :
37 :
38 : Bool_t Next(); //read next raw digit
39 : Int_t GetPosition();
40 : UInt_t GetNextWord();
41 9040 : Int_t GetData( Int_t channel, Int_t hit) {return fAllData[channel][hit];}
42 :
43 :
44 : enum ET0RawReaderError {
45 : kIncorrectDataSize = 1,
46 : kWrongDRMHeader = 2,
47 : kWrongDRMTrailer = 3,
48 : kWrongTRMHeader = 4,
49 : kWrongTRMTrailer = 5,
50 : kWrongChain0Header = 6,
51 : kWrongChain0Trailer = 7,
52 : kWrongChain1Header = 8,
53 : kWrongChain1Trailer = 9,
54 : kIncorrectLUT = 10
55 : };
56 :
57 0 : Bool_t IsOnlineMode () {return fIsOnline;}
58 8 : Int_t GetTRMBunchID() {return fBunchID;};
59 :
60 0 : void SetPrintout(Bool_t pp ) {fPrintout = pp;}
61 :
62 : protected :
63 :
64 : AliRawReader* fRawReader; // object for reading the raw data
65 : UChar_t* fData; // raw data
66 : Int_t fPosition; // current (32 bit) position in fData
67 : AliT0Parameters *fParam; // instanse of Parameters class
68 : Bool_t fIsOnline; // for case online DA usage
69 : Int_t fBunchID; //bunchID from TRM chain header
70 : Bool_t fPrintout; // advanced printout
71 : Int_t fAllData[250][5]; // container for raw data
72 :
73 28 : ClassDef(AliT0RawReader,5) //class for reading T0 Raw data
74 : };
75 :
76 : typedef AliT0RawReader AliSTARTRawReader; // for backward compatibility
77 :
78 : #endif
|