]>
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 | ||
13 | #include <TTask.h> | |
14 | #include "AliRawReader.h" | |
15 | ||
16 | ||
17 | class AliACORDERawReader : public TTask { | |
18 | public : | |
19 | ||
20 | AliACORDERawReader(AliRawReader *rawReader,Bool_t isOnline = kFALSE) ; | |
21 | //AliACORDERawReader(AliRawReader *rawReader,Bool_t isOnline = kTRUE) ; | |
22 | ||
23 | virtual ~AliACORDERawReader(); | |
1d249900 | 24 | AliACORDERawReader(const AliACORDERawReader& o): TTask(o),fRawReader(0),fData(NULL),fPosition(0),fIsOnline(kFALSE),fDataSize(0) {} |
51504028 | 25 | |
26 | AliACORDERawReader& operator=(const AliACORDERawReader&) { return *this; } | |
27 | ||
28 | ||
29 | Bool_t Next(); //read next raw digit | |
30 | Int_t GetPosition(); | |
31 | UInt_t GetNextWord(); | |
32 | Int_t GetData( Int_t channel, Int_t hit) {return fAllData[channel][hit];} | |
33 | ||
34 | ||
35 | enum EACORDERawReaderError { | |
36 | kIncorrectDataSize = 1, | |
37 | kWrongDRMHeader = 2, | |
38 | kWrongDRMTrailer = 3, | |
39 | kWrongTRMHeader = 4, | |
40 | kWrongTRMTrailer = 5, | |
41 | kWrongChain0Header = 6, | |
42 | kWrongChain0Trailer = 7, | |
43 | kWrongChain1Header = 8, | |
44 | kWrongChain1Trailer = 9, | |
45 | kIncorrectLUT = 10 | |
46 | }; | |
47 | ||
48 | Bool_t IsOnlineMode () {return fIsOnline;} | |
49 | ||
50 | protected : | |
51 | ||
52 | AliRawReader* fRawReader; // object for reading the raw data | |
53 | UChar_t* fData; // raw data | |
54 | Int_t fPosition; // current (32 bit) position in fData | |
55 | Bool_t fIsOnline; // for case online DA usage | |
56 | UInt_t fWord[4]; // data vector | |
57 | Int_t fDataSize; // data size | |
58 | Int_t fAllData[110][50]; // container for raw data | |
59 | ||
60 | enum EACORDERawStreamError { | |
61 | kRawDataSizeErr = 1 | |
62 | }; | |
63 | ||
64 | ClassDef(AliACORDERawReader,2) //class for reading ACORDE Raw data | |
65 | }; | |
66 | ||
67 | typedef AliACORDERawReader AliSTARTRawReader; // for backward compatibility | |
68 | ||
69 | #endif |