Removing obsolete classes (Haavard)
[u/mrichter/AliRoot.git] / STEER / AliDCSSensor.h
CommitLineData
7264822f 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
18class TObjArray;
19class TClonesArray;
20class TTree;
21class TFile;
22class TString;
23class TGraph;
24class TVector3;
25
26
27////////////////////////////////////////////////////////////////////////
28// Class AliDCSSensor
29////////////////////////////////////////////////////////////////////////
30
31class AliDCSSensor : public TNamed {
32
33public:
34 AliDCSSensor();
35 AliDCSSensor(const AliDCSSensor& source);
36 virtual ~AliDCSSensor(){}
37 AliDCSSensor& operator=(const AliDCSSensor& source);
38
39 Int_t GetId() const {return fId; }
40 Int_t GetIdDCS() const {return fIdDCS; }
41
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); }
47
8cb8848e 48 UInt_t GetStartTime() const {return fStartTime;}
49 UInt_t GetEndTime() const { return fEndTime; }
7264822f 50 TGraph* GetGraph() const {return fGraph; }
51 AliSplineFit* GetFit() const {return fFit; }
52
53 void SetId (Int_t id) {fId = id; }
54 void SetIdDCS (Int_t iddcs) {fIdDCS = iddcs; }
55
56 void SetX (Double_t x) {fX = x; }
57 void SetY (Double_t y) {fY = y; }
58 void SetZ (Double_t z) {fZ = z; }
59
60 void SetGraph (TGraph *gr) {fGraph = gr; }
61 void SetFit (AliSplineFit *f) {fFit = f; }
62 void SetStartTime (UInt_t stime) {fStartTime = stime; }
63 void SetStartTime (TTimeStamp time) {fStartTime = time.GetSec(); }
8cb8848e 64 void SetEndTime (UInt_t stime) {fEndTime = stime; }
65 void SetEndTime (TTimeStamp time) {fEndTime = time.GetSec(); }
7264822f 66 Double_t GetValue(UInt_t timeSec);
67 Double_t GetValue(TTimeStamp time);
8cb8848e 68 Double_t Eval(const TTimeStamp& time) const;
69 TGraph *MakeGraph (Int_t nPoints=100) const;
70
71
7264822f 72// static TClonesArray * ReadList(const char *fname);
73// static TClonesArray * ReadListInd(const char *fname,
74// Int_t& firstSensor, Int_t& lastSensor);
75
76protected:
77 Int_t fId; // Internal number of sensor id (array index)
78 Int_t fIdDCS; // ID number in DCS
8cb8848e 79 UInt_t fStartTime; // start time for DCS map/fit
80 UInt_t fEndTime; // end time for DCS map/fit
7264822f 81 TGraph * fGraph; // graph with values
82 AliSplineFit *fFit; // fit to graph values
83 Double_t fX; //X-position of the sensor
84 Double_t fY; //Y-position of the sensor
85 Double_t fZ; //Z-position of the sensor
86
8cb8848e 87 ClassDef(AliDCSSensor,2);
7264822f 88};
89#endif