Storing the convariance matrix

Dear ROOT experts,

we save the fit in a ROOT file together with the fitted TGraph / TH1 for later processing (by reading the file and accessing the saved function).

We would now like to use the covariance matrix of the fit, which doesn’t appear to be saved though (or did we miss it?). We were wondering what would be the best way to save the covariance matrix as well. We thought we can simply save it under a different name, but the TMatrixT class inherits TObject, not TNamed.

Thank you for any suggestions!


Any TObject derived class can be written to a file with
mymatrix->Write(“somename”); or mydirectory->WriteObject(mymatrix,“somename”);