Re: Drawing the leafs of TTrees

From: Philippe Canal <pcanal_at_fnal.gov>
Date: Thu, 21 Aug 2008 11:58:48 -0500


Hi Ilya,

What do you mean by a "standalone" script? Are you writing your own main in this case?

> That works perfectly for interactive shell (of course, without SetBatch).

It does work _with_ and without the SetBatch in my case ...

Cheers,
Philippe

Ilya Orlov wrote:
> 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 - 18:58:54 CEST

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