Dennis,
It is not completly clear what you want to do. Here is a solution
to my interpretation of your question:
TChain *MakeChain(const char* name) {
TChain *chain = new TChain(name);
chain->AddFile("file1.root");
chain->AddFile("file2.root");
chain->AddFile("file3.root");
chain->AddFile("file4.root");
return chain;
}
void test() {
TChain *chain1 = MakeChain("T1");
chain1->Draw("x");
TChain *chain2 = MakeChain("T2");
chain2->Draw("x","","same");
TChain *chain3 = MakeChain("T3");
chain3->Draw("x","","same");
}
Rene Brun
Dennis C. Arrogancia wrote:
>
> Dear ROOTERS,
>
> I have 4 different files say f1.root, f2.root, f3.root, and f4.root.
> Each file contains three trees, "T1","T2", and "T3". I want to compare it
> by superimposing the variables in each of the trees from the 4 files and
> draw it in a histogram. How can i do it? Can anyone give me an example?
>
> dennis
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:40 MET