RE: [ROOT] using several files

From: Philippe Canal (pcanal@fnal.gov)
Date: Thu Oct 04 2001 - 21:42:13 MEST


I suppose that the last line should have been:
	
	root > t2->Draw("px","","same");

The graphical option "same" allowing the surperposition of
the new histogram with existing histograms.

Philippe.

-----Original Message-----
From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Rene Brun
Sent: Thursday, October 04, 2001 4:06 AM
To: Elena Vataga
Cc: roottalk@pcroot.cern.ch
Subject: Re: [ROOT] using several files


Hi Elena,

Elena Vataga wrote:
> 
> Hello!
> 
> I failed to find on root page the following info:
> I need to other-pose plots from 2 different files
> (made with the same code, so histogram names are the same)
> How I could write in root equivalent of the following
> paw input:
> 
> PAW> hi/fi 1 file1.hbook
> PAW> hi/fi 2 file2.hbook
> PAW> nt/pl //lun1/1.px
> PAW> nt/pl //lun2/1.px ! ! ! ! ! s
> 

Assuming that "t" is the name of your Tree in both files, do:
root > TFile f1("file1.root")
root > TTree *t1 = (TTree*)f1.Get("t"); 
root > TFile f2("file2.root")
root > TTree *t2 = (TTree*)f2.Get("t");
root > t1->Draw("px")
root > t2->Draw("px")


Rene Brun



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:02 MET