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 (const Option_t * const option = "") const;
95 TGraph * FindAndMakeGraph (TMap * const dcsMap
96 , const char * amandaStr
98 AliSplineFit * Fit (const TGraph * const graph,
99 Int_t kMinPoints, Int_t kIter,
100 Double_t kMaxDelta, Int_t kFitReq);
106 void SetConf (UInt_t iAlias, const char * amanda, char dataType, UInt_t nChannel,
107 Bool_t enableGraph, Bool_t enableFit, Int_t kMinPoints,
108 Int_t kIter, Double_t kMaxDelta, Int_t kFitReq);
112 enum { kChamberByteStatus = 0
124 , kGasOverpressure = 12
133 , kMagneticField = 21
136 Bool_t fGraphsAreIni; // Check whether graphs are initialized
137 Bool_t fFitsAreIni; // Check whether firs are initialized
138 UInt_t fNAlias; // Number of aliases
140 class AliTRDDataDCSdata {
145 virtual ~AliTRDDataDCSdata() { };
146 TObjArray GetFit() const { return fFit; }
147 TObjArray GetGraph() const { return fGraph; }
148 TObject* GetFit(Int_t i) const { return fFit[i]; }
149 TObject* GetGraph(Int_t i) const { return fGraph[i]; }
151 TObjArray fFit; // array of AliSplineFit
152 TObjArray fGraph; // array of TGraph
155 class AliTRDDataDCSconf {
167 virtual ~AliTRDDataDCSconf() { };
168 TString GetAmanda() const { return fAmanda; }
169 Char_t GetDataType() const { return fDataType; }
170 UInt_t GetNChannel() const { return fNChannel; }
171 Bool_t GetEnableGraph() const { return fEnableGraph; }
172 Bool_t GetEnableFit() const { return fEnableFit; }
173 Int_t GetMinPoints() const { return fMinPoints; }
174 Int_t GetIter() const { return fIter; }
175 Double_t GetMaxDelta() const { return fMaxDelta; }
176 Int_t GetFitReq() const { return fFitReq; }
177 void SetAmanda(TString s) { fAmanda = s; }
178 void SetDataType(Char_t d) { fDataType = d; }
179 void SetNChannel(UInt_t n) { fNChannel = n; }
180 void SetEnableGraph(Bool_t e) { fEnableGraph = e; }
181 void SetEnableFit(Bool_t e) { fEnableFit = e; }
182 void SetMinPoints(Int_t m) { fMinPoints = m; }
183 void SetIter(Int_t i) { fIter = i; }
184 void SetMaxDelta(Double_t m) { fMaxDelta = m; }
185 void SetFitReq(Int_t f) { fFitReq = f; }
187 TString fAmanda; // amanda string
188 Char_t fDataType; // 'c' for char, 'f' for float
189 UInt_t fNChannel; // number of channel
190 Bool_t fEnableGraph; // will be converted in TGraph
191 Bool_t fEnableFit; // will be converted in AliSplineFit
192 Int_t fMinPoints; // minimum number of points per knot in fit
193 Int_t fIter; // number of iterations for spline fit
194 Double_t fMaxDelta; // precision parameter for spline fit
195 Int_t fFitReq; // fit requirement, 2 = continuous 2nd derivative
198 AliTRDDataDCSdata fDatas [22]; // configurations
199 AliTRDDataDCSconf fConfs [22]; // data arrays
201 ClassDef(AliTRDDataDCS,1) // TRD calibration class