[ROOT] Crashes when using TNtuple's friend

From: jgonzalez@neuub0.physics.neu.edu
Date: Thu Nov 07 2002 - 22:45:32 MET


Hi

I get a segmentation fault whenever I use TNtuple's friends. It crashes
when it's closing the file. If I use two loops (one for each n-tuple) then
it works, but unfortunatelly I can't do that allways. To open the file I
used just:
TFile* theFile = new TFile(argv[1]);

The only changes I make are:
1)
theNtuple->AddFriend("DecayTime");
instead of:
TNtuple* timeNtuple = (TNtuple*) gROOT->FindObject("DecayTime");
2)
the branch addresses:
theNtuple->SetBranchAddress("DecayTime.time1",&time1);
instead of
timeNtuple->SetBranchAddress("time1",&time1);
3)
and then one loop over 'theNtuple' instead of one over each n-tuple. 

Either way it does the calculation, but...
Why does it crash in one case and not in the other?


Javier



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:16 MET