Saving Fitted TH1D and Saving fit values

hello everyone,
I’ve been experiencing some troubles in finding the right instructions to insert in a C++ macro to be run inside ROOT framework (v5.26/00).

I create several TH1D and draw them inside a TCanvas properly divided. Then I change some options such as Stat_box Height or Width and the FIlling color of the pad and of the histos.

moreover I ask to ROOT to perfom a gaussian fit on every TH1D and change the Stat options through the command lines

  gStyle->SetOptStat("ne");
  gStyle->SetOptFit(0022);

unfortunately I have 21 of these TCanvases containing 14 TH1D drown inside and fitted, and since I need the fit values of each TH1D stored as a datafile (.out , .txt, or .root for example), I was wondering if it was a method of some class that enable me to do such thing.
Could someone help me???

Thanks,
Davide

PS
I’m posting because I already searched through this forum and couldn’t find any thread on this issue of mine.
Please let me know if such thread already exists.

Hi,

sorry - which part are you looking for exactly? You already quote the lines for the stat and fit box; do you wonder where to place them? To get the fit results you can get the function you used for fitting and query its parameters.

If my reply didn’t help please be more specific, e.g. by sending in a (stripped but working) version of your code that demonstrates what you are missing.

Cheers, Axel.