[ROOT] TTree::SetBranchStatus & TChain::LoadTree

From: Manuel Sanchez (manuel@fpddux.usc.es)
Date: Wed Jun 07 2000 - 18:01:56 MEST


Hi Rooters,

These are two oddities (bugs?) in the code (ROOT 2.24/05):

1) for SetBranchStatus:
 
	When the status of a branch (A) in a TClonesArray is altered the
corresponding LeafCount() is activated independently of what we are doing to
the branch (A). IMHO this LeafCount() branch should only be activated when (A)
is being activated but not when it (A) is being deactivated. Otherwise
one has to write some weird code in order to deactivate all branches in a
TClonesArray, which is needed under certain circumstances. (namely, trying to
read a Tree with not all the classes in the Tree's TClonesArrays being added to
the dictionary) 

Or am I missing something?

(P.S: Maybe it is not obvious but with "activate"  I mean setting status to 1
and deactivate means setting status to 0)

2) for TChain::LoadTree

	When a entry is asked which is not available in all the trees of the
chain (i.e. entryNumber > chain.GetEntries() ). The LoadTree() function deletes
the currently file opened and returns an error code. That's perfect, but when
deleting the file the "fFile" pointer is not set to 0, therefore in the
destructor of the class 

if (fFile) delete fFile;

calls the TFile destructor a second time delivering a SEGV 

  	
Best Regards,
Manuel


---------------
Manuel Sanchez Garcia (manuel@fpddux.usc.es)
Univ. Santiago de Comp.



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