Dear rooters,
I have a small problem when generating code with TTree::MakeCode() for a
TLorentzVector. (In v2.22/09, Linux)
When declaring, I have:
TLorentzVector *eff_HCMjet;
effTree->Branch("HCMjet","TLorentzVector",&eff_HCMjet,bsize,0);
( I want to have a Tree branch named "HCMjet" which is assigned the
eff_HCMjet in my program. Is it right to pass the address of a pointer to
TTree::Branch as done above? Nothing else seems to work.)
A subsequent effTree->MakeCode() yields these lines:
TLorentzVector *HCMjet;
[...]
effTree->SetBranchAddress("HCMjet",&TLorentzVector);
^^^^^^^^^^^^^^^ ?
while I would expect &HCMjet in the latter expression.
I have found that changing
*** TREE_Tree.cxx.orig Thu Sep 2 16:25:33 1999
--- TREE_Tree.cxx Thu Sep 2 16:26:33 1999
***************
*** 2401,2407 ****
leafcount =leaf->GetLeafCount();
TBranch *branch = leaf->GetBranch();
if (leafcount) strcpy(branchname,branch->GetName());
! else strcpy(branchname,leaf->GetTitle());
bname = branchname;
while (*bname) {if (*bname == '.') *bname='_'; bname++;}
char *brak = strstr(branchname,"[");
--- 2401,2407 ----
leafcount =leaf->GetLeafCount();
TBranch *branch = leaf->GetBranch();
if (leafcount) strcpy(branchname,branch->GetName());
! else strcpy(branchname,leaf->GetName());
bname = branchname;
while (*bname) {if (*bname == '.') *bname='_'; bname++;}
char *brak = strstr(branchname,"[");
yields the correct line:
effTree->SetBranchAddress("HCMjet",&HCMjet);
I have found no mention of a problem like this on the root www-site,
including the roottalk digest.
Is this really a bug or have I just modified my Tree.so library to account
for a mistake I made in my code?
Thanks in advance,
Mike
--------------------------------------------------------------------------
Michael Sievers
Michael.Sievers@desy.de
--------------------------------------------------------------------------
esa$ gcc -Wall -o ariane5 ariane5.c
ariane5.c: 666: warning: long float implicitly truncated to unsigned type
esa$ ariane5
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:39 MET