[ROOT] TTree::MakeClass - name of the loop index variable

From: Pasha Murat (630)840-8237@169G ((630)840-8237@169G)
Date: Sat May 06 2000 - 01:00:50 MEST


Hello Rooters,

I have a minor suggestion which results from numerous pilot errors
of mine which I'm making regularly when using the code generated 
with TTree::MakeClass. Here is the deal. The autogenerated code 
uses `i' as an index to loop over the tree entries:

   for (Int_t i=0; i<nentries;i++) {
      if (LoadTree(i) < 0) break;
      nb = fTree->GetEntry(i);   nbytes += nb;
      ....... place for the user code ..........
   }

One of the first things I'm normally doing within this loop is
creation of a (nested) loop over the objects stored in the event
(i.e. tracks). And a preferred choice for the index of the inner loop 
for me is also `i' with all the easily predictable consequences...

In case I'm not alone - wouldn't it make sense to name the index variable 
of the autogenerated loop something like `ientry' rather than `i' ?

						thanks, pasha



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:24 MET