Re: maximum number of fills in TH3 ?

From: Rene Brun <Rene.Brun_at_cern.ch>
Date: Tue, 19 Jan 2010 12:02:27 +0100


I cannot reproduce your problem with the memory. Note that when drawing your histogram, you should not set the log scale for x and y axis because xmin and ymin are negative. Also do not draw with the default option (scatter-plot) as it may take a long time with this very special case.
Simply replace your graphics lines by
  TCanvas *c1 = new TCanvas("c1","hist",200,10,900,900);   h1->Draw("box");

Rene Brun

Alessio Mangiarotti wrote:
> Dear rooters,
>
> I am experiencing a problem with the TH3 class. I have written a
> simple Monte-Carlo to investigate the PID capabilities of our
> detector. It takes few hours to process the simulated events, but
> because I do not need the full information, I prefer to generate a TH3
> and not a tree. I am experiencing a memory leak with root when I try
> to open the file containing the generated TH3 histograms and plot them
> (essentially root tries to use all the available memory on the machine
> up to 7-8 GB).
>
> In the beginning I thought it was connected to the number of channels
> and so I reduced the dimensions to 100*100*100 channels. The problem
> remained.
>
> I noticed that everything works well if I use a reduced statistics
> (1/10). So I started to experiment with the TH3 class and I believe I
> found a problem when a channel is filled more than 2**31 times. I
> tried to use a TH1 and it works without problems. I attach a small
> simple macro I used to do my checks. I have used root 5.22 and 5.26,
> both have the problem. (Note that the file is written, root only
> stalls after).
>
> Is this a known limitation ? Can it be removed or avoided somehow? If
> not, the limit is in the number of fills for a single channel or for
> all the histogram (then I could add a check in my program)?
>
> Thank you for any assistance,
> Alessio Mangiarotti.
Received on Tue Jan 19 2010 - 12:22:19 CET

This archive was generated by hypermail 2.2.0 : Thu Jan 21 2010 - 11:50:01 CET