I have created some histograms and saved them in a .root file (analysis.root). Now I read them using my macro02.C , fit a function to them and save them again in a different .root file (results.root).
Now I want to draw the histograms using the command line interface. Unfortunately that doesn’t work:
kali: /mnt/e15/comellato/DriftTimeStudies$ root analysis/results.root
root [0]
Attaching file analysis/results.root as _file0...
(TFile *) 0x25b4e20
root [1] .ls
TFile** analysis/results.root
TFile* analysis/results.root
KEY: TDirectoryFile dirSCS_fitted;1 dirSCS_fitted
KEY: TGraphErrors glMeans;1 mean positions of the lower energy gaus
KEY: TGraphErrors guMeans;1 mean positions of the higher energy gaus
KEY: TH1D hSCS_0;1 hSCS[0]
KEY: TH1D hSCS_1;1 hSCS[1]
KEY: TH1D hSCS_2;1 hSCS[2]
KEY: TH1D hSCS_3;1 hSCS[3]
KEY: TH1D hSCS_4;1 hSCS[4]
KEY: TH1D hSCS_5;1 hSCS[5]
KEY: TH1D hSCS_6;1 hSCS[6]
KEY: TH1D hSCS_7;1 hSCS[7]
KEY: TH1D hSCS_8;1 hSCS[8]
KEY: TH1D hSCS_9;1 hSCS[9]
KEY: TH1D hSCS_10;1 hSCS[10]
KEY: TH1D hSCS_11;1 hSCS[11]
KEY: TH1D hSCS_12;1 hSCS[12]
KEY: TH1D hSCS_13;1 hSCS[13]
KEY: TH1D hSCS_14;1 hSCS[14]
KEY: TH1D hSCS_15;1 hSCS[15]
KEY: TH1D hSCS_16;1 hSCS[16]
KEY: TH1D hSCS_17;1 hSCS[17]
KEY: TH1D hSCS_18;1 hSCS[18]
KEY: TH1D hSCS_19;1 hSCS[19]
KEY: TH1D hSCS_20;1 hSCS[20]
KEY: TH1D hSCS_21;1 hSCS[21]
KEY: TH1D hSCS_22;1 hSCS[22]
KEY: TH1D hSCS_23;1 hSCS[23]
KEY: TH1D hSCS_24;1 hSCS[24]
KEY: TH1D hSCS_25;1 hSCS[25]
KEY: TH1D hSCS_26;1 hSCS[26]
root [2] hSCS_0->Draw()
input_line_44:1:265: error: use of undeclared identifier 't'
...t]})+p[8]) ; }
^
input_line_44:1:267: error: expected body of lambda expression
...})+p[8]) ; }
^
Error in <TFormula::Eval>: Can't find TFormula____id14707150355920275023 function prototype with arguments Double_t*,Double_t*
root [3]
root [3] hSCS_0->Draw()
Info in <TCanvas::MakeDefCanvas>: created default TCanvas with name c1
Error in <TFormula::Eval>: Formula is invalid or not properly initialized - try calling TFormula::Compile
Error in <TFormula::Eval>: Formula is invalid or not properly initialized - try calling TFormula::Compile
When I try do draw it for the first time it gives a different error than wehen I try do draw it again immediately afterwards.
ROOT version: 6.10/06
macro02.C (4.8 KB)
results.root (231.6 KB)
analysis.root