How to store the fitting parameters in a txt file?

Hello,

I am new to ROOT and I have to use it for my labwork. I am writing a macro to fit a histogram and I want to have the fitting parameters being printed in a separate txt file instead of just appearing on the terminal.

Could you guys please help me with that?

Best,
Homi.

Hi Homi,

you can retrieve the parameters from a TF1 with the GetParameter method (see root.cern.ch/doc/master/classTF … 8f5a5bb076). Then you can write their names and values on separate file.

Cheers,
Danilo

1 Like