X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=TRD%2FAliTRDDataDCS.h;h=44b29cae16def4c576c8587f74a05f9864feea45;hb=b9d88e034154b31be04d6164bddf2e3d5349a454;hp=5b94badee3ce7567d3f9c67ebc7197607a229ab2;hpb=a5e1169ebe3e17074e7f7fa1c05a89a5d26cc0d7;p=u%2Fmrichter%2FAliRoot.git diff --git a/TRD/AliTRDDataDCS.h b/TRD/AliTRDDataDCS.h index 5b94badee3c..44b29cae16d 100644 --- a/TRD/AliTRDDataDCS.h +++ b/TRD/AliTRDDataDCS.h @@ -1,21 +1,32 @@ -#ifndef AliTRDDataDCS_H -#define AliTRDDAtaDCS_H +#ifndef ALITRDDATADCS_H +#define ALITRDDATADCS_H + +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + +/* $Id$ */ + +//////////////////////////////////////////////////////////////////////////// +// // +// Extracts the DCS information // +// // +//////////////////////////////////////////////////////////////////////////// #include -#include -#include + +class TObjArray; +class TString; class TGraph; class AliSplineFit; class TMap; - class AliTRDDataDCS : public TNamed { - public : + public : - AliTRDDataDCS (); + AliTRDDataDCS (); ~AliTRDDataDCS (); Bool_t ExtractDCS (TMap * aliDCS); @@ -31,90 +42,60 @@ class AliTRDDataDCS : public TNamed AliSplineFit * GetFit (UInt_t iAlias, UInt_t iChannel = 0) const; // Get TGraph - TGraph * GetGraphChamberByteStatus (UInt_t iSensor) const {return GetGraph (chamberByteStatus, iSensor);} - TGraph * GetGraphPreTrigger () const {return GetGraph (preTrigger);} - TGraph * GetGraphGoofyHv () const {return GetGraph (goofyHv);} - TGraph * GetGraphGoofyPeakPos (UInt_t iSensor) const {return GetGraph (goofyPeakPos, iSensor);} - TGraph * GetGraphGoofyPeakArea (UInt_t iSensor) const {return GetGraph (goofyPeakArea, iSensor);} - TGraph * GetGraphGoofyTemp (UInt_t iSensor) const {return GetGraph (goofyTemp, iSensor);} - TGraph * GetGraphGoofyPressure () const {return GetGraph (goofyPressure);} - TGraph * GetGraphGoofyVelocity () const {return GetGraph (goofyVelocity);} - TGraph * GetGraphGoofyGain (UInt_t iSensor) const {return GetGraph (goofyGain, iSensor);} - TGraph * GetGraphGoofyCO2 () const {return GetGraph (goofyCO2);} - TGraph * GetGraphGoofyN2 () const {return GetGraph (goofyN2);} - TGraph * GetGraphGasO2 () const {return GetGraph (gasO2);} - TGraph * GetGraphGasOverpressure () const {return GetGraph (gasOverpressure);} - TGraph * GetGraphEnvTemp (UInt_t iSensor) const {return GetGraph (envTemp, iSensor);} - TGraph * GetGraphHvAnodeImon (UInt_t iSensor) const {return GetGraph (hvAnodeImon, iSensor);} - TGraph * GetGraphHvDriftImon (UInt_t iSensor) const {return GetGraph (hvDriftImon, iSensor);} - TGraph * GetGraphHvAnodeUmon (UInt_t iSensor) const {return GetGraph (hvAnodeUmon, iSensor);} - TGraph * GetGraphHvDriftUmon (UInt_t iSensor) const {return GetGraph (hvDriftUmon, iSensor);} - TGraph * GetGraphAdcClkPhase () const {return GetGraph (adcClkPhase);} - TGraph * GetGraphAtmPressure () const {return GetGraph (atmPressure);} - TGraph * GetGraphLuminosity () const {return GetGraph (luminosity);} - TGraph * GetGraphMagneticField () const {return GetGraph (magneticField);} + TGraph * GetGraphChamberByteStatus (UInt_t iSensor) const {return GetGraph (kChamberByteStatus, iSensor);} + TGraph * GetGraphPreTrigger () const {return GetGraph (kPreTrigger);} + TGraph * GetGraphGoofyHv () const {return GetGraph (kGoofyHv);} + TGraph * GetGraphGoofyPeakPos (UInt_t iSensor) const {return GetGraph (kGoofyPeakPos, iSensor);} + TGraph * GetGraphGoofyPeakArea (UInt_t iSensor) const {return GetGraph (kGoofyPeakArea, iSensor);} + TGraph * GetGraphGoofyTemp (UInt_t iSensor) const {return GetGraph (kGoofyTemp, iSensor);} + TGraph * GetGraphGoofyPressure () const {return GetGraph (kGoofyPressure);} + TGraph * GetGraphGoofyVelocity () const {return GetGraph (kGoofyVelocity);} + TGraph * GetGraphGoofyGain (UInt_t iSensor) const {return GetGraph (kGoofyGain, iSensor);} + TGraph * GetGraphGoofyCO2 () const {return GetGraph (kGoofyCO2);} + TGraph * GetGraphGoofyN2 () const {return GetGraph (kGoofyN2);} + TGraph * GetGraphGasO2 () const {return GetGraph (kGasO2);} + TGraph * GetGraphGasOverpressure () const {return GetGraph (kGasOverpressure);} + TGraph * GetGraphEnvTemp (UInt_t iSensor) const {return GetGraph (kEnvTemp, iSensor);} + TGraph * GetGraphHvAnodeImon (UInt_t iSensor) const {return GetGraph (kHvAnodeImon, iSensor);} + TGraph * GetGraphHvDriftImon (UInt_t iSensor) const {return GetGraph (kHvDriftImon, iSensor);} + TGraph * GetGraphHvAnodeUmon (UInt_t iSensor) const {return GetGraph (kHvAnodeUmon, iSensor);} + TGraph * GetGraphHvDriftUmon (UInt_t iSensor) const {return GetGraph (kHvDriftUmon, iSensor);} + TGraph * GetGraphAdcClkPhase () const {return GetGraph (kAdcClkPhase);} + TGraph * GetGraphAtmPressure () const {return GetGraph (kAtmPressure);} + TGraph * GetGraphLuminosity () const {return GetGraph (kLuminosity);} + TGraph * GetGraphMagneticField () const {return GetGraph (kMagneticField);} - AliSplineFit * GetFitChamberByteStatus (UInt_t iSensor) const {return GetFit (chamberByteStatus, iSensor);} - AliSplineFit * GetFitPreTrigger () const {return GetFit (preTrigger);} - AliSplineFit * GetFitGoofyHv () const {return GetFit (goofyHv);} - AliSplineFit * GetFitGoofyPeakPos (UInt_t iSensor) const {return GetFit (goofyPeakPos, iSensor);} - AliSplineFit * GetFitGoofyPeakArea (UInt_t iSensor) const {return GetFit (goofyPeakArea, iSensor);} - AliSplineFit * GetFitGoofyTemp (UInt_t iSensor) const {return GetFit (goofyTemp, iSensor);} - AliSplineFit * GetFitGoofyPressure () const {return GetFit (goofyPressure);} - AliSplineFit * GetFitGoofyVelocity () const {return GetFit (goofyVelocity);} - AliSplineFit * GetFitGoofyGain (UInt_t iSensor) const {return GetFit (goofyGain, iSensor);} - AliSplineFit * GetFitGoofyCO2 () const {return GetFit (goofyCO2);} - AliSplineFit * GetFitGoofyN2 () const {return GetFit (goofyN2);} - AliSplineFit * GetFitGasO2 () const {return GetFit (gasO2);} - AliSplineFit * GetFitGasOverpressure () const {return GetFit (gasOverpressure);} - AliSplineFit * GetFitEnvTemp (UInt_t iSensor) const {return GetFit (envTemp, iSensor);} - AliSplineFit * GetFitHvAnodeImon (UInt_t iSensor) const {return GetFit (hvAnodeImon, iSensor);} - AliSplineFit * GetFitHvDriftImon (UInt_t iSensor) const {return GetFit (hvDriftImon, iSensor);} - AliSplineFit * GetFitHvAnodeUmon (UInt_t iSensor) const {return GetFit (hvAnodeUmon, iSensor);} - AliSplineFit * GetFitHvDriftUmon (UInt_t iSensor) const {return GetFit (hvDriftUmon, iSensor);} - AliSplineFit * GetFitAdcClkPhase () const {return GetFit (adcClkPhase);} - AliSplineFit * GetFitAtmPressure () const {return GetFit (atmPressure);} - AliSplineFit * GetFitLuminosity () const {return GetFit (luminosity);} - AliSplineFit * GetFitMagneticField () const {return GetFit (magneticField);} + AliSplineFit * GetFitChamberByteStatus (UInt_t iSensor) const {return GetFit (kChamberByteStatus, iSensor);} + AliSplineFit * GetFitPreTrigger () const {return GetFit (kPreTrigger);} + AliSplineFit * GetFitGoofyHv () const {return GetFit (kGoofyHv);} + AliSplineFit * GetFitGoofyPeakPos (UInt_t iSensor) const {return GetFit (kGoofyPeakPos, iSensor);} + AliSplineFit * GetFitGoofyPeakArea (UInt_t iSensor) const {return GetFit (kGoofyPeakArea, iSensor);} + AliSplineFit * GetFitGoofyTemp (UInt_t iSensor) const {return GetFit (kGoofyTemp, iSensor);} + AliSplineFit * GetFitGoofyPressure () const {return GetFit (kGoofyPressure);} + AliSplineFit * GetFitGoofyVelocity () const {return GetFit (kGoofyVelocity);} + AliSplineFit * GetFitGoofyGain (UInt_t iSensor) const {return GetFit (kGoofyGain, iSensor);} + AliSplineFit * GetFitGoofyCO2 () const {return GetFit (kGoofyCO2);} + AliSplineFit * GetFitGoofyN2 () const {return GetFit (kGoofyN2);} + AliSplineFit * GetFitGasO2 () const {return GetFit (kGasO2);} + AliSplineFit * GetFitGasOverpressure () const {return GetFit (kGasOverpressure);} + AliSplineFit * GetFitEnvTemp (UInt_t iSensor) const {return GetFit (kEnvTemp, iSensor);} + AliSplineFit * GetFitHvAnodeImon (UInt_t iSensor) const {return GetFit (kHvAnodeImon, iSensor);} + AliSplineFit * GetFitHvDriftImon (UInt_t iSensor) const {return GetFit (kHvDriftImon, iSensor);} + AliSplineFit * GetFitHvAnodeUmon (UInt_t iSensor) const {return GetFit (kHvAnodeUmon, iSensor);} + AliSplineFit * GetFitHvDriftUmon (UInt_t iSensor) const {return GetFit (kHvDriftUmon, iSensor);} + AliSplineFit * GetFitAdcClkPhase () const {return GetFit (kAdcClkPhase);} + AliSplineFit * GetFitAtmPressure () const {return GetFit (kAtmPressure);} + AliSplineFit * GetFitLuminosity () const {return GetFit (kLuminosity);} + AliSplineFit * GetFitMagneticField () const {return GetFit (kMagneticField);} - void Print (Option_t* option = "") const; - - - public : - - const UInt_t chamberByteStatus; - const UInt_t preTrigger; - const UInt_t goofyHv; - const UInt_t goofyPeakPos; - const UInt_t goofyPeakArea; - const UInt_t goofyTemp; - const UInt_t goofyPressure; - const UInt_t goofyVelocity; - const UInt_t goofyGain; - const UInt_t goofyCO2; - const UInt_t goofyN2; - const UInt_t gasO2; - const UInt_t gasOverpressure; - const UInt_t envTemp ; - const UInt_t hvAnodeImon; - const UInt_t hvDriftImon; - const UInt_t hvAnodeUmon; - const UInt_t hvDriftUmon; - const UInt_t adcClkPhase; - const UInt_t atmPressure; - const UInt_t luminosity; - const UInt_t magneticField; - const UInt_t fNAlias; - + void Print (const Option_t * const option = "") const; - - protected : - - private : - - TGraph * FindAndMakeGraph (TMap * dcsMap, const char * amandaStr, - char dataType); - AliSplineFit * Fit (TGraph * graph, + protected : + + TGraph * FindAndMakeGraph (TMap * const dcsMap + , const char * amandaStr + , char dataType); + AliSplineFit * Fit (const TGraph * const graph, Int_t kMinPoints, Int_t kIter, Double_t kMaxDelta, Int_t kFitReq); @@ -126,33 +107,99 @@ class AliTRDDataDCS : public TNamed Bool_t enableGraph, Bool_t enableFit, Int_t kMinPoints, Int_t kIter, Double_t kMaxDelta, Int_t kFitReq); - private : - - Bool_t graphsAreIni; - Bool_t fitsAreIni; - - struct data { - TObjArray fit; // array of AliSplineFit - TObjArray graph; // array of TGraph - }; - - struct conf { - TString amanda; // amanda string - char dataType; // 'c' for char, 'f' for float - UInt_t nChannel; // number of channel - Bool_t enableGraph; // will be converted in TGraph - Bool_t enableFit; // will be converted in AliSplineFit - Int_t kMinPoints; // minimum number of points per knot in fit - Int_t kIter; // number of iterations for spline fit - Double_t kMaxDelta; // precision parameter for spline fit - Int_t kFitReq; // fit requirement, 2 = continuous 2nd derivative - }; + private : + + enum { kChamberByteStatus = 0 + , kPreTrigger = 1 + , kGoofyHv = 2 + , kGoofyPeakPos = 3 + , kGoofyPeakArea = 4 + , kGoofyTemp = 5 + , kGoofyPressure = 6 + , kGoofyVelocity = 7 + , kGoofyGain = 8 + , kGoofyCO2 = 9 + , kGoofyN2 = 10 + , kGasO2 = 11 + , kGasOverpressure = 12 + , kEnvTemp = 13 + , kHvAnodeImon = 14 + , kHvDriftImon = 15 + , kHvAnodeUmon = 16 + , kHvDriftUmon = 17 + , kAdcClkPhase = 18 + , kAtmPressure = 19 + , kLuminosity = 20 + , kMagneticField = 21 + }; + + Bool_t fGraphsAreIni; // Check whether graphs are initialized + Bool_t fFitsAreIni; // Check whether firs are initialized + UInt_t fNAlias; // Number of aliases - data fDatas [22]; - conf fConfs [22]; + class AliTRDDataDCSdata { + public: + AliTRDDataDCSdata() + :fFit(0x0) + ,fGraph(0x0) { }; + virtual ~AliTRDDataDCSdata() { }; + TObjArray GetFit() const { return fFit; } + TObjArray GetGraph() const { return fGraph; } + TObject* GetFit(Int_t i) const { return fFit[i]; } + TObject* GetGraph(Int_t i) const { return fGraph[i]; } + protected: + TObjArray fFit; // array of AliSplineFit + TObjArray fGraph; // array of TGraph + }; + + class AliTRDDataDCSconf { + public: + AliTRDDataDCSconf() + :fAmanda(0) + ,fDataType(0) + ,fNChannel(0) + ,fEnableGraph(0) + ,fEnableFit(0) + ,fMinPoints(0) + ,fIter(0) + ,fMaxDelta(0) + ,fFitReq(0) { }; + virtual ~AliTRDDataDCSconf() { }; + TString GetAmanda() const { return fAmanda; } + Char_t GetDataType() const { return fDataType; } + UInt_t GetNChannel() const { return fNChannel; } + Bool_t GetEnableGraph() const { return fEnableGraph; } + Bool_t GetEnableFit() const { return fEnableFit; } + Int_t GetMinPoints() const { return fMinPoints; } + Int_t GetIter() const { return fIter; } + Double_t GetMaxDelta() const { return fMaxDelta; } + Int_t GetFitReq() const { return fFitReq; } + void SetAmanda(TString s) { fAmanda = s; } + void SetDataType(Char_t d) { fDataType = d; } + void SetNChannel(UInt_t n) { fNChannel = n; } + void SetEnableGraph(Bool_t e) { fEnableGraph = e; } + void SetEnableFit(Bool_t e) { fEnableFit = e; } + void SetMinPoints(Int_t m) { fMinPoints = m; } + void SetIter(Int_t i) { fIter = i; } + void SetMaxDelta(Double_t m) { fMaxDelta = m; } + void SetFitReq(Int_t f) { fFitReq = f; } + protected: + TString fAmanda; // amanda string + Char_t fDataType; // 'c' for char, 'f' for float + UInt_t fNChannel; // number of channel + Bool_t fEnableGraph; // will be converted in TGraph + Bool_t fEnableFit; // will be converted in AliSplineFit + Int_t fMinPoints; // minimum number of points per knot in fit + Int_t fIter; // number of iterations for spline fit + Double_t fMaxDelta; // precision parameter for spline fit + Int_t fFitReq; // fit requirement, 2 = continuous 2nd derivative + }; + + AliTRDDataDCSdata fDatas [22]; // configurations + AliTRDDataDCSconf fConfs [22]; // data arrays - ClassDef(AliTRDDataDCS,1) // TRD calibration class + ClassDef(AliTRDDataDCS,1) // TRD calibration class - }; +}; #endif