Hi Javier, I can not reproduce your problem. Can you send me your macro? Which version of ROOT are you using? Thanks, Philippe. -----Original Message----- From: owner-roottalk@pcroot.cern.ch [mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of jgonzalez@neuub0.physics.neu.edu Sent: Thursday, November 07, 2002 3:46 PM To: roottalk@pcroot.cern.ch Subject: [ROOT] Crashes when using TNtuple's friend 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:22 MET