After filling a histogram that is setup for auto-binning, the bin information is not updated until I call TH1::Integral() (see example below). Is this the intended behavior? If so, what is the intended way to update the histogram so the bin information is set.
root  TH1F h("h","",25,0,-1) (TH1F &) Name: h Title: NbinsX: 25 root  h.Fill(100) (int) -2 root  h.GetBinLowEdge(26) (double) -1.0000000 root  h.Integral() (double) 1.0000000 root  h.GetBinLowEdge(26) (double) 101.20000
I am comparing branches of a TTree by plotting two variables and comparing the histograms. I am not sure beforehand what range is needed for the histogram so I use auto-binning. However, auto-binning will not always give the same bin range when drawing the different TTree branches. So in an initial loop I am drawing the branches and checking the bin range determined by auto-binning. Then I use this information to hard-code the bin range. While doing this I noticed that I couldn’t get the bin edge information without calling Integral() first.
ROOT Version: v6-14-00
Platform: macOS 10.12.6
Compiler: Apple LLVM version 9.0.0 (clang-900.0.39.2)