1 #ifndef ALITRDDATADCS_H
2 #define ALITRDDATADCS_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
9 ////////////////////////////////////////////////////////////////////////////
11 // Extracts the DCS information //
13 ////////////////////////////////////////////////////////////////////////////
24 class AliTRDDataDCS : public TNamed
32 Bool_t ExtractDCS (TMap * aliDCS);
37 UInt_t GetNAlias () const {return fNAlias;}
38 TString GetAmandaStr (UInt_t iAlias) const;
39 UInt_t GetNChannel (UInt_t iAlias) const;
41 TGraph * GetGraph (UInt_t iAlias, UInt_t iChannel = 0) const;
42 AliSplineFit * GetFit (UInt_t iAlias, UInt_t iChannel = 0) const;
45 TGraph * GetGraphChamberByteStatus (UInt_t iSensor) const {return GetGraph (kChamberByteStatus, iSensor);}
46 TGraph * GetGraphPreTrigger () const {return GetGraph (kPreTrigger);}
47 TGraph * GetGraphGoofyHv () const {return GetGraph (kGoofyHv);}
48 TGraph * GetGraphGoofyPeakPos (UInt_t iSensor) const {return GetGraph (kGoofyPeakPos, iSensor);}
49 TGraph * GetGraphGoofyPeakArea (UInt_t iSensor) const {return GetGraph (kGoofyPeakArea, iSensor);}
50 TGraph * GetGraphGoofyTemp (UInt_t iSensor) const {return GetGraph (kGoofyTemp, iSensor);}
51 TGraph * GetGraphGoofyPressure () const {return GetGraph (kGoofyPressure);}
52 TGraph * GetGraphGoofyVelocity () const {return GetGraph (kGoofyVelocity);}
53 TGraph * GetGraphGoofyGain (UInt_t iSensor) const {return GetGraph (kGoofyGain, iSensor);}
54 TGraph * GetGraphGoofyCO2 () const {return GetGraph (kGoofyCO2);}
55 TGraph * GetGraphGoofyN2 () const {return GetGraph (kGoofyN2);}
56 TGraph * GetGraphGasO2 () const {return GetGraph (kGasO2);}
57 TGraph * GetGraphGasOverpressure () const {return GetGraph (kGasOverpressure);}
58 TGraph * GetGraphEnvTemp (UInt_t iSensor) const {return GetGraph (kEnvTemp, iSensor);}
59 TGraph * GetGraphHvAnodeImon (UInt_t iSensor) const {return GetGraph (kHvAnodeImon, iSensor);}
60 TGraph * GetGraphHvDriftImon (UInt_t iSensor) const {return GetGraph (kHvDriftImon, iSensor);}
61 TGraph * GetGraphHvAnodeUmon (UInt_t iSensor) const {return GetGraph (kHvAnodeUmon, iSensor);}
62 TGraph * GetGraphHvDriftUmon (UInt_t iSensor) const {return GetGraph (kHvDriftUmon, iSensor);}
63 TGraph * GetGraphAdcClkPhase () const {return GetGraph (kAdcClkPhase);}
64 TGraph * GetGraphAtmPressure () const {return GetGraph (kAtmPressure);}
65 TGraph * GetGraphLuminosity () const {return GetGraph (kLuminosity);}
66 TGraph * GetGraphMagneticField () const {return GetGraph (kMagneticField);}
68 AliSplineFit * GetFitChamberByteStatus (UInt_t iSensor) const {return GetFit (kChamberByteStatus, iSensor);}
69 AliSplineFit * GetFitPreTrigger () const {return GetFit (kPreTrigger);}
70 AliSplineFit * GetFitGoofyHv () const {return GetFit (kGoofyHv);}
71 AliSplineFit * GetFitGoofyPeakPos (UInt_t iSensor) const {return GetFit (kGoofyPeakPos, iSensor);}
72 AliSplineFit * GetFitGoofyPeakArea (UInt_t iSensor) const {return GetFit (kGoofyPeakArea, iSensor);}
73 AliSplineFit * GetFitGoofyTemp (UInt_t iSensor) const {return GetFit (kGoofyTemp, iSensor);}
74 AliSplineFit * GetFitGoofyPressure () const {return GetFit (kGoofyPressure);}
75 AliSplineFit * GetFitGoofyVelocity () const {return GetFit (kGoofyVelocity);}
76 AliSplineFit * GetFitGoofyGain (UInt_t iSensor) const {return GetFit (kGoofyGain, iSensor);}
77 AliSplineFit * GetFitGoofyCO2 () const {return GetFit (kGoofyCO2);}
78 AliSplineFit * GetFitGoofyN2 () const {return GetFit (kGoofyN2);}
79 AliSplineFit * GetFitGasO2 () const {return GetFit (kGasO2);}
80 AliSplineFit * GetFitGasOverpressure () const {return GetFit (kGasOverpressure);}
81 AliSplineFit * GetFitEnvTemp (UInt_t iSensor) const {return GetFit (kEnvTemp, iSensor);}
82 AliSplineFit * GetFitHvAnodeImon (UInt_t iSensor) const {return GetFit (kHvAnodeImon, iSensor);}
83 AliSplineFit * GetFitHvDriftImon (UInt_t iSensor) const {return GetFit (kHvDriftImon, iSensor);}
84 AliSplineFit * GetFitHvAnodeUmon (UInt_t iSensor) const {return GetFit (kHvAnodeUmon, iSensor);}
85 AliSplineFit * GetFitHvDriftUmon (UInt_t iSensor) const {return GetFit (kHvDriftUmon, iSensor);}
86 AliSplineFit * GetFitAdcClkPhase () const {return GetFit (kAdcClkPhase);}
87 AliSplineFit * GetFitAtmPressure () const {return GetFit (kAtmPressure);}
88 AliSplineFit * GetFitLuminosity () const {return GetFit (kLuminosity);}
89 AliSplineFit * GetFitMagneticField () const {return GetFit (kMagneticField);}
91 void Print (Option_t* option = "") const;
95 TGraph * FindAndMakeGraph (TMap * dcsMap, const char * amandaStr,
97 AliSplineFit * Fit (TGraph * graph,
98 Int_t kMinPoints, Int_t kIter,
99 Double_t kMaxDelta, Int_t kFitReq);
105 void SetConf (UInt_t iAlias, const char * amanda, char dataType, UInt_t nChannel,
106 Bool_t enableGraph, Bool_t enableFit, Int_t kMinPoints,
107 Int_t kIter, Double_t kMaxDelta, Int_t kFitReq);
111 enum { kChamberByteStatus = 0
123 , kGasOverpressure = 12
132 , kMagneticField = 21
135 Bool_t fGraphsAreIni; // Check whether graphs are initialized
136 Bool_t fFitsAreIni; // Check whether firs are initialized
137 UInt_t fNAlias; // Number of aliases
139 class AliTRDDataDCSdata {
144 virtual ~AliTRDDataDCSdata() { };
145 TObjArray GetFit() const { return fFit; }
146 TObjArray GetGraph() const { return fGraph; }
147 TObject* GetFit(Int_t i) const { return fFit[i]; }
148 TObject* GetGraph(Int_t i) const { return fGraph[i]; }
150 TObjArray fFit; // array of AliSplineFit
151 TObjArray fGraph; // array of TGraph
154 class AliTRDDataDCSconf {
166 virtual ~AliTRDDataDCSconf() { };
167 TString GetAmanda() const { return fAmanda; }
168 Char_t GetDataType() const { return fDataType; }
169 UInt_t GetNChannel() const { return fNChannel; }
170 Bool_t GetEnableGraph() const { return fEnableGraph; }
171 Bool_t GetEnableFit() const { return fEnableFit; }
172 Int_t GetMinPoints() const { return fMinPoints; }
173 Int_t GetIter() const { return fIter; }
174 Double_t GetMaxDelta() const { return fMaxDelta; }
175 Int_t GetFitReq() const { return fFitReq; }
176 void SetAmanda(TString s) { fAmanda = s; }
177 void SetDataType(Char_t d) { fDataType = d; }
178 void SetNChannel(UInt_t n) { fNChannel = n; }
179 void SetEnableGraph(Bool_t e) { fEnableGraph = e; }
180 void SetEnableFit(Bool_t e) { fEnableFit = e; }
181 void SetMinPoints(Int_t m) { fMinPoints = m; }
182 void SetIter(Int_t i) { fIter = i; }
183 void SetMaxDelta(Double_t m) { fMaxDelta = m; }
184 void SetFitReq(Int_t f) { fFitReq = f; }
186 TString fAmanda; // amanda string
187 Char_t fDataType; // 'c' for char, 'f' for float
188 UInt_t fNChannel; // number of channel
189 Bool_t fEnableGraph; // will be converted in TGraph
190 Bool_t fEnableFit; // will be converted in AliSplineFit
191 Int_t fMinPoints; // minimum number of points per knot in fit
192 Int_t fIter; // number of iterations for spline fit
193 Double_t fMaxDelta; // precision parameter for spline fit
194 Int_t fFitReq; // fit requirement, 2 = continuous 2nd derivative
197 AliTRDDataDCSdata fDatas [22]; // configurations
198 AliTRDDataDCSconf fConfs [22]; // data arrays
200 ClassDef(AliTRDDataDCS,1) // TRD calibration class