]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/AliTPCCalibRawBase.h
TPC CA Global Merger component added
[u/mrichter/AliRoot.git] / TPC / AliTPCCalibRawBase.h
CommitLineData
880c3382 1#ifndef ALITPCCALIBRAWBASE_H
2#define ALITPCCALIBRAWBASE_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/////////////////////////////////////////////////////////////////////////////////////////
7// //
8// Raw data processing base class //
9// //
10/////////////////////////////////////////////////////////////////////////////////////////
11
12#include <TNamed.h>
13
14class AliAltroMapping;
15class AliAltroRawStream;
16class AliRawReader;
17class AliTPCAltroMapping;
18class AliTPCRawStreamFast;
19class AliTPCRawStream;
20class AliTPCROC;
21class TTreeSRedirector;
22struct eventHeaderStruct;
23
24class AliTPCCalibRawBase : public TNamed {
25
26
27public:
28 AliTPCCalibRawBase();
29 AliTPCCalibRawBase(const AliTPCCalibRawBase &calib);
30
31 AliTPCCalibRawBase& operator = (const AliTPCCalibRawBase &source);
32
33 virtual ~AliTPCCalibRawBase();
34
35
36 Bool_t ProcessEventFast(AliTPCRawStreamFast *rawStreamFast);
37 Bool_t ProcessEventFast(AliRawReader *rawReader);
38
39 Bool_t ProcessEvent(AliTPCRawStream *rawStream);
40 Bool_t ProcessEvent(AliRawReader *rawReader);
41 Bool_t ProcessEvent(eventHeaderStruct *event);
42
43 virtual Int_t Update(const Int_t /*isector*/, const Int_t /*iRow*/, const Int_t /*iPad*/,
44 const Int_t /*iTimeBin*/, const Float_t /*signal*/) { return 0; }
45 virtual void Analyse(){ return; }
46
47 //Setters
48 void SetRangeTime (Int_t firstTimeBin, Int_t lastTimeBin) { fFirstTimeBin=firstTimeBin; fLastTimeBin=lastTimeBin; } //Set range in which the signal is expected
49 void SetAltroMapping(AliTPCAltroMapping **mapp) { fMapping = mapp; }
50 //
51 void SetUseL1Phase(Bool_t useL1Phase=kTRUE) {fUseL1Phase=useL1Phase;}
52 //
53 Int_t GetFirstTimeBin() const { return fFirstTimeBin; }
54 Int_t GetLastTimeBin() const { return fLastTimeBin; }
55 Int_t GetNevents() const { return fNevents; }
56 //
57 Double_t GetL1Phase() const {return fAltroL1Phase;}
58 Double_t GetL1PhaseTB() const {return fAltroL1PhaseTB;}
59 Bool_t GetUseL1Phase()const {return fUseL1Phase;}
60//
61 UInt_t GetTimeStamp() const {return fTimeStamp;}
62 UInt_t GetRunNumber() const {return fRunNumber;}
63 UInt_t GetEventType() const {return fEventType;}
64 //
65 AliTPCAltroMapping **GetAltroMapping() { return fMapping; }
66 const AliAltroRawStream *GetAltroRawStream() {return fAltroRawStream;}
67 const AliTPCROC *GetTPCROC() {return fROC;}
68 //
69 void IncrementNevents(){++fNevents;}
70 //
71 void DumpToFile(const Char_t *filename, const Char_t *dir="", Bool_t append=kFALSE);
72 // debug and debug streamer support
73 TTreeSRedirector *GetDebugStreamer();
74 void SetStreamLevel(Int_t streamLevel){fStreamLevel=streamLevel;}
75 void SetDebugLevel(Int_t level) {fDebugLevel = level;}
76 Int_t GetStreamLevel() const {return fStreamLevel;}
77 Int_t GetDebugLevel() const {return fDebugLevel;}
78
79protected:
80 Int_t fFirstTimeBin; // First Time bin used for analysis
81 Int_t fLastTimeBin; // Last Time bin used for analysis
82
83 Int_t fNevents; // Number of processed events
84
85 Int_t fDebugLevel; //! debug level
86 Int_t fStreamLevel; //! level of streamer output
87 //
88 UInt_t fTimeStamp; //! time stamp from event header
89 UInt_t fRunNumber; //! current run number from event header
90 UInt_t fEventType; //! current event Type from event header
91 //
92 Double_t fAltroL1Phase; //! L1 Phase
93 Float_t fAltroL1PhaseTB; //! L1 Phase in time bins
94 Bool_t fUseL1Phase; // use L1 Phase information?
95 //
96 TTreeSRedirector *fDebugStreamer; //! debug streamer
97 //
98 AliAltroRawStream *fAltroRawStream; //! pointer to the altro object
99 AliTPCAltroMapping **fMapping; //! Altro Mapping object
100
101 AliTPCROC *fROC; //! ROC information
102
103 virtual void EndEvent() {++fNevents; return; } //fNevents should be updated in the derived classes in a proper place
104 virtual void ResetEvent(){ return; } //Reset Event counters
105
106
107 ClassDef(AliTPCCalibRawBase,1) // Calibration base class for raw data processing
108
109};
110
111#endif
112