Dear Root experts
I am trying to automatize a couple of fits, therefore I have put both the TGraphErrors* and TF1* in 2-dimensional vectors:
std::vector< std::vector< TGraphErrors* > > tgraphs;
std::vector< std::vector< TF1* > > fit_tf1s;
However when inside a loop I execute:
I unfortunately get the error message: “Warning in : Fit data is empty”. However when I iterate over the elements of my tgraphs[i][j] i see it is not empty ( i can print all elements to screen) and also when I draw my tgraphs[i][j] I am able to see my points (and not the fitted curves, since the fit failed earlier …). Does somebody have an idea what is going on and why ROOT is not able to extract the values of tgraphs[i][j] to give it to the fitter?
I have attached my root macro and an input txt file. Executing
root -l TownsendCoefficient_doublefit_PScan_Automatic.C+ should show you the error message. The line I think is not working is line 181.