1 /**************************************************************************
2 * Copyright(c) 2006-07, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
17 ////////////////////////////////////////////////////////////////////////////////
19 // Class describing TPC temperature sensors (including pointers to graphs/fits//
20 // Authors: Marian Ivanov, Haavard Helstrup and Martin Siska //
22 ////////////////////////////////////////////////////////////////////////////////
25 // Running instructions:
27 TClonesArray * arr = AliDCSSensor::ReadList("TempSensor.txt");
28 TFile f("TempSensors.root","RECREATE");
29 TTree * tree = new TTree("TempSensor", "TempSensor");
30 tree->Branch("Temp",&arr);
38 #include "AliDCSSensor.h"
39 ClassImp(AliDCSSensor)
42 AliDCSSensor::AliDCSSensor():
53 // Standard constructor
57 AliDCSSensor::AliDCSSensor(const AliDCSSensor& source) :
60 fIdDCS(source.fIdDCS),
61 fStartTime(source.fStartTime),
62 fGraph(source.fGraph),
72 AliDCSSensor& AliDCSSensor::operator=(const AliDCSSensor& source){
74 // assignment operator
76 if (&source == this) return *this;
77 new (this) AliDCSSensor(source);
82 //_____________________________________________________________________________
83 Double_t AliDCSSensor::GetValue(UInt_t timeSec)
86 // Get temperature value for actual sensor
87 // timeSec given as offset from start-of-run measured in seconds
89 Double_t timeHrs = timeSec/3600.0;
90 return fFit->Eval(timeHrs,0);
92 //_____________________________________________________________________________
93 Double_t AliDCSSensor::GetValue(TTimeStamp time)
95 // Get temperature value for actual sensor
96 // time given as absolute TTimeStamp
98 Double_t timeHrs = (time.GetSec() - fStartTime)/3600.0;
99 return fFit->Eval(timeHrs,0);