The TH1 html reference page says that if I want to add histograms which are averages I should set the kIsAverage bit. Here is an simple ROOT script where I try to do that:

#include <TH1.h>
void isave() {
hresir = new TH1F(“hresir”,"",152, -0.1, 15.1);

When I “.x” this script I get the error:

Error: Symbol kIsAverage is not defined in current scope

What am I missing?

Thank you.

You do not specify which version of ROOT.
This feature (kIsAverage) has been introduced only a few weeks ago.
However it should work if you use the release 5.17/08.


I had been using 5.14. I switched to 5.17.08 and the problem went away.