AliRoot Core  3dc7879 (3dc7879)
AliTPCCalibRawBase.h
Go to the documentation of this file.
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 
8 
9 #include <TNamed.h>
10 
11 class AliAltroMapping;
12 class AliAltroRawStream;
13 class AliRawReader;
14 class AliTPCAltroMapping;
15 class AliTPCRawStreamV3;
16 class AliTPCROC;
17 class TTreeSRedirector;
18 class TCollection;
19 struct eventHeaderStruct;
20 
21 class AliTPCCalibRawBase : public TNamed {
22 
23 
24 public:
27 
29 
30  virtual ~AliTPCCalibRawBase();
31 
32  //uses the new decoder which is compatible with the new altro format
33  Bool_t ProcessEvent(AliTPCRawStreamV3 * const rawStreamV3);
34  Bool_t ProcessEvent(AliRawReader * const rawReader);
35  Bool_t ProcessEvent(eventHeaderStruct * const event);
36 
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; }
39  virtual void UpdateDDL() {return;}
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; }
42  virtual void Analyse(){ return; }
43 
44  virtual Long64_t Merge(TCollection * /*list*/) {return 0;}
45  void MergeBase(const AliTPCCalibRawBase *calib);
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  void SetTimeStampEvent(UInt_t timestamp){ fTimeStamp = timestamp; }
54  void SetRunNumber(UInt_t eventnumber){ fRunNumber = eventnumber; }
55 
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 //
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;}
70  //
72  const AliAltroRawStream *GetAltroRawStream() const {return fAltroRawStream;}
73  const AliTPCROC *GetTPCROC() const {return fROC;}
74  //
76  //
77  virtual void DumpToFile(const Char_t *filename, const Char_t *dir="", Bool_t append=kFALSE);
78  // debug and debug streamer support
81  void SetDebugLevel(Int_t level) {fDebugLevel = level;}
82  Int_t GetStreamLevel() const {return fStreamLevel;}
83  Int_t GetDebugLevel() const {return fDebugLevel;}
84 
85 protected:
86  Int_t fFirstTimeBin;
87  Int_t fLastTimeBin;
88 
89  Int_t fNevents;
90 
91  Int_t fDebugLevel;
92  Int_t fStreamLevel;
93  //
94  UInt_t fRunNumber;
95  UInt_t fFirstTimeStamp;
96  UInt_t fLastTimeStamp;
97  UInt_t fTimeStamp;
98  UInt_t fEventType;
99  //
100  Double_t fAltroL1Phase;
101  Float_t fAltroL1PhaseTB;
102  Int_t fCurrRCUId;
103  Int_t fPrevRCUId;
104  Int_t fCurrDDLNum;
105  Int_t fPrevDDLNum;
106  Bool_t fUseL1Phase;
107  //
109  //
110  AliAltroRawStream *fAltroRawStream;
112 
114 
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
117 
119  ClassDef(AliTPCCalibRawBase,3) // Calibration base class for raw data processing
121 };
122 
123 
124 #endif
125 
Double_t GetL1PhaseTB() const
void SetDebugLevel(Int_t level)
UInt_t fFirstTimeStamp
First event time stamp.
const AliAltroRawStream * GetAltroRawStream() const
AliAltroRawStream * fAltroRawStream
! pointer to the altro object
Int_t streamLevel
Int_t GetDebugLevel() const
virtual void UpdateDDL()
virtual void EndEvent()
void SetTimeStampEvent(UInt_t timestamp)
Int_t fNevents
Number of processed events.
void MergeBase(const AliTPCCalibRawBase *calib)
void SetRunNumber(UInt_t eventnumber)
virtual void DumpToFile(const Char_t *filename, const Char_t *dir="", Bool_t append=kFALSE)
UInt_t GetLastTimeStamp() const
Bool_t ProcessEvent(AliTPCRawStreamV3 *const rawStreamV3)
Int_t fLastTimeBin
Last Time bin used for analysis.
Base class for the calibration algorithms using raw data as input.
Double_t GetL1Phase() const
TTreeSRedirector * GetDebugStreamer()
Double_t fAltroL1Phase
! L1 Phase
AliTPCCalibRawBase & operator=(const AliTPCCalibRawBase &source)
Bool_t GetUseL1Phase() const
This class provides access to TPC digits in raw data.
UInt_t GetFirstTimeStamp() const
AliTPCROC * fROC
! ROC information
Int_t fFirstTimeBin
First Time bin used for analysis.
Int_t GetFirstTimeBin() const
UInt_t GetTimeStamp() const
UInt_t fEventType
! current event Type from event header
Geometry class for a single ROC.
Definition: AliTPCROC.h:14
Int_t fStreamLevel
! level of streamer output
Float_t fAltroL1PhaseTB
! L1 Phase in time bins
Int_t fCurrDDLNum
! Current DDL number
void SetStreamLevel(Int_t streamLevel)
virtual Long64_t Merge(TCollection *)
void SetUseL1Phase(Bool_t useL1Phase=kTRUE)
UInt_t GetRunNumber() const
Int_t GetLastTimeBin() const
UInt_t fTimeStamp
! time stamp from event header
Int_t GetNevents() const
const AliTPCROC * GetTPCROC() const
Int_t fPrevRCUId
! Previous RCU Id
Int_t fCurrRCUId
! Current RCU Id
AliTPCAltroMapping ** fMapping
! Altro Mapping object
AliTPCAltroMapping ** GetAltroMapping()
virtual Int_t Update(const Int_t, const Int_t, const Int_t, const Int_t, const Float_t)
void SetRangeTime(Int_t firstTimeBin, Int_t lastTimeBin)
Int_t GetStreamLevel() const
TTreeSRedirector * fDebugStreamer
! debug streamer
virtual void ProcessBunch(const Int_t, const Int_t, const Int_t, const Int_t, const UInt_t, const UShort_t *)
UInt_t GetEventType() const
void SetAltroMapping(AliTPCAltroMapping **mapp)
virtual void Analyse()
Int_t fPrevDDLNum
! Current DDL number
UInt_t fLastTimeStamp
Last event time stamp.
virtual void ResetEvent()
UInt_t fRunNumber
current run number from event header
Bool_t fUseL1Phase
use L1 Phase information?
Int_t fDebugLevel
! debug level