Description
Issue moved over from https://its.cern.ch/jira/browse/ROOT-8082, so we don't miss out on considering this aspect in the new histogram design.
Quoting:
Dear ROOTers,
commonly during hadd of a few thousand files, we encounter overflows in bins since the underlying type of the histograms are too small, e.g. TH1I: They are usually sufficiently large for single runs, but overflows are encountered when merging thousands of runs together.
This often results in misleading contents of the histograms after merge (e.g. "negative" bin-contents in "number of clusters" due to overflows from the merge).
It would be very helpful to automagically rebuild histograms with a larger underlying type during Merge() if overflow is imminent. I see that's very hard to do in the existing interfaces (since Merge() leaves the first histogram intact, and the underlying TArray storage is not a member, but a baseclass of the THxx classes), but the feature would be extremely helpful for all users (use less memory per run, and then only a lot of memory when really needed during merge).
Maybe, if considered impossible / too much effort for ROOT 5/6, this could be an idea to consider in the THist-design for ROOT 7?
Cheers,
Oliver