Re: New SetBranchStatus behaviour in root 2.23/08

From: Rene Brun (Rene.Brun@cern.ch)
Date: Thu Nov 25 1999 - 09:38:09 MET


Hi Mark,
Sorry for the delay to answer your mail.
this problem is fixed in 2.23/09

Rene Brun

Mark Boulay wrote:
> 
> 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:43 MET