]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/AliTPCCalibRawBase.h
Bug fix
[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;
c3066940 19class AliTPCRawStreamV3;
880c3382 20class AliTPCRawStream;
21class AliTPCROC;
22class TTreeSRedirector;
23struct eventHeaderStruct;
24
25class AliTPCCalibRawBase : public TNamed {
26
27
28public:
29 AliTPCCalibRawBase();
30 AliTPCCalibRawBase(const AliTPCCalibRawBase &calib);
31
32 AliTPCCalibRawBase& operator = (const AliTPCCalibRawBase &source);
33
34 virtual ~AliTPCCalibRawBase();
35
36
37 Bool_t ProcessEventFast(AliTPCRawStreamFast *rawStreamFast);
38 Bool_t ProcessEventFast(AliRawReader *rawReader);
c3066940 39
40 //uses the new decoder which is compatible with the new altro format
41 Bool_t ProcessEvent(AliTPCRawStreamV3 *rawStreamV3);
42 Bool_t ProcessEvent(AliRawReader *rawReader);
880c3382 43 Bool_t ProcessEvent(eventHeaderStruct *event);
c3066940 44
45 //For using the old decoder use the following functions
46 Bool_t ProcessEvent(AliTPCRawStream *rawStream);
47 Bool_t ProcessEventOld(AliRawReader *rawReader);
880c3382 48
49 virtual Int_t Update(const Int_t /*isector*/, const Int_t /*iRow*/, const Int_t /*iPad*/,
50 const Int_t /*iTimeBin*/, const Float_t /*signal*/) { return 0; }
51 virtual void Analyse(){ return; }
52
53 //Setters
54 void SetRangeTime (Int_t firstTimeBin, Int_t lastTimeBin) { fFirstTimeBin=firstTimeBin; fLastTimeBin=lastTimeBin; } //Set range in which the signal is expected
55 void SetAltroMapping(AliTPCAltroMapping **mapp) { fMapping = mapp; }
56 //
57 void SetUseL1Phase(Bool_t useL1Phase=kTRUE) {fUseL1Phase=useL1Phase;}
c3066940 58 //
59 void SetTimeStampEvent(UInt_t timestamp){ fTimeStamp = timestamp; }
60 void SetRunNumber(UInt_t eventnumber){ fRunNumber = eventnumber; }
61
880c3382 62 //
63 Int_t GetFirstTimeBin() const { return fFirstTimeBin; }
64 Int_t GetLastTimeBin() const { return fLastTimeBin; }
65 Int_t GetNevents() const { return fNevents; }
66 //
67 Double_t GetL1Phase() const {return fAltroL1Phase;}
68 Double_t GetL1PhaseTB() const {return fAltroL1PhaseTB;}
69 Bool_t GetUseL1Phase()const {return fUseL1Phase;}
70//
880c3382 71 UInt_t GetRunNumber() const {return fRunNumber;}
c3066940 72 UInt_t GetTimeStamp() const {return fTimeStamp;}
880c3382 73 UInt_t GetEventType() const {return fEventType;}
74 //
75 AliTPCAltroMapping **GetAltroMapping() { return fMapping; }
76 const AliAltroRawStream *GetAltroRawStream() {return fAltroRawStream;}
77 const AliTPCROC *GetTPCROC() {return fROC;}
78 //
79 void IncrementNevents(){++fNevents;}
80 //
81 void DumpToFile(const Char_t *filename, const Char_t *dir="", Bool_t append=kFALSE);
82 // debug and debug streamer support
83 TTreeSRedirector *GetDebugStreamer();
84 void SetStreamLevel(Int_t streamLevel){fStreamLevel=streamLevel;}
85 void SetDebugLevel(Int_t level) {fDebugLevel = level;}
86 Int_t GetStreamLevel() const {return fStreamLevel;}
87 Int_t GetDebugLevel() const {return fDebugLevel;}
88
89protected:
90 Int_t fFirstTimeBin; // First Time bin used for analysis
91 Int_t fLastTimeBin; // Last Time bin used for analysis
92
93 Int_t fNevents; // Number of processed events
94
95 Int_t fDebugLevel; //! debug level
96 Int_t fStreamLevel; //! level of streamer output
97 //
c3066940 98 UInt_t fRunNumber; // current run number from event header
880c3382 99 UInt_t fTimeStamp; //! time stamp from event header
880c3382 100 UInt_t fEventType; //! current event Type from event header
101 //
102 Double_t fAltroL1Phase; //! L1 Phase
103 Float_t fAltroL1PhaseTB; //! L1 Phase in time bins
c3066940 104 Int_t fCurrRCUId; //! Current RCU Id
105 Int_t fPrevRCUId; //! Previous RCU Id
106 Int_t fCurrDDLNum; //! Current DDL number
107 Int_t fPrevDDLNum; //! Current DDL number
880c3382 108 Bool_t fUseL1Phase; // use L1 Phase information?
109 //
110 TTreeSRedirector *fDebugStreamer; //! debug streamer
111 //
112 AliAltroRawStream *fAltroRawStream; //! pointer to the altro object
113 AliTPCAltroMapping **fMapping; //! Altro Mapping object
114
115 AliTPCROC *fROC; //! ROC information
116
117 virtual void EndEvent() {++fNevents; return; } //fNevents should be updated in the derived classes in a proper place
118 virtual void ResetEvent(){ return; } //Reset Event counters
119
120
c3066940 121 ClassDef(AliTPCCalibRawBase,2) // Calibration base class for raw data processing
880c3382 122
123};
124
125#endif
126