Line data Source code
1 : #ifndef ALIACORDERAWREADER_H
2 : #define ALIACORDERAWREADER_H
3 : /***************************************************************************
4 : * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
5 : * reserved.
6 : *
7 : * See cxx source for full Copyright notice
8 : ***************************************************************************/
9 : // Authors:
10 : // Mario Rodriguez Cahuantzi <mrodrigu@mail.cern.ch>
11 : // Arturo Fernandez Tellez <afernan@mail.cern.ch>
12 :
13 : #include <TNamed.h>
14 : #include "AliRawReader.h"
15 :
16 :
17 : class AliACORDERawReader : public TNamed {
18 : public :
19 :
20 : AliACORDERawReader(AliRawReader *rawReader,Bool_t isOnline = kFALSE) ;
21 : //AliACORDERawReader(AliRawReader *rawReader,Bool_t isOnline = kTRUE) ;
22 :
23 : virtual ~AliACORDERawReader();
24 0 : AliACORDERawReader(const AliACORDERawReader& o): TNamed(o),fRawReader(0),fData(NULL),fPosition(0),fIsOnline(kFALSE),fDataSize(0)
25 0 : {
26 0 : fWord[0] = fWord[1] = fWord[2] = fWord[3] = 0;
27 0 : }
28 :
29 0 : AliACORDERawReader& operator=(const AliACORDERawReader&) { return *this; }
30 :
31 :
32 : Bool_t Next(); //read next raw digit
33 : Int_t GetPosition();
34 : UInt_t GetNextWord();
35 0 : Int_t GetData( Int_t channel, Int_t hit) {return fAllData[channel][hit];}
36 :
37 :
38 : enum EACORDERawReaderError {
39 : kIncorrectDataSize = 1,
40 : kWrongDRMHeader = 2,
41 : kWrongDRMTrailer = 3,
42 : kWrongTRMHeader = 4,
43 : kWrongTRMTrailer = 5,
44 : kWrongChain0Header = 6,
45 : kWrongChain0Trailer = 7,
46 : kWrongChain1Header = 8,
47 : kWrongChain1Trailer = 9,
48 : kIncorrectLUT = 10
49 : };
50 :
51 0 : Bool_t IsOnlineMode () {return fIsOnline;}
52 :
53 : protected :
54 :
55 : AliRawReader* fRawReader; // object for reading the raw data
56 : UChar_t* fData; // raw data
57 : Int_t fPosition; // current (32 bit) position in fData
58 : Bool_t fIsOnline; // for case online DA usage
59 : UInt_t fWord[4]; // data vector
60 : Int_t fDataSize; // data size
61 : Int_t fAllData[110][50]; // container for raw data
62 :
63 : enum EACORDERawStreamError {
64 : kRawDataSizeErr = 1
65 : };
66 :
67 12 : ClassDef(AliACORDERawReader,3) //class for reading ACORDE Raw data
68 : };
69 :
70 : #endif
|