New SetBranchStatus behaviour in root 2.23/08

From: Mark Boulay (mgb@owl.phy.queensu.ca)
Date: Mon Nov 08 1999 - 13:44:22 MET


Hi rooters,

	I've just upgraded to root 2.23/08 from version 2.22/10
	(on Linux RH 6.1) and have noticed the following new
	behaviour.  When using TTree::SetBranchStatus(), it seems
	that setting *any* branch's status to 0 will force all
	the TClonesArray branches to also be set to 0.
	As an example, I have a TTree with two TClonesArray branches
	PMTs and FECDs.  The following code would return a poiner to 
	an element of PMTs in 2.22/10

	{
		TFile f1("test.root","READ");
		T = (TTree *)f1.Get("T");
		QEvent *event = new QEvent();
		T->SetEventAddress(event);
		T->SetBranchStatus("PMTs.Pmthl",0);
		T->GetEvent(0);
		TPMT * pmt = event->GetPMTs()->At(0)
        	(class TObject*)0x7deda8
	}
	where the member GetPMTs() returns a pointer to the TClonesArray
	PMTs.

	If I set any branch status to 0, the above code with root
	2.23/08 returns pmt = NULL.  If I then use
	TTree::SetBranchStatus("*",1) all is fine.


Regards,
Mark.

	
=================================================================
=                                                               =
= Mark Boulay                                                   =
= Department of Physics   phone/voice mail: (613) 533-6861      =   
= Queen's University      fax: (613) 533-6813                   =
= Kingston, Ontario       email: mgb@sno.phy.queensu.ca         =             
= Canada, K7L 3N6         Office 121 (c)                        =
=                                                               =
=================================================================



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:42 MET