]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/TPCbase/AliTPCCalibRawBase.h
doxy: TPC/TPCbase converted
[u/mrichter/AliRoot.git] / TPC / TPCbase / 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
7d855b04 6/// \class AliTPCCalibRawBase
7/// \brief Raw data processing base class
880c3382 8
9#include <TNamed.h>
10
11class AliAltroMapping;
12class AliAltroRawStream;
13class AliRawReader;
14class AliTPCAltroMapping;
c3066940 15class AliTPCRawStreamV3;
880c3382 16class AliTPCROC;
17class TTreeSRedirector;
7442bceb 18class TCollection;
880c3382 19struct eventHeaderStruct;
20
21class AliTPCCalibRawBase : public TNamed {
22
23
24public:
25 AliTPCCalibRawBase();
26 AliTPCCalibRawBase(const AliTPCCalibRawBase &calib);
27
28 AliTPCCalibRawBase& operator = (const AliTPCCalibRawBase &source);
29
30 virtual ~AliTPCCalibRawBase();
7d855b04 31
c3066940 32 //uses the new decoder which is compatible with the new altro format
7442bceb 33 Bool_t ProcessEvent(AliTPCRawStreamV3 * const rawStreamV3);
34 Bool_t ProcessEvent(AliRawReader * const rawReader);
35 Bool_t ProcessEvent(eventHeaderStruct * const event);
c3066940 36
880c3382 37 virtual Int_t Update(const Int_t /*isector*/, const Int_t /*iRow*/, const Int_t /*iPad*/,
38 const Int_t /*iTimeBin*/, const Float_t /*signal*/) { return 0; }
5312f439 39 virtual void UpdateDDL() {return;}
96bf9029 40 virtual void ProcessBunch(const Int_t /*sector*/, const Int_t /*row*/, const Int_t /*pad*/,
41 const Int_t /*length*/, const UInt_t /*startTimeBin*/, const UShort_t* /*signal*/) {return; }
880c3382 42 virtual void Analyse(){ return; }
7d855b04 43
7442bceb 44 virtual Long64_t Merge(TCollection * /*list*/) {return 0;}
78f17711 45 void MergeBase(const AliTPCCalibRawBase *calib);
7d855b04 46
7442bceb 47 //Setters
880c3382 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;}
c3066940 52 //
53 void SetTimeStampEvent(UInt_t timestamp){ fTimeStamp = timestamp; }
54 void SetRunNumber(UInt_t eventnumber){ fRunNumber = eventnumber; }
55
880c3382 56 //
57 Int_t GetFirstTimeBin() const { return fFirstTimeBin; }
58 Int_t GetLastTimeBin() const { return fLastTimeBin; }
59 Int_t GetNevents() const { return fNevents; }
60 //
61 Double_t GetL1Phase() const {return fAltroL1Phase;}
62 Double_t GetL1PhaseTB() const {return fAltroL1PhaseTB;}
63 Bool_t GetUseL1Phase()const {return fUseL1Phase;}
64//
78f17711 65 UInt_t GetRunNumber() const {return fRunNumber;}
66 UInt_t GetFirstTimeStamp() const {return fFirstTimeStamp;}
67 UInt_t GetLastTimeStamp() const {return fLastTimeStamp;}
68 UInt_t GetTimeStamp() const {return fTimeStamp;}
69 UInt_t GetEventType() const {return fEventType;}
880c3382 70 //
71 AliTPCAltroMapping **GetAltroMapping() { return fMapping; }
7442bceb 72 const AliAltroRawStream *GetAltroRawStream() const {return fAltroRawStream;}
73 const AliTPCROC *GetTPCROC() const {return fROC;}
880c3382 74 //
75 void IncrementNevents(){++fNevents;}
76 //
78f17711 77 virtual void DumpToFile(const Char_t *filename, const Char_t *dir="", Bool_t append=kFALSE);
880c3382 78 // debug and debug streamer support
79 TTreeSRedirector *GetDebugStreamer();
80 void SetStreamLevel(Int_t streamLevel){fStreamLevel=streamLevel;}
81 void SetDebugLevel(Int_t level) {fDebugLevel = level;}
82 Int_t GetStreamLevel() const {return fStreamLevel;}
83 Int_t GetDebugLevel() const {return fDebugLevel;}
7442bceb 84
880c3382 85protected:
7d855b04 86 Int_t fFirstTimeBin; ///< First Time bin used for analysis
87 Int_t fLastTimeBin; ///< Last Time bin used for analysis
88
89 Int_t fNevents; ///< Number of processed events
90
91 Int_t fDebugLevel; //!< debug level
92 Int_t fStreamLevel; //!< level of streamer output
880c3382 93 //
7d855b04 94 UInt_t fRunNumber; ///< current run number from event header
95 UInt_t fFirstTimeStamp; ///< First event time stamp
96 UInt_t fLastTimeStamp; ///< Last event time stamp
97 UInt_t fTimeStamp; //!< time stamp from event header
98 UInt_t fEventType; //!< current event Type from event header
880c3382 99 //
7d855b04 100 Double_t fAltroL1Phase; //!< L1 Phase
101 Float_t fAltroL1PhaseTB; //!< L1 Phase in time bins
102 Int_t fCurrRCUId; //!< Current RCU Id
103 Int_t fPrevRCUId; //!< Previous RCU Id
104 Int_t fCurrDDLNum; //!< Current DDL number
105 Int_t fPrevDDLNum; //!< Current DDL number
106 Bool_t fUseL1Phase; ///< use L1 Phase information?
880c3382 107 //
7d855b04 108 TTreeSRedirector *fDebugStreamer; //!< debug streamer
880c3382 109 //
7d855b04 110 AliAltroRawStream *fAltroRawStream; //!< pointer to the altro object
111 AliTPCAltroMapping **fMapping; //!< Altro Mapping object
112
113 AliTPCROC *fROC; //!< ROC information
880c3382 114
880c3382 115 virtual void EndEvent() {++fNevents; return; } //fNevents should be updated in the derived classes in a proper place
116 virtual void ResetEvent(){ return; } //Reset Event counters
7d855b04 117
118 /// \cond CLASSIMP
78f17711 119 ClassDef(AliTPCCalibRawBase,3) // Calibration base class for raw data processing
7d855b04 120 /// \endcond
880c3382 121};
122
78f17711 123
880c3382 124#endif
125