Re: [ROOT] Multiple booking

From: Rene Brun (Rene.Brun@cern.ch)
Date: Thu Nov 29 2001 - 08:25:22 MET


Hi Robert,

You likely use a machine with a small amount of memory (32 MB ?)
The 50000 histograms take about 40 MBytes of RAM. If your machine has less
memory, you will do paging all the time.

On my small laptop, your script via the interpreter takes 4 seconds to execute.

Rene Brun

Robert Zitoun wrote:
> 
>   Hi Rooters
> 
>  I am trying to book 50,000 histograms in a macro doing
> 
> TH1F *h[50000];
> char text[100];
> 
>   for( int chan=0 ; chan<50000 ; chan++ )
>   {
>     sprintf(text, "h%d", chan);
>     h[chan] = new TH1F( text, "", 15, 0, 15);
>   }
> 
> It take me 20 minutes to get histos booked. The booking time for one
> histogram increased with its ordinal number (quite fast in the beginnig,
> verrry slow for the last ones). I even used a compiled version to get it
> done in 20'.
> 
>  There is certainly a more clever (faster) way to do it. Can you tell me ?
> Also can you tell why what it did is so long.
> 
>                   Thank you
> 
>                                  Robert Zitoun, Stony Brook and Annecy



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:10 MET