[ROOT] Using Chains

From: Bernard Andrieu (andrieu@in2p3.fr)
Date: Tue Apr 09 2002 - 16:16:27 MEST


Hello,

I have several questions about Chains. I use e.g. 2 files each
containing the Tree "Global":
TChain mychain("Global")
mychain.Add("file1.root")
mychain.Add("file2.root")

1) 
When I do:
Global.Print()
I get a description of all Branches of the Tree, which is nice, but for
each File, which is very unconvenient. Is this normal? How to avoid it?  

2)
Where can I find the description of the options of Print()? If I go on
the "Root Clas Categories" web page -> "Tree and Ntuple Classes"
->"TChain" ->"Print", or directly to the following adress:
http://root.cern.ch/root/html/TChain.html#TChain:Print
I get this:
void Print(Option_t *option) const
but I don't see what options can be given, and what do they mean.

3)
Is there a way of printing only the Branches which have been selected by
using Global->SetBranchStatus("*",0)
Global->SetBranchStatus("branchname",1)?

4)
Last remark about what can be called not a bug, but an "unconvenient
feature", of SetBranchStatus. If I do:
Global->SetBranchStatus("*",0)
Global->SetBranchStatus("cal",1)
Global->SetBranchStatus("cal",0)
//Correct misspelling: the name of the Branch is CAL in capital letters
Global->SetBranchStatus("CAL",1)
Global.Draw("ncal")

I get the following error messages
Error in <TTree::SetBranchStatus>: unknown branch -> cal
Error in <TTree::SetBranchStatus>: unknown branch -> cal

and I cannot get rid of these messages even if I do:
Global->SetBranchStatus("*",0)
Is there a way to turnaround this problem?

                       Thank you,
                              Bernard Andrieu



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:48 MET