Histogram error bar for relative counts

Dear expert,

I have a question that is probably very simple.
I am wondering how the error bar on histogram is calculated in a case of normalized count.
I am explaining:
For an histogram of counts, we assume a Poisson distribution and consider that the error on the count (Ni) in a bin i is the square root of the count sqrt(Ni) at 1 sigma.
However, in the case of a normalized count histogram (% of the total count), we plot Ni/Nt in % in the bin i where Nt is the total count. In such a case, how is calculated the relative error on the relative count?

Many thanks in advance for your answer.
Yours,
Thomas

Probably @moneta can answer better but AFAIK, it depends how you fill your histogram.
If you fill it directly with the normalized count, then the error will be sqrt(N) where N is your noramlized count. However, if you fill the histogram with the non-normalized count and you then call the Scale method to normalize it, the error will be updated as described in this piece of code.