Static function TH1::SetDefaultSumw2

Could someone please post or point me to a working example that calls the function TH1::SetDefaultSumw2? I’m unsure of the syntax, and what if any header files must be included.

I’ve tried using:

#include<TH1.h>

and later in the macro:
TH1::SetDefaultSumw2();

but upon compilation I recieve the message:
error: SetDefaultSumw2' is not a member ofTH1’

Thanks very much for your help,
Shannon

Unfortunately you do not mention which version of ROOT you use.
TH1::SetDefaultSumw2 was introduced 2 years ago in version 5.14.
Move to a more recent version.

Rene