Using ProcessLine to avoid linking with libRAliEn.so
[u/mrichter/AliRoot.git] / T0 / AliT0RawReader.h
CommitLineData
dc7ca31d 1#ifndef ALIT0RAWREADER_H
2#define ALIT0RAWREADER_H
3
4#include <TTask.h>
5#include <Riostream.h>
dc7ca31d 6#include "AliRawReader.h"
807a797f 7#include "AliT0Parameters.h"
dc7ca31d 8
9class AliT0RawReader : public TTask {
10 public :
11
e0bba6cc 12 AliT0RawReader(AliRawReader *rawReader) ;
dc7ca31d 13
14 virtual ~AliT0RawReader();
c41ceaac 15 AliT0RawReader(const AliT0RawReader& o): TTask(o),
807a797f 16 fRawReader(0),
17 fData(NULL),
18 fPosition(0),
19 fParam(0)
20 {}
c41ceaac 21
e0bba6cc 22 AliT0RawReader& operator=(const AliT0RawReader&) { return *this; }
dc7ca31d 23
24
25 Bool_t Next(); //read next raw digit
26 Int_t GetPosition();
dc7ca31d 27 UInt_t GetNextWord();
e0bba6cc 28 Int_t GetData(Int_t channel, Int_t hit) {return fAllData[channel][hit];}
5325480c 29 // void SetNumberOfTRM(Int_t trm=2) {fNTRM=trm;}
aee6a11a 30
31 enum ET0RawReaderError {
32 kIncorrectDataSize = 1,
33 kWrongDRMHeader = 2,
34 kWrongDRMTrailer = 3,
35 kWrongTRMHeader = 4,
36 kWrongTRMTrailer = 5,
37 kWrongChain0Header = 6,
38 kWrongChain0Trailer = 7,
39 kWrongChain1Header = 8,
40 kWrongChain1Trailer = 9,
41 kIncorrectLUT = 10
42 };
43
44
dc7ca31d 45 protected :
46
dc7ca31d 47 AliRawReader* fRawReader; // object for reading the raw data
dc7ca31d 48 UChar_t* fData; // raw data
49 Int_t fPosition; // current (32 bit) position in fData
807a797f 50 AliT0Parameters *fParam;
5325480c 51 // Int_t fNTRM; //number of TRMs, 1 - testbeam; 2 - simulation
807a797f 52
e0bba6cc 53 Int_t fAllData[110][5];
dc7ca31d 54
807a797f 55 ClassDef(AliT0RawReader,1) //class for reading T0 Raw data
dc7ca31d 56};
57
58typedef AliT0RawReader AliSTARTRawReader; // for backward compatibility
59
60#endif