3 /* Copyright(c) 2006-07, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 ////////////////////////////////////////////////////////////////////////////
9 // Container class for DCS sensors
10 ////////////////////////////////////////////////////////////////////////////
15 #include "TTimeStamp.h"
16 #include "AliSplineFit.h"
27 ////////////////////////////////////////////////////////////////////////
29 ////////////////////////////////////////////////////////////////////////
31 class AliDCSSensor : public TNamed {
35 AliDCSSensor(const AliDCSSensor& source);
36 virtual ~AliDCSSensor(){}
37 AliDCSSensor& operator=(const AliDCSSensor& source);
39 Int_t GetId() const {return fId; }
40 Int_t GetIdDCS() const {return fIdDCS; }
41 const TString& GetStringID() const {return fStringID; }
43 Double_t GetX() const {return fX; }
44 Double_t GetY() const {return fY; }
45 Double_t GetZ() const {return fZ; }
46 Double_t GetR() const {return TMath::Sqrt(fX*fX+fY*fY);}
47 Double_t GetPhi() const {return TMath::ATan2(fY,fX); }
49 UInt_t GetStartTime() const {return fStartTime;}
50 UInt_t GetEndTime() const { return fEndTime; }
51 TGraph* GetGraph() const {return fGraph; }
52 AliSplineFit* GetFit() const {return fFit; }
54 void SetId (Int_t id) {fId = id; }
55 void SetIdDCS (Int_t iddcs) {fIdDCS = iddcs; }
56 void SetStringID (const TString& stringID) {fStringID = stringID; }
58 void SetX (Double_t x) {fX = x; }
59 void SetY (Double_t y) {fY = y; }
60 void SetZ (Double_t z) {fZ = z; }
62 void SetGraph (TGraph *gr) {fGraph = gr; }
63 void SetFit (AliSplineFit *f) {fFit = f; }
64 void SetStartTime (UInt_t stime) {fStartTime = stime; }
65 void SetStartTime (TTimeStamp time) {fStartTime = time.GetSec(); }
66 void SetEndTime (UInt_t stime) {fEndTime = stime; }
67 void SetEndTime (TTimeStamp time) {fEndTime = time.GetSec(); }
68 Double_t GetValue(UInt_t timeSec); // timeSec offset for individual sensor map
69 Double_t GetValue(TTimeStamp time); // use this for absolute time stamp
70 Double_t Eval(const TTimeStamp& time, Bool_t inside=true) const;
71 Double_t EvalGraph(const Double_t& timeHour) const;
72 TGraph *MakeGraph (Int_t nPoints=100, Bool_t debug=kFALSE) const;
73 static TClonesArray * ReadTree(TTree *tree);
77 Int_t fId; // Internal number of sensor id (array index)
78 Int_t fIdDCS; // ID number in DCS
79 TString fStringID; // Amanda String ID
80 UInt_t fStartTime; // start time for DCS map/fit
81 UInt_t fEndTime; // end time for DCS map/fit
82 TGraph * fGraph; // graph with values
83 AliSplineFit *fFit; // fit to graph values
84 Double_t fX; //X-position of the sensor
85 Double_t fY; //Y-position of the sensor
86 Double_t fZ; //Z-position of the sensor
88 ClassDef(AliDCSSensor,3);