ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided
Hello,
I currently have a vector of TGraphAsymmErrors (around 150 graphs), which are my efficiency graphs. I am trying to save all these graphs as separate TCanvas, so I would like 150 TCanvas files. I tried creating a for loop to save it, however, it is giving me segmentation fault errors.
for (int graph = 0; graph < Graphs.size(); graph++){
TCanvas *canvas = new TCanvas((const char*)(StringLabels[graph]),(const char*)(StringLabels[graph]),1);
TGraphAsymmErrors *efficiency;
efficiency = Graphs[graph];
canvas->SaveAs((const char*)("efficiency_" + StringLabels[graph]+".root"));
canvas->Close();
canvas->Clear();
canvas->Update();
}
The reason why I was doing this is because when I open these graphs in the TBrowser, it did not save my Draw Options. I wanted to draw a graph without the connecting lines, so I had efficiency->Draw(“AP”), however, when I opened in the TBrowser, the lines connected the dots.
Does anyone have a solution to this? I am using C++ with ROOT version 5.34/10.
Thank you,
ppajarillo