Save the output of fit

All I’m trying to do is fit an histogram, then write the output of the fit (the value, error, step size, and first derivative) to .txt file before moving on to the next histogram, for which I wish to repeat the process. Now I can use the GetParameter() and GetParError() to get the value and error. But I do not know how to get step size and first derivative.

I’m new to root/C++, so any help would be appreciated.