Hi,
I have a problem with rerunning script again. When I change something in there, then run it again error is appearing. But first running going well. root-6.18.04
root [0] .x view.c
root [1] .x view.c
/home/pack/programs/root/data/runn03/./view.c:4:10: error: redefinition of 'cond'
TString cond = "";
^
/home/pack/programs/root/data/runn03/./view.c:4:10: note: previous definition is here
TString cond = "";
Thank you. I’ve tried, but anyway it doesn’t work
root [0] .x view.c
root [1] view();
input_line_326:2:3: error: use of undeclared identifier 'view'
(view())
^
Error in <HandleInterpreterException>: Error evaluating expression (view()).
Execution of your code was aborted.
I did it before, but there is also error due to no libraries. For it I need to type libraries like #include mylib.h etc. So I don’t know which libs I need:)
For every pad, instead of e.g. “c1_1->cd();”, you need “c1->cd(1);”, and so on.
For every pad, instead of e.g. “c1_1->SetLogy();”, you need “gPad->SetLogy();”, and so on.
Then, for every histogram, you’d better use something like this:
TH1D *h1 = new TH1D("h1", "it is ch1 drawn;dE0[ch];number of cases", 4000, 1., 4001.);
ch.Draw("ch1>>h1", cond, "", nentries);
or that:
TH2D *hh1 = new TH2D("hh1", "it is ch1:ch4 drawn;TOF(AC2-F3);dE0", 200, 0., 4000., 200, 0., 4000.);
ch.Draw("ch1:ch4>>hh1", cond, "colz", nentries);