Get x-value for maximum y-value


I have a histogram and I would like to read for the maximum value in the y-coordinate the corresponding value in the x-coordinate.
For example I have one 1D histogram (entries versus parameter) and I want to take the parameter value which has the maximum entries.
I’m totally new to ROOT so sorry if this has already been answered.

Thanks a lot,

see TH1::GetMaximumBin … MaximumBin