TH1::GetNormFactor() question

Hello all,
I was trying to normalize a few histograms in batch mode (ie DrawNormalized is not what I want to use). I figured out one way would be to do
histo->Scale(histo->GetNormFactor())
However, GetNormFactor is 0 for my histograms. Do I have to use another function to calculate it first? If not, could it be related to the fact that I use AddBinContent for these histograms instead of Fill? (AddBinContent is known not to increase the number of entries like Fill, which may make sense or not, depending on the context of usage :slight_smile: )
Anyway, histo->Scale(1.0/histo->Integral()) does work for me. Is there any other way? Thanks,
filimon

Yes hist.GetNormFactor() will return 0 if you have not called SetNormFactor.

Rene

Thanks!
filimon