Re: Memory Consumption By Histogram

From: Rene Brun <Rene.Brun_at_cern.ch>
Date: Mon, 15 Nov 2010 09:50:14 +0100


The size in memory of a TH2F is

     nbytes = sizeof(TH2F), ie 620 bytes on a 32 bit machine or 904 on a 64 bits machine

  + 4*(nx+2)*(ny+2) bytes   for storing the bin contents
  + 8*(nx+2)*(ny+2) bytes if you have called Sumw2
  + the number of characters in the title, xtitle, ytitle

Rene Brun

xsatya wrote:
> Hi,
>
> Could any one tell me how to calculate memory taken my a TH2F and
> TProfile. Mean to say how to calculate memory assigned for a histogram
> if i declare a histogram with bin and bin width. Is there any link to
> know it?
>
> With regards,
> satya
>
>
> --
> ---------------
> Research Student,
> High Energy Physics, India.
Received on Mon Nov 15 2010 - 09:50:18 CET

This archive was generated by hypermail 2.2.0 : Mon Nov 15 2010 - 17:50:02 CET