Re: Drawing the leafs of TTrees

From: Ilya Orlov <Ilya.Orlov_at_cern.ch>
Date: Thu, 21 Aug 2008 17:42:13 +0200


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 -

> 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);
Received on Thu Aug 21 2008 - 17:42:26 CEST

This archive was generated by hypermail 2.2.0 : Thu Aug 21 2008 - 23:50:01 CEST