Empty histogram with nonzero number of entries

I am getting histograms with a nonzero number of entries, but which have no apparent content in any given bin. This is including the overflow and underflow bins. I’ve spot checked a few bins which definitely should have entries using GetBinContent, and they are indeed zero. It isn’t some rendering thing.

I’ve included an example histogram.

Its hard to figure out how to reproduce this problem in a small test case, since its in a rather complicated program. However, it doesn’t seem like a TH1F should EVER be in this state. So my question is how a TH1F can have a positive number of entries but no entries in any of the main bins, nor in the overflow or underflow bin.


Your result implies that you have filled your histogram with null weights.


Ah, okay, thanks. Thats the sort of information I needed. Now I think I know where to look for the source of the problem.

Thanks a lot.