Histogram Scaling and Opt Stat box

I am using h->Scale(double_t) to scale my histogram,
for eg. h->Scale(2); doubles each bin count.
But the stat box, when I plot the new histogram still gives me the previous no. of entries.
for eg. if h(original) was 50 entries when I scale the histogram, shouldn’t the new stat box say 100 entries.

How do I get the new no. of entries?

UPDATE::
I used double x = h->Integral() to find out the new no. of entries and then used h->SetEntries(x)

TH::ResetStats does not work (still gives me the same entries as before scaling. Also, TH1::GetEffectiveEntries gives me the same entries as before scaling.

TH1::SetEntries ofcourse works since it’s brute force. But can I get it automatically in some way?

Thanks

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