H2root wrong number of Entries for Histograms?


When I convert a paw file hist.paw to root using: “h2root hist.paw hist.root”, the number of reported entries in the histograms do not match. The histograms get converted fine, but the command: “hist->GetEntries()” returns a wrong value. Is there a way to avoid this? I am running root version 5.14/04.

Also when I scale a histogram: “hist->Scale(2)” the histogram scales fine and the errors get scaled as well, but the number of entries reported by: “hist->GetEntries()” stays the same. Is this a desired feature or is there a way to automatically change the number of entires correspondingly to the scale factor?

Thanks in advance for any help.

Scaling a histogram should not change the number of entries !!

Please post your histogram file to be converted to ROOT.


Thank you for your replay. I apologize for the delay. Attached is a histogram that seems to show the wrong number of entries once converted to root. The problem might also be that it might have been scaled before in paw, but I 'm not sure of that since I did not create this histogram. Thank you for your help.

example.hbook.gz (1.02 KB)

I cannot open your file neither with paw or h2root.


Is there an easy way of displaying the integral of a histogram (hist->Integral()) as a standard output on a graph instead of the number of entries? For example instead of displaying #Entries, Mean and RMS displaying Integral, Mean and RMS instead? Thanx for any help.