ROOT Version: 5.34/36 Platform: lxplus Compiler: Not Provided
I want to do histogram division in PyRoot but couldn’t do it. Then I tried to save them as Root files, and everything works basically well, except that I still couldn’t do the division in Root, regardless of treating them as histograms or pointers.
Error: Symbol Dec is not defined in current scope (tmpfile):1:
Error: Symbol Dec is not defined in current scope (tmpfile):1:
(const int)0
*** Interpreter error recovered ***
And I’ve also tried using “/” directly and it doesn’t work as well
root [0] TFile f("Histograms.ROOT")
root [1] Dec->Draw()
Info in <TCanvas::MakeDefCanvas>: created default TCanvas with name c1
root [2] ->Divide(Dec,Dec)
Error: Symbol Dec is not defined in current scope (tmpfile):1:
Error: Symbol Dec is not defined in current scope (tmpfile):1:
(const int)0
*** Interpreter error recovered ***
I just draw Dec to make sure it really exists and is a histogram. “Histograms.ROOT” is a file I created in PyRoot to store my histograms.
root [3] result_histogram->Divide(Dec,Dec)
Error: Symbol result_histogram is not defined in current scope (tmpfile):1:
Error: Failed to evaluate result_histogram->Divide(Dec,Dec)
*** Interpreter error recovered ***
That’s what I’ve got…Do I need to define result_histogram first?