Alkass
March 20, 2009, 11:48am
1
Hello!
I am trying to TChain two .root files, each one with a different TTree name and structure . Is it possible?
I first thought to use the MakeClass, with TFriend, but does not work (actually, same problem as in here root.cern.ch/phpBB2/viewtopic.php?t=8238 )
so, my only hope is to TChain them…
By just
[code] TChain * chain = new TChain();
chain->Add("All.root/LHEF");
chain->Add("All.root/LHCO");[/code]
fails…
Thanks in advance
Alexis
pcanal
March 24, 2009, 12:08pm
2
[quote]each one with a different TTree name and structure[/quote]A TChain assumes that each of the tree have a similar structure (but possibly different tree name). You indeed will need to use Friends (and 2 separate MakeClass)
Cheers,
Philippe.
Alkass
September 24, 2009, 6:38pm
3
Can you plz give a specific example?
For example
[code]
TChain *ch1 = new TChain(“Dir1”);
TChain *ch2 = new TChain(“Dir2”);
ch1->Add(“File1.root”);
ch2->Add(“File2.root”);
ch1->AddFriend(ch2, “Dir2”);[/code]
and then what???
if
ch1->MakeClass("name");
ch2->MakeClass("name2");
will create two seperate classes, but how can I have 1 class out of those two above?
Thanks for your time and help
Alex[/code]
pcanal
October 2, 2009, 5:55am
4