Re: TCutG and SetEditorMode("CutG")

From: Rene Brun (Rene.Brun@cern.ch)
Date: Thu Feb 17 2000 - 22:29:48 MET


Faouzi,
Yes, this is possible if you use 2.23/12.
We introduced a new function TPad::WaitPrimitive
do do this job. See function description and its
extensive help.
At the command line or inside a macro, you do:
 TCutG *cutg = (TCutG*)gPad->WaitPrimitive("mycut","CutG")
This statement will block the execution until you click
with the mouse in the pad the contour of the cut and close
the cut by clicking twice on the same point.

Rene Brun


On Thu, 17 Feb 2000, Faouzi Attallah wrote:

> Hi Rooters,
> 
> A silly question by the end of this day (here in Europe):
> Any example of application of TCutG to a histogram cause
> I failed to get profite from the help 
>         http://root.cern.ch/root/html/TCutG.html#TCutG:description
> 
> In addition, if one writes in a macro, 
> 
> 	SetEditorMode("CutG") ;   // the Graphical Cut editor
> 	cerr << "Nbr of Pts=" << CUTG->GetN() ;
> 
> the Nbr of Pts is always 0 because you get to "cerr" command
> before you set your points on the histogram. 
> 
> Rene, is there any way to access the points clicked with the mouse
> only when you finish drawing the contour -> in an other way, is it possible
> to "pause" the exit from the Editor till you finish the contour.
> 
> Many many Thanks
> 
> Faouzi
> -- 
>  F. Attallah 
> GSI mbH 
> Planckstr 1
> D-64291 Darmstadt 
>   Tel: +49 (0)6159 71 2743
>   Fax: +49 (0)6159 71 2901
> Email: F.Attallah@gsi.de
> 



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:19 MET