]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliDCSSensor.h
Update to correctly read DCS maps from FXS: ExtractDCS (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
48 UInt_t GetStartTime() const {return fStartTime;}
49 TGraph* GetGraph() const {return fGraph; }
50 AliSplineFit* GetFit() const {return fFit; }
51
52 void SetId (Int_t id) {fId = id; }
53 void SetIdDCS (Int_t iddcs) {fIdDCS = iddcs; }
54
55 void SetX (Double_t x) {fX = x; }
56 void SetY (Double_t y) {fY = y; }
57 void SetZ (Double_t z) {fZ = z; }
58
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);
68
69protected:
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
78
79 ClassDef(AliDCSSensor,1);
80};
81#endif