RE: [ROOT] aliases for tree variables

From: Valeri Tioukov (Valeri.Tioukov@na.infn.it)
Date: Tue Jun 24 2003 - 11:21:31 MEST


On Mon, 23 Jun 2003, Philippe Canal wrote:

> Hi Valeri,
>
> One of the many ways:
> 	TString x = "tdc1[1]-tdc1[0]/49";
> 	TString y = "tdc1[3]-tdc1[2]/47";
> 	tree->Draw(y+"%"+x);

I would prefere smth like:

TTreeViewer v(tree);
v.AddAlias("x1","(tdc1[1]-tdc1[0])/49");
v.AddAlias("y1","(tdc1[3]-tdc1[2])/47");
v.AddAlias("x2","(tdc2[1]-tdc2[0])/49");
v.AddAlias("y2","(tdc2[3]-tdc2[2])/47");
v.Draw("y2-y1:x2-x1");

In viewer there is gui for moreless similar functionality, but it is not alwais
convenient (as in the above case for example) to drag many variables by the
scring.

May be there is already API to this funtions? It is not obvious from the
documentation.

Regards,
Valeri

>
> Cheers,
> Philippe.
>
> -----Original Message-----
> From: owner-roottalk@pcroot.cern.ch
> [mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Valeri Tioukov
> Sent: Monday, June 23, 2003 8:32 AM
> To: roottalk
> Subject: [ROOT] aliases for tree variables
>
>
> Hi Rooters,
>
> What is the simpliest way to get in root the same effect
> as I can do in paw with lines:
>
> alias/cre x tdc1[1]-tdc1[0]/49
> alias/cre y tdc1[3]-tdc1[2]/47
> nt/pl 1.y%x
>
> Regards
> Valeri
>
>
> #################################################################
> #################################################################
> #################################################################
> #####
> #####
> #####
> #################################################################
> #################################################################
> #################################################################
>
>



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:12 MET