TH1::FIt option '0'

I attach two example macros, makeHisto.C and fitHisto.C. The first one opens a file, creates a histogram, and saves it. The second opens the file for updating, fits it, and (is supposed to) store the fit function with the histogram in the file. I don’t want the histogram/function to be drawn though, so I specified “Q0” as the fit option. Unfortunately, the function doesn’t get stored this way, why? How can I achieve that the fit be stored without drawing it? Thanks a lot for any hints!
Cheers, Philipp
fitHisto.C (237 Bytes)
makeHisto.C (291 Bytes)

When you specify the option “0” (that means do no draw the function), the function object is marked as such and this information is persistent. If you change your mind later, eg when reading the histo from your file, you have to reset the bit indicating that this function should not be drawn. I suggest reseting this bit in fitHisto.C just before “file->Write” add: