LCOV - code coverage report
Current view: top level - STEER/CDB - AliDCSSensor.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 5 25 20.0 %
Date: 2016-06-14 17:26:59 Functions: 6 29 20.7 %

          Line data    Source code
       1             : #ifndef AliDCSSensor_H
       2             : #define AliDCSSensor_H
       3             : /* Copyright(c) 2006-07, ALICE Experiment at CERN, All rights reserved. *
       4             :  * See cxx source for full Copyright notice                               */
       5             : 
       6             : 
       7             : 
       8             : ////////////////////////////////////////////////////////////////////////////
       9             : //              Container class for DCS sensors            
      10             : ////////////////////////////////////////////////////////////////////////////
      11             : 
      12             : 
      13             : #include "TObject.h"
      14             : #include "TMath.h"
      15             : #include "TTimeStamp.h"
      16             : #include "AliSplineFit.h"
      17             : 
      18             : class TObjArray;
      19             : class TClonesArray;
      20             : class TTree;
      21             : class TFile;
      22             : class TString;
      23             : class TGraph;
      24             : class TVector3;
      25             : 
      26             : 
      27             : ////////////////////////////////////////////////////////////////////////
      28             : //              Class AliDCSSensor
      29             : ////////////////////////////////////////////////////////////////////////
      30             : 
      31             : class AliDCSSensor : public TNamed {
      32             : 
      33             : public:
      34             :   AliDCSSensor();
      35             :   AliDCSSensor(const AliDCSSensor& source);
      36             :   virtual ~AliDCSSensor();
      37             :   AliDCSSensor& operator=(const AliDCSSensor& source);
      38             :   virtual void Print(const Option_t* option="") const;
      39             :   virtual void Draw(Option_t* option="") ;
      40             :   
      41           0 :   Int_t       GetId()     const {return fId;     }
      42           0 :   Int_t       GetIdDCS()  const {return fIdDCS;     }
      43           0 :   const TString& GetStringID() const {return fStringID; }
      44             : 
      45           0 :   Double_t    GetX()       const {return fX;      }
      46           0 :   Double_t    GetY()       const {return fY;      }
      47           0 :   Double_t    GetZ()       const {return fZ;      }
      48           0 :   Double_t    GetR()       const {return TMath::Sqrt(fX*fX+fY*fY);}
      49           0 :   Double_t    GetPhi()     const {return TMath::ATan2(fY,fX);    }
      50             :   
      51           0 :   UInt_t      GetStartTime() const {return fStartTime;} 
      52           0 :   UInt_t      GetEndTime() const { return fEndTime; }
      53           0 :   TGraph*     GetGraph()   const {return fGraph; }
      54           0 :   AliSplineFit* GetFit()   const {return fFit; }
      55             : 
      56           0 :   void SetId     (Int_t id)        {fId     = id;    }
      57       13032 :   void SetIdDCS  (Int_t iddcs)     {fIdDCS  = iddcs;    }
      58           0 :   void SetStringID (const TString& stringID)  {fStringID = stringID; }
      59             :   
      60       13032 :   void SetX       (Double_t x)       {fX     = x;      }
      61       13032 :   void SetY       (Double_t y)       {fY     = y;      }
      62       13032 :   void SetZ       (Double_t z)       {fZ     = z;      }
      63             : 
      64           0 :   void SetGraph   (TGraph *gr)      {fGraph = gr; }
      65           0 :   void SetFit     (AliSplineFit *f) {fFit = f; }
      66           0 :   void SetStartTime (UInt_t stime)  {fStartTime = stime; }
      67           0 :   void SetStartTime (TTimeStamp time)  {fStartTime = time.GetSec(); }
      68           0 :   void SetEndTime (UInt_t stime)  {fEndTime = stime; }
      69           0 :   void SetEndTime (TTimeStamp time)  {fEndTime = time.GetSec(); }
      70             :   Double_t GetValue(UInt_t timeSec);   // timeSec offset for individual sensor map
      71             :   Double_t GetValue(TTimeStamp time);  // use this for absolute time stamp
      72             :   Double_t Eval(const TTimeStamp& time, Bool_t& inside) const;
      73             :   Double_t EvalGraph(const TTimeStamp& time, Bool_t& inside) const;
      74             :   Double_t EvalGraph(const Double_t& timeHour) const;
      75             :   TGraph *MakeGraph (Int_t nPoints=100, Bool_t debug=kFALSE) const;
      76             :   static TClonesArray *  ReadTree(TTree *tree);
      77             :   
      78             : 
      79             : protected:
      80             :   Int_t fId;         // Internal number of sensor id  (array index)
      81             :   Int_t fIdDCS;      // ID number in DCS
      82             :   TString  fStringID; // Amanda String ID
      83             :   UInt_t   fStartTime;  // start time for DCS map/fit
      84             :   UInt_t   fEndTime;    // end time for DCS map/fit
      85             :   TGraph * fGraph;      // graph with values
      86             :   AliSplineFit *fFit;   // fit to graph values
      87             :   Double_t fX;      //X-position of the sensor
      88             :   Double_t fY;      //Y-position of the sensor
      89             :   Double_t fZ;      //Z-position of the sensor
      90             : 
      91         972 :   ClassDef(AliDCSSensor,3);
      92             : };
      93             : #endif
      94             : 

Generated by: LCOV version 1.11