you can extract all functions fitted to a certain histogram with the method TH1::GetListOfFunctions().
Of course if you want to write out some feature of these functions, such as values of the parameters or their uncertainties, you’ll have to write a simple routine for that.
I have successfully saved my TGraph using TList*TGraph::GetListOfFunctions(). I am currently doing my head in to understand how I can go about extracting the functions from it. I can’t find any example regarding it.
The TList doc (root.cern.ch/doc/master/classTList.html) has some documentation on iterating over a TList, but how could I use those examples to extract the functions of interest?
you’ll have a list of pointers to functions. You’ll have to iterate through it or use FindObject to identify your function. Note that if you fit only one function, there will be one function in the list.
The issue previously was that I thought I could fetch the interpolation done when you do TGraph::Eval(). Since it doesn’t require you to do an interpolation yourself.