hi all
i have a c++ program which does plots. the whole process of creating the canvas, filling it with histos and legends and whatnot happens in a function, which then saves the canvas as pdf/eps. suppose i want to have a copy of the actual plot, so that i can add for instance another TPaveText or something on top, afterwards. is there a way i can return the TCanvas from the function that saves the plot? i’m thinking of something like:
// instead of:
myPlotterClass->drawPlot();
//something like:
TCanvas* c1 = myPlotterClass->drawPlot();
c1->cd();
myAdditionalTPaveText->Draw(“same”);
c1->SaveAs(“modifiedCanvas.eps”);
problem is i’ve noticed that the TCanvas(&TCanvas) copy constructor is private, so i’m not sure how to implement this. is there a way to do this?
thanks
f