55 fIdDCS(source.fIdDCS),
56 fStringID(source.fStringID),
57 fStartTime(source.fStartTime),
58 fEndTime(source.fEndTime),
86 if (&source ==
this)
return *
this;
97 TString opt = option; opt.ToLower();
98 printf(
"%s:%s\n",GetTitle(), GetName());
112 for (Int_t i=0; i<
npoints; i++){
150 return Eval(time, inside);
165 UInt_t timeSec = time.GetSec();
169 if ( timeSec < fStartTime ) {
199 UInt_t timeSec = time.GetSec();
203 if ( timeSec < fStartTime ) {
227 Double_t x=0; Double_t y=0;
229 if ( timeHour < x )
return -99;
234 for (Int_t i=1; i<
npoints; i++) {
236 if ( timeHour < x ) {
237 fGraph->GetPoint(i-1,x,y);
259 printf (
"Start time %d, End time %d, step time %d\n",
261 TTimeStamp t((time_t)
fStartTime,0); t.Print();
262 TTimeStamp t2((time_t)
fEndTime,0); t2.Print();
265 if ( !
fFit )
return 0;
267 Double_t *x =
new Double_t[nPoints+1];
268 Double_t *y =
new Double_t[nPoints+1];
269 for (Int_t ip=0; ip<nPoints; ip++) {
273 TTimeStamp t3((time_t)x[ip],0);
274 printf (
"x=%f, y=%f ",x[ip],y[ip]);
279 TGraph *graph =
new TGraph(nPoints,x,y);
283 graph->GetXaxis()->SetTimeDisplay(1);
284 graph->GetXaxis()->SetLabelOffset(0.02);
285 graph->GetXaxis()->SetTimeFormat(
"#splitline{%d/%m}{%H:%M}");
297 Int_t nentries = tree->GetEntries();
306 tree->SetBranchAddress(
"StringID",&stringId);
307 tree->SetBranchAddress(
"IdDCS",&idDCS);
308 tree->SetBranchAddress(
"Num",&num);
309 tree->SetBranchAddress(
"X",&x);
310 tree->SetBranchAddress(
"Y",&y);
311 tree->SetBranchAddress(
"Z",&z);
316 TClonesArray *
array =
new TClonesArray(
"AliDCSSensor",nentries);
317 printf (
"nentries = %d\n",nentries);
319 for (Int_t isensor=0; isensor<nentries; isensor++){
321 tree->GetEntry(isensor);
322 sens->
SetId(isensor);
printf("Chi2/npoints = %f\n", TMath::Sqrt(chi2/npoints))
virtual void Draw(Option_t *option="")
Double_t EvalGraph(const TTimeStamp &time, Bool_t &inside) const
void SetStringID(const TString &stringID)
Double_t Eval(const TTimeStamp &time, Bool_t &inside) const
void SetIdDCS(Int_t iddcs)
static TClonesArray * ReadTree(TTree *tree)
AliDCSSensor & operator=(const AliDCSSensor &source)
const Double_t kSecInHour
Double_t Eval(Double_t x, Int_t deriv=0) const
Double_t GetValue(UInt_t timeSec)
virtual void Print(const Option_t *option="") const
TGraph * MakeGraph(Int_t nPoints=100, Bool_t debug=kFALSE) const