[ROOT] Inconsistency in ROOT documentation for Branch def

From: Eddy Offermann (eddy@rentec.com)
Date: Fri Apr 27 2001 - 04:35:48 MEST


Hi Susan,

Please have a look at http://www-pat.fnal.gov/root/Persistence/Persistence_v1.1.htm,
section 2.1.3:
 
"With this Branch method, you can also add a leaf that holds an entire array of
variables. To add an array of floats use the f[n] notation when describing the
leaf. 
 
   Float_t f[10];
   tree->Branch("fBranch",&f,"f[10]/F");
"
and and the tutorial example tree1.C

   Float_t px[kMaxTrack];
   t1->Branch("px",px,"px[ntrack]/F");

In the first one the address of the pointer is given ("&f") while
in the second one ("px") just the pointer. The second definition
is in agreement with case "A" in the tree description.


It is interesting to note that BOTH cases work !! Rene, how can that be ?

best regards, Eddy



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:43 MET