]>
Commit | Line | Data |
---|---|---|
51504028 | 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 | ||
f21fc003 | 13 | #include <TNamed.h> |
51504028 | 14 | #include "AliRawReader.h" |
15 | ||
16 | ||
f21fc003 | 17 | class AliACORDERawReader : public TNamed { |
51504028 | 18 | public : |
19 | ||
20 | AliACORDERawReader(AliRawReader *rawReader,Bool_t isOnline = kFALSE) ; | |
21 | //AliACORDERawReader(AliRawReader *rawReader,Bool_t isOnline = kTRUE) ; | |
22 | ||
23 | virtual ~AliACORDERawReader(); | |
f21fc003 | 24 | AliACORDERawReader(const AliACORDERawReader& o): TNamed(o),fRawReader(0),fData(NULL),fPosition(0),fIsOnline(kFALSE),fDataSize(0) |
ea3dd546 | 25 | { |
26 | fWord[0] = fWord[1] = fWord[2] = fWord[3] = 0; | |
27 | } | |
51504028 | 28 | |
29 | 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 | 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 | 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 | ||
f21fc003 | 67 | ClassDef(AliACORDERawReader,3) //class for reading ACORDE Raw data |
51504028 | 68 | }; |
69 | ||
70 | typedef AliACORDERawReader AliSTARTRawReader; // for backward compatibility | |
71 | ||
72 | #endif |