GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Bugs, Fixes, Releases » AddFriend
Re: AddFriend [message #4727 is a reply to message #4726] Mon, 23 July 2007 10:57 Go to previous messageGo to previous message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *physik.uni-giessen.de
Hi,

Aleksandra Wronska wrote on Mon, 23 July 2007 09:22

I think AddFriend is used when you want to merge infos from two different trees, but sort of "paralel": e.g. in tree1 you store energy loss and in tree2 you store momenta for the same collection of events.


Indeed this is what I wanted to do, merge different but parallel trees with different informations (one with MCTrack, the pther with reconstruction categories). The only problem is that the simulation part was composed by several files, while the reconstructed one only by one.

Quote:


If you want to add trees one after the other, you should rather use the chain mechanism, I guess:
TChain t("cbmsim");
t.AddFile("$DATA/panda/kick/bigdata_mega.root");
t.AddFile("$DATA/panda/kick/bigdata_mega_1.root");
etc...




Well, I decided to do the contrary of what I did before, so to define the tree with the simulation and the friend which contains the only reconstruction file:

TChain t("cbmsim");
t->AddFile("$DATA/panda/kick/bigdata_mega.root");
t->AddFile("$DATA/panda/kick/bigdata_mega_1.root");
t->AddFile("$DATA/panda/kick/bigdata_mega_2.root");
t->AddFile("$DATA/panda/kick/bigdata_mega_3.root");
t->AddFriend("cbmsim","$DATA/panda/kick/full_bigdata_mega.root");


In this way I get no warning, but the analysis crashes at the same point.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon8.gif
Previous Topic: Dashboard oflline
Next Topic: cbmRunAna.cxx AddFile AddFriend
Goto Forum:
  


Current Time: Fri Dec 03 11:39:37 CET 2021

Total time taken to generate the page: 0.02261 seconds