Is there a way to grab the title of a TH1F histogram and print it to screen?

HEP_practiceV8.C (50.1 KB)

I am attempting to debug my code that graphs TH1F histograms and I would like to know if there is any functions that gets the title, so that I may print it to the screen. If not, is there a way to convert the name of the histogram variable to a string so that I can print it?


Please read tips for efficient and successful posting and posting code

ROOT Version: 6.22
_Platform: ubuntu 18.04


Hi @Cepheides,
TH1F has a GetTitle method (inherited from TNamed) that should help. See the docs for more info.

Cheers,
Enrico