Well, however you answered my question. Thank you for that.
GetMinimum, GetMaximum doesnt work in my program, but probably it doesnt for other reasons. (For example GetMaximum returned 72 , where xmax is 15; therefore I thought GetMaximum() is not what I think it is; but now I will have a close look)
and instead of h->GetXaxis()->GetXmin(), Xmax, Nbins, etc I looked for something like h->GetXmin() - and couldnt find it.
Thanks again.
Bernd.
-----Original Message-----
From: Rene Brun
Sent: Wed 6/2/2004 10:36 PM
To: Bernd Reinhold
Cc: roottalk@pcroot.cern.ch
Subject: Re: [ROOT] TH1D, getmean, getRMS, getMinimum...
Hi Bernd,
I do not understand your question. All what you request is already
provided by the TH1 class.
Assuming TH1* h, you can do
h->GetMean()
h->GetRMS()
h->GetEntries()
h->GetMinimum(minval); //Return minimum value greater than minval of
bins in the range
h->GetMaximum(maxval); //Return maximum value smaller than maxval of
bins in the range
h->GetXaxis()->GetXmin(), Xmax, Nbins, etc
h->GetYaxis()....
Rene Brun
On Wed,
2 Jun 2004, Bernd Reinhold wrote:
> Hi!
>
> Is there a way to get the following information from the histogram? (TH1D as
> input to the function (as reference), and as output the following infos:)
>
> mean, RMS, entries do work - that works with h1.GetMean(), h1.GetRMS,
> h1.GetEntries()
> minimum - I tried GetMinimum(), however this didn't work as expected. I want
> to have the minimum entry in the histogram, that is bigger than xmin.
> maximum - didn't work as expected, either...
> xmin, xmax, numberofbins (the last three parameters in the TH1D-constructor)
>
> thank you for your help, Bernd.
>
>
This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:08 MET