Integral for TH1, range

ROOT Version: 6.16
Platform: Fedora

I have an output TH1 “sum”. I need to calculate integral in between 300 and 400 on Xaxis.
I do sum->Integral(300, 400), but I do not see the result. How do I get the number itself as an output in terminal after this line?

std::cout << sum->Integral(sum->FindFixBin(300.), sum->FindFixBin(400.)) << std::endl;

That works! Thank you!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.