Hi Rene,
> What you do is illegal. You should do
I think the pointer to a pointer sent to TTree::Branch is more or less a
placeholder, when 0.
However, can you explain me what the difference between:
void *
and
MPhoton* / MElectron*
is?
Thomas.
> MPhoton *photon = 0;
> MElectron *electron = 0;
> TBranch *B1=T1->Branch("MPhoton.", "MPhoton", &photon);
> TBranch *B2=T2->Branch("MElectron.", "MElectron", &electron);
>
> > 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...
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:02 MET