Hi again, Maybe I'm just plain wrong when assuming that I can use 'SetBranchStatus' this way, that is, inside the loop. What I wanted to do is to write some group of data only when needed, because they were seldom read from the acquisition. I thought I could create a branch for it and activate the branch only when new meaningful data are present, call TTree::Fill and then desactivate the branch again. Maybe this is not the purpose of TTree::SetBranchStatus... But then, how can I do this ? Do I have to write several trees ? Yannick On Thu, 15 Feb 2001, Patois Yannick wrote: > Hello rooters, > > I'm surprised by the behavior of desactivated branchs. > I wrote a small code doing: > > for (int i=0;i<100;i++) > { > A=i;B=10*i; > if ((i)&&(!(i%10))) > {printf("%d\n",i);test_tree->SetBranchStatus("B",0);} > else test_tree->SetBranchStatus("B",1); > test_tree->Fill(); > }
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:36 MET