LCOV - code coverage report
Current view: top level - STEER/CDB - AliDCSSensorArray.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 21 4.8 %
Date: 2016-06-14 17:26:59 Functions: 2 25 8.0 %

          Line data    Source code
       1             : #ifndef AliDCSSensorArray_H
       2             : #define AliDCSSensorArray_H
       3             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       4             :  * See cxx source for full Copyright notice                               */
       5             : 
       6             : 
       7             : ///////////////////////////////////////////////////////////////////////////////
       8             : //                                                                           //
       9             : //  Calibration class for DCS sensors                                        //
      10             : //                                                                           //
      11             : ///////////////////////////////////////////////////////////////////////////////
      12             : 
      13             : #include "TNamed.h"
      14             : #include "TMap.h"
      15             : #include "TObjString.h"
      16             : #include "AliCDBManager.h"
      17             : #include "AliCDBEntry.h"
      18             : #include "AliDCSValue.h"
      19             : #include "AliDCSSensor.h"
      20             : 
      21             : class TGraph;
      22             : class TTimeStamp;
      23             : 
      24             : 
      25             : class AliDCSSensorArray : public TNamed {
      26             :  public:
      27             :   AliDCSSensorArray();
      28             :   AliDCSSensorArray(TClonesArray *arr);
      29             :   AliDCSSensorArray(Int_t run, const char* dbEntry);
      30             :   AliDCSSensorArray(UInt_t startTime, UInt_t endTime, TTree* confTree);
      31             :   AliDCSSensorArray(UInt_t startTime, UInt_t endTime, TClonesArray *sensors);
      32             :   AliDCSSensorArray(const AliDCSSensorArray &c);
      33             :   virtual ~AliDCSSensorArray();
      34             :   AliDCSSensorArray &operator=(const AliDCSSensorArray &c);
      35             :   virtual void Print(const Option_t* option="") const;
      36             :   virtual void DumpToTree(const char * fname="dcsDump.root", Int_t deltaT=10, Int_t sigmaT=300);
      37           0 :   void SetStartTime (const TTimeStamp& start) { fStartTime = start; }
      38           0 :   void SetEndTime   (const TTimeStamp& end) { fEndTime = end; }
      39           0 :   TTimeStamp GetStartTime () const { return fStartTime; }
      40           0 :   TTimeStamp GetEndTime () const { return fEndTime; }
      41           0 :   void  SetMinGraph(const Int_t minGraph) { fMinGraph=minGraph;}
      42           0 :   Int_t GetMinGraph()  const { return fMinGraph; }
      43           0 :   void  SetMinPoints(const Int_t minPoints) { fMinPoints=minPoints;}
      44           0 :   Int_t GetMinPoints() const { return fMinPoints; }
      45           0 :   void  SetIter(const Int_t iter ) { fIter=iter; }
      46           0 :   Int_t GetIter() const { return fIter; }
      47           0 :   void  SetMaxDelta(const Double_t maxDelta) { fMaxDelta= maxDelta;}
      48           0 :   Double_t GetMaxDelta() const { return fMaxDelta; }
      49           0 :   void  SetFitReq(const Int_t fitReq) { fFitReq=fitReq; }
      50           0 :   Int_t GetFitReq() const {return fFitReq;}
      51           0 :   void  SetValCut(const Int_t valCut) { fValCut=valCut;}
      52           0 :   Int_t GetValCut() const {return fValCut;}
      53           0 :   void  SetDiffCut(const Int_t diffCut) { fDiffCut=diffCut; }
      54           0 :   Int_t GetDiffCut() const {return fDiffCut;}
      55             : 
      56             :   void SetGraph     (TMap *map);
      57             :   void MakeSplineFit(TMap *map, Bool_t keepMap=kFALSE);
      58             :   void MakeSplineFitAddPoints(TMap *map);
      59             :   TMap* ExtractDCS  (TMap *dcsMap, Bool_t keepStart=kFALSE);
      60             :   TGraph* MakeGraph (TObjArray *valueSet, Bool_t keepStart=kFALSE);
      61             :   void ClearGraph();
      62             :   void ClearFit();
      63             :   Double_t GetValue  (UInt_t timeSec, Int_t sensor);
      64             :   AliDCSSensor* GetSensor (Int_t IdDCS);
      65             :   AliDCSSensor* GetSensor (Double_t x, Double_t y, Double_t z);
      66             :   AliDCSSensor* GetSensor (const TString& stringID);
      67             :   AliDCSSensor* GetSensorNum (Int_t ind);
      68             :   Int_t SetSensor (const TString& stringID, const AliDCSSensor& sensor);
      69             :   void SetSensorNum (const Int_t ind, const AliDCSSensor& sensor);
      70             :   void RemoveSensorNum(Int_t ind);
      71             :   void RemoveSensor(Int_t IdDCS);
      72             :   void AddSensors(AliDCSSensorArray *sensors);
      73             :   void RemoveGraphDuplicates (Double_t tolerance=1e-6);
      74             :   void RemoveAbsBelowThreshold(const Double_t threshold);
      75             :   TArrayI OutsideThreshold(Double_t threshold, UInt_t timeSec=0, Bool_t below=kTRUE) const;
      76           0 :   Int_t NumSensors() const { return fSensors->GetEntries(); }
      77             :   Int_t NumFits() const;
      78             : 
      79             :   Int_t GetFirstIdDCS() const;
      80             :   Int_t GetLastIdDCS()  const;
      81           0 :   const TClonesArray * GetArray(){return fSensors;}
      82             : 
      83             :  protected: 
      84             :   Int_t  fMinGraph;              // minimum #points of graph to be fitted
      85             :   Int_t  fMinPoints;             // minimum number of points per knot in fit
      86             :   Int_t  fIter;                  // number of iterations for spline fit
      87             :   Double_t  fMaxDelta;           // precision parameter for spline fit
      88             :   Int_t  fFitReq;                // fit requirement, 2 = continuous 2nd derivative
      89             :   Int_t  fValCut;                // cut on absolute value read from DCS map
      90             :   Int_t  fDiffCut;               // cut on difference in value read from DCS map
      91             :   TTimeStamp  fStartTime;        // start time for measurements in this entry
      92             :   TTimeStamp  fEndTime;          // end time for measurements in this entry
      93             :   TClonesArray *fSensors;        // Array of sensors
      94             : 
      95             : 
      96             : 
      97         168 :   ClassDef(AliDCSSensorArray,3)       //  TPC calibration class for parameters which are saved per pad
      98             : 
      99             : };
     100             : 
     101             : #endif

Generated by: LCOV version 1.11