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 */
6 /////////////////////////////////////////////////////////////////////////////////////////
8 // Raw data processing base class //
10 /////////////////////////////////////////////////////////////////////////////////////////
14 class AliAltroMapping;
15 class AliAltroRawStream;
17 class AliTPCAltroMapping;
18 class AliTPCRawStreamFast;
19 class AliTPCRawStream;
21 class TTreeSRedirector;
22 struct eventHeaderStruct;
24 class AliTPCCalibRawBase : public TNamed {
29 AliTPCCalibRawBase(const AliTPCCalibRawBase &calib);
31 AliTPCCalibRawBase& operator = (const AliTPCCalibRawBase &source);
33 virtual ~AliTPCCalibRawBase();
36 Bool_t ProcessEventFast(AliTPCRawStreamFast *rawStreamFast);
37 Bool_t ProcessEventFast(AliRawReader *rawReader);
39 Bool_t ProcessEvent(AliTPCRawStream *rawStream);
40 Bool_t ProcessEvent(AliRawReader *rawReader);
41 Bool_t ProcessEvent(eventHeaderStruct *event);
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; }
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; }
51 void SetUseL1Phase(Bool_t useL1Phase=kTRUE) {fUseL1Phase=useL1Phase;}
53 Int_t GetFirstTimeBin() const { return fFirstTimeBin; }
54 Int_t GetLastTimeBin() const { return fLastTimeBin; }
55 Int_t GetNevents() const { return fNevents; }
57 Double_t GetL1Phase() const {return fAltroL1Phase;}
58 Double_t GetL1PhaseTB() const {return fAltroL1PhaseTB;}
59 Bool_t GetUseL1Phase()const {return fUseL1Phase;}
61 UInt_t GetTimeStamp() const {return fTimeStamp;}
62 UInt_t GetRunNumber() const {return fRunNumber;}
63 UInt_t GetEventType() const {return fEventType;}
65 AliTPCAltroMapping **GetAltroMapping() { return fMapping; }
66 const AliAltroRawStream *GetAltroRawStream() {return fAltroRawStream;}
67 const AliTPCROC *GetTPCROC() {return fROC;}
69 void IncrementNevents(){++fNevents;}
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;}
80 Int_t fFirstTimeBin; // First Time bin used for analysis
81 Int_t fLastTimeBin; // Last Time bin used for analysis
83 Int_t fNevents; // Number of processed events
85 Int_t fDebugLevel; //! debug level
86 Int_t fStreamLevel; //! level of streamer output
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
92 Double_t fAltroL1Phase; //! L1 Phase
93 Float_t fAltroL1PhaseTB; //! L1 Phase in time bins
94 Bool_t fUseL1Phase; // use L1 Phase information?
96 TTreeSRedirector *fDebugStreamer; //! debug streamer
98 AliAltroRawStream *fAltroRawStream; //! pointer to the altro object
99 AliTPCAltroMapping **fMapping; //! Altro Mapping object
101 AliTPCROC *fROC; //! ROC information
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
107 ClassDef(AliTPCCalibRawBase,1) // Calibration base class for raw data processing