What is the maximum number of entries a TH2/3/nD can hold

Hi, experts
Here I have another extreme use case.
I am filling >1e10 of entries (they are hits) per file, and then there are > 1000 files being hadd-ed.
I am curious if Th2/3/nD can hold such a large entries in a single/hadd file ?

ROOT Version: 6.24.00 (conda-forge)
Platform: centos7
Compiler: gcc9

The number of entries is a double

So, apriori, the maximum value is equal to the largest possible double:

root [1] std::cout << "Maximum value for a double: " << std::numeric_limits<double>::max() << std::endl;
Maximum value for a double: 1.79769e+308

so it seems like my use case still far far away from “extreme”. but i got abnormal values as I took them and multiplied (i will check on my own).

1 Like

see TH1F bin content saturation · Issue #6671 · root-project/root · GitHub

  - TH2F : histograms with one float per channel.  Maximum precision 7 digits, maximum integer bin content = +/-16777216 (\ref floatmax "**")
  - TH2D : histograms with one double per channel. Maximum precision 14 digits, maximum integer bin content = +/-9007199254740992 (\ref doublemax "***")

OK, i see.
so i am safe in terms of individual bins and total entries …

ok, i just discovered that i did a cast to int for the entries (double) which caused the “abnormal numbers”

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