Horizontal error bars in TProfile

This may be a silly question, but is there a way set the error bars in the horizontal direction of a TProfile to the error on the mean of the x-values in this bin? Currently it sets it to half the bin width. Could the points also be set to the average value of x in this bin as opposed to the centre?

I realise this is easy with TGraphErrors but I am using a TH2D::ProfileX() to generate the profile. How do I convert between the two?

Thanks,
Ben

When using binned histograms the information on the distribution per bin is not kept. One could imagine a new class computing/storing the mean/rms per bin (for histograms and profiles). If somebody develops this class let us know.
You can also use a TProfile and fill it with the same variable in x and y.

Rene