Get maximum on x abscissa from a Histo

Hi,

sorry for this very naive question:
what is the easiest way to retrieve the maximum* on the x abscissa of a 1D histo ?
(there is an analog of GetV1() for a 1D histo ?)
Thank you
olivier

*histo->GetXaxis()->GetXmax() give the total length of the x abscissa and not the value
of the maximum x of my histo

[quote]*histo->GetXaxis()->GetXmax() give the total length of the x abscissa and not the value
of the maximum x of my histo[/quote]I am not sure what you mean … any value of ‘x’ larger than xmax would be recorded in the ‘out-of-bounds’ bin (and the actual value would be lost).

Cheers,
Philippe.

Hello Philippe,

thank you for your reply.
Here my point. If you do a projection from a ntuple to a 1D histo
ntuple->Draw(“E>>h”) and you ask histo->GetXaxis()->GetXmax()
root returns the maximum x value of your histo (and this is what I want).
Now if you have a 1D histo and you ask histo->GetXaxis()->GetXmax()
root gives you the x maximum boundary of your histogram i.e the xup value.
I would like to have the x maximum value of this 1D histo (see red arrow on my plot) and not the x maximum boundary …
Hope I am clear
Thank you
Olivier
Ps: sorry for the delay but I don’t received any email when someone post me a reply :frowning: