Line data Source code
1 : #ifndef ALIFITRAWREADER_H
2 : #define ALIFITRAWREADER_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 :
16 :
17 : class AliFITRawReader : public TTask {
18 : public :
19 :
20 : AliFITRawReader(AliRawReader *rawReader) ;
21 :
22 : virtual ~AliFITRawReader();
23 0 : AliFITRawReader(const AliFITRawReader& o): TTask(o),
24 0 : fRawReader(0),
25 0 : fData(NULL),
26 0 : fPosition(0),
27 0 : fBunchID(0),
28 0 : fPrintout(kFALSE)
29 0 : { for ( Int_t k=0; k<1000; k++) fAllData[k] = -1;}
30 :
31 0 : AliFITRawReader& operator=(const AliFITRawReader&) { return *this; }
32 :
33 :
34 : Bool_t Next(); //read next raw digit
35 : Int_t GetPosition();
36 : UInt_t GetNextWord();
37 0 : Int_t GetData( Int_t channel) {return fAllData[channel];}
38 :
39 :
40 : enum EFITRawReaderError {
41 : kIncorrectDataSize = 1,
42 : kWrongDRMHeader = 2,
43 : kWrongDRMTrailer = 3,
44 : kWrongTRMHeader = 4,
45 : kWrongTRMTrailer = 5,
46 : kWrongChain0Header = 6,
47 : kWrongChain0Trailer = 7,
48 : kWrongChain1Header = 8,
49 : kWrongChain1Trailer = 9,
50 : kIncorrectLUT = 10
51 : };
52 :
53 0 : Int_t GetTRMBunchID() {return fBunchID;};
54 :
55 0 : void SetPrintout(Bool_t pp ) {fPrintout = pp;}
56 : UInt_t GetChannel(Int_t iTRM, Int_t iTDC, Int_t iChain, Int_t ichannel);
57 : protected :
58 :
59 : AliRawReader* fRawReader; // object for reading the raw data
60 : UChar_t* fData; // raw data
61 : Int_t fPosition; // current (32 bit) position in fData
62 : Int_t fBunchID; //bunchID from TRM chain header
63 : Bool_t fPrintout; // advanced printout
64 : Int_t fAllData[1000]; // container for raw data
65 :
66 4 : ClassDef(AliFITRawReader,1) //class for reading FIT Raw data
67 : };
68 :
69 : #endif
|