Re: PROOF: TTree::Draw() strangeness with canvas handling

From: Gerardo Ganis <gerardo.ganis_at_cern.ch>
Date: Tue, 3 Feb 2009 12:17:19 +0100

   Dear Thiemo,

   Thanks for the feedback.

Thiemo Nagel wrote:
> However I'm still not happy with the canvas handling.
>
> Two examples:
>
> A) Starting a fresh ROOT session with
>
> chain->Draw("bla>>(100, 0, 100)")
>
> will create a canvas called htemp that is both used for feedback and to
> plot the final histogram. That's fine.
>
> Calling the same again
>
> chain->Draw("bla>>(100, 0, 100)")
>
> will reuse the same canvas for feedback and also for the final
> histogram. That's fine.
>
>
> B) If I start a fresh ROOT session and call
>
> chain->Draw("bla>>histo1(100, 0, 100)")
>
> I will get a canvas called histo1_canvas which again is both used for
> feedback and for the final histogram, which is fine again.
>
> But if I now start another
>
> chain->Draw("bla>>histo2(100, 0, 100)")
>
> this will create a new canvas called histo2_canvas (for feedback) but
> also will overwrite the existing histo1_canvas with the final result,
> which I find rather counter-intuitive.
>
> I think it would be more consistent, if
> 1) either both the feedback and final histograms would be plotted to the
> existing histo1_canvas (honoring that it is the "active" canvas)
> 2) or both feedback and final histogram would be plotted in the new
> histo2_canvas (avoiding to clobber the existing canvas)
>
> The current "mixed" way writes to two different canvases, clobbering my
> previous result for no apparent reason. I managed to arrive at case 2)
> by middle-clicking into the feedback canvas while the Draw() was still
> running, however I have no idea how to achieve this by means of a script.
>
> Any ideas?
>

    I agree that the second query should consistently use the second canvas.     I will invenstigate.

    Cheers, Gerri

-- 
+--------------------------------------------------------------------------+
  Gerardo GANIS    PH Department, CERN
        address    CERN, CH 1211 Geneve 23  
                   room: 32-RC-017, tel / fax: +412276 76439 / 69133
         e-mail    gerardo.ganis_at_cern.ch
+--------------------------------------------------------------------------+
Received on Tue Feb 03 2009 - 12:17:23 CET

This archive was generated by hypermail 2.2.0 : Tue Feb 03 2009 - 17:50:01 CET