That works perfectly for interactive shell (of course, without SetBatch).
But for some (weird?) reason in automated mode -- I mean C++ standalone script -- FindObject("Graph") still returns NULL...
-- Best regards, Ilya Orlov. ATLAS experiment, CERN Electromagnetic LAr end-cap calorimeter group - Hide quoted text -Received on Thu Aug 21 2008 - 17:42:26 CEST
> gROOT->SetBatch(kTRUE);
> TCanvas *c = new TCanvas;
> ntuple->Draw("px:py>>myg","","");
> TGraph* gr_tmp = (TGraph*) c->FindObject("Graph");
> // Use gr_tmp
> delete c; // This will delete the canvas and the Graph
> gROOT->SetBatch(kFALSE);
This archive was generated by hypermail 2.2.0 : Thu Aug 21 2008 - 23:50:01 CEST