correct warnings
[u/mrichter/AliRoot.git] / T0 / AliT0RawReader.h
CommitLineData
dc7ca31d 1#ifndef ALIT0RAWREADER_H
2#define ALIT0RAWREADER_H
f16935f7 3/***************************************************************************
4 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
5 * reserved.
6 *
7 * Alla Maevskaya INR RAS alla@inr.ru
8 *
9 * See cxx source for full Copyright notice
10 ***************************************************************************/
11
dc7ca31d 12
13#include <TTask.h>
dc7ca31d 14#include "AliRawReader.h"
807a797f 15#include "AliT0Parameters.h"
f16935f7 16
17
dc7ca31d 18class AliT0RawReader : public TTask {
19 public :
20
2de29203 21 AliT0RawReader(AliRawReader *rawReader,Bool_t isOnline = kFALSE) ;
22// AliT0RawReader(AliRawReader *rawReader,Bool_t isOnline = kTRUE) ;
dc7ca31d 23
24 virtual ~AliT0RawReader();
c41ceaac 25 AliT0RawReader(const AliT0RawReader& o): TTask(o),
807a797f 26 fRawReader(0),
27 fData(NULL),
28 fPosition(0),
f8bea420 29 fParam(0),
30 fIsOnline(kFALSE)
807a797f 31 {}
c41ceaac 32
e0bba6cc 33 AliT0RawReader& operator=(const AliT0RawReader&) { return *this; }
dc7ca31d 34
35
36 Bool_t Next(); //read next raw digit
37 Int_t GetPosition();
dc7ca31d 38 UInt_t GetNextWord();
f16935f7 39 Int_t GetData( Int_t channel, Int_t hit) {return fAllData[channel][hit];}
40
aee6a11a 41
42 enum ET0RawReaderError {
43 kIncorrectDataSize = 1,
44 kWrongDRMHeader = 2,
45 kWrongDRMTrailer = 3,
46 kWrongTRMHeader = 4,
47 kWrongTRMTrailer = 5,
48 kWrongChain0Header = 6,
49 kWrongChain0Trailer = 7,
50 kWrongChain1Header = 8,
51 kWrongChain1Trailer = 9,
52 kIncorrectLUT = 10
53 };
54
f8bea420 55 Bool_t IsOnlineMode () {return fIsOnline;}
8f620945 56 Int_t GetTRMBunchID() {return fBunchID;};
57
58 void SetPrintout(Bool_t pp ) {fPrintout = pp;}
f8bea420 59
dc7ca31d 60 protected :
61
dc7ca31d 62 AliRawReader* fRawReader; // object for reading the raw data
dc7ca31d 63 UChar_t* fData; // raw data
64 Int_t fPosition; // current (32 bit) position in fData
f16935f7 65 AliT0Parameters *fParam; // instanse of Parameters class
66 Bool_t fIsOnline; // for case online DA usage
8f620945 67 Int_t fBunchID; //bunchID from TRM chain header
68 Bool_t fPrintout; // advanced printout
5ed41460 69 Int_t fAllData[110][5]; // container for raw data
dc7ca31d 70
8f620945 71 ClassDef(AliT0RawReader,3) //class for reading T0 Raw data
dc7ca31d 72};
73
74typedef AliT0RawReader AliSTARTRawReader; // for backward compatibility
75
76#endif