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