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; }
42 Double_t GetX() const {return fX; }
43 Double_t GetY() const {return fY; }
44 Double_t GetZ() const {return fZ; }
45 Double_t GetR() const {return TMath::Sqrt(fX*fX+fY*fY);}
46 Double_t GetPhi() const {return TMath::ATan2(fY,fX); }
48 UInt_t GetStartTime() const {return fStartTime;}
49 TGraph* GetGraph() const {return fGraph; }
50 AliSplineFit* GetFit() const {return fFit; }
52 void SetId (Int_t id) {fId = id; }
53 void SetIdDCS (Int_t iddcs) {fIdDCS = iddcs; }
55 void SetX (Double_t x) {fX = x; }
56 void SetY (Double_t y) {fY = y; }
57 void SetZ (Double_t z) {fZ = z; }
59 void SetGraph (TGraph *gr) {fGraph = gr; }
60 void SetFit (AliSplineFit *f) {fFit = f; }
61 void SetStartTime (UInt_t stime) {fStartTime = stime; }
62 void SetStartTime (TTimeStamp time) {fStartTime = time.GetSec(); }
63 Double_t GetValue(UInt_t timeSec);
64 Double_t GetValue(TTimeStamp time);
65 // static TClonesArray * ReadList(const char *fname);
66 // static TClonesArray * ReadListInd(const char *fname,
67 // Int_t& firstSensor, Int_t& lastSensor);
70 Int_t fId; // Internal number of sensor id (array index)
71 Int_t fIdDCS; // ID number in DCS
72 UInt_t fStartTime; // starting time
73 TGraph * fGraph; // graph with values
74 AliSplineFit *fFit; // fit to graph values
75 Double_t fX; //X-position of the sensor
76 Double_t fY; //Y-position of the sensor
77 Double_t fZ; //Z-position of the sensor
79 ClassDef(AliDCSSensor,1);