TH1 GetRMS and GetRMSError


Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided


Hi. Sorry for the silly question: is there a minimum number of entries for these functions to run? what would happen (and which value would be returned) in case of 0/1 entries?
Thanks a lot

Try it! Or follow the documentation links (“Definition at line…”) to see what happens in the code.

I get a crash, that’s the reason I asked :sweat_smile:. From the links it seemes to me it returns 0

Even if there are no entries, both RMS and RMS error equal zero:

TH1F* myH = new TH1F("myH", "My histogram;X;Y", 10, 0., 10.);
printf("RMS = %f, RMS error = %f\n", myH->GetRMS(), myH->GetRMSError());

Your crash is probably due to some other issue.

ok thanks. I never used these functions