Re: [ROOT] Alpha/Linux and a TTree::Branch crash

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri Jul 26 2002 - 23:25:24 MEST


Hi Thomas,

What you do is illegal. You should do

MPhoton *photon = 0;
MElectron *electron = 0;
TBranch *B1=T1->Branch("MPhoton.",   "MPhoton",   &photon);
TBranch *B2=T2->Branch("MElectron.", "MElectron", &electron);


Rene Brun


On Wed, 24 Jul 2002, Thomas Bretz wrote:

> Hi,
> 
> why does the follwing work on Linux (Suse 7.3, root 3.02/06) but not on
> Alpha (Tru64 Unix 5.1, root 3.02/07):
> 
> void *ptr = NULL;
> TFile file("name", "RECREATE", "", 9);
> TTree *T1=new TTree("P", "");
> TTree *T2=new TTree("E", "");
> TBranch *B1=T1->Branch("MPhoton.",   "MPhoton",   &ptr);
> TBranch *B2=T2->Branch("MElectron.", "MElectron", &ptr);
> 
> while MPhoton and MElectron are only container classes (derived from
> TObject) storing values (no arrays, no pointers, only floats). The
> Address is later on setup with B1/B2->SetAddress(..) before calling
> Fill.
> 
> On Alpha the second call to T2->Branch craches...
> 
> Thanks,
> Thomas.
> 



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