Histogram get mean of the entries

Hi

I guess this is a classic, but I can’t find the answer in the documentation. I have a histogram and I want to access the mean and RMS of its entries at filling time and not discretised by bins. Which option activates this?

Thanks
Salva

root.cern.ch/doc/master/classTH … 55155d9a06
root.cern.ch/doc/master/classTH … f593b0340e