List Info

Thread: Simultaneously accessing data from two trees in different root files




Simultaneously accessing data from two trees in different root files
country flaguser name
United States
2007-12-21 13:59:50
Dear rooters
    I have two root file each containing a tree. The trees
have exactly same architecture. I can draw from a branch
using 
    ===============================
     T1->Draw("Ptlep1")
and 
    T2->Draw("Ptlep1")

   ================================


    But I want to draw the "Ptlep1" from both the
rootfiles (each containing either tree), on the same canvas.
I tried
====================================  
 T1->Draw("Ptlep1")
and 
 T1->Draw("Ptlep1", "same")
====================================== This did not work.
Any Suggestions ????????

A Singh
Fermi LAB


Re: Simultaneously accessing data from two trees in different root files
country flaguser name
Switzerland
2007-12-22 02:06:35
see TTree:raw API.
You should do:

 T1->Draw("Ptlep1")
 T2->Draw("Ptlep1",
"","same")

Rene Brun

Anil Singh wrote:
> Dear rooters
>     I have two root file each containing a tree. The
trees have exactly same architecture. I can draw from a
branch using 
>     ===============================
>      T1->Draw("Ptlep1")
> and 
>     T2->Draw("Ptlep1")
>
>    ================================
>
>
>     But I want to draw the "Ptlep1" from both
the rootfiles (each containing either tree), on the same
canvas. I tried
> ====================================  
>  T1->Draw("Ptlep1")
> and 
>  T1->Draw("Ptlep1", "same")
> ====================================== This did not
work. Any Suggestions ????????
>
> A Singh
> Fermi LAB
>
>   


RE: Simultaneously accessing data from two trees in different root files
country flaguser name
United States
2007-12-27 22:41:09
Hi,

I think you meant:

 T1->Draw("Ptlep1");
and 
 T2->Draw("Ptlep1", "",
"same");

The 2nd argument to TTree:raw (see
Reference's guide) is the selection and
is _not_ the graphic option.

Cheers,
Philippe.

-----Original Message-----
From: owner-roottalkroot.cern.ch [mailto:owner-roottalkroot.cern.ch] On
Behalf Of Anil Singh
Sent: Friday, December 21, 2007 2:00 PM
To: ROOT Talk
Subject: [ROOT] Simultaneously accessing data from two trees
in different
root files


Dear rooters
    I have two root file each containing a tree. The trees
have exactly same
architecture. I can draw from a branch using 
    ===============================
     T1->Draw("Ptlep1")
and 
    T2->Draw("Ptlep1")

   ================================


    But I want to draw the "Ptlep1" from both the
rootfiles (each containing
either tree), on the same canvas. I tried
====================================  
 T1->Draw("Ptlep1")
and 
 T1->Draw("Ptlep1", "same")
====================================== This did not work.
Any Suggestions
????????

A Singh
Fermi LAB



[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )