Typecasting Histograms

Dear all,
I have a TH1I histogram filled with data from a root file

TH1I* histInt; //get data from root file...
Now, say I would like to normalise its content to 1. Then, in order not to get zeros because of C++, I need to convert its entries to floats or doubles. If I simply do

TH1F* histFloat = (TH1F*) histInt;

, I still have integers in the histogram entries and a normalisation simply leads to zeros in every bin. To solve this problem, I extracted all the data from histInt and filled histFloat with the manually typecasted to float values.

Is there an easier, maybe native way of doing this? I tried histFloat = (TH1F*) histInt->Clone();, but that did not work either.

Kind Regards

I think you need to create a completely new TH1D or TH1F histogram and copy the contents from the old TH1I (in a loop, bin by bin).