Setting and getting a bin content for TH1D and TProfile

Hi,
a TProfile displays the average values in y with respect to x.
SetBinContent on a TProfile does not make then much sense.
You should use Fill for filling the contents of a profile. If you have already the y values and the errors, then you should use directly an histogram.

Best Regards

Lorenzo