Hi,
I have two branches “br” and “brCut” inside a tree name “tree”. In the root file, order of the branch is first “br” and then “brCut”. I want to scan (or draw) a variable “mag” from the “brCut”. My sample code is:
TChain *chain = new TChain("tree");
chain->Add("*.root");
chain->SetBranchStatus("br", 0);
chain->SetBranchStatus("brCut", 1);
chain->Scan("mag");
Error is:
Error in <TTreeFormula::DefinedVariable>: the branch "br" has to be enabled to be used
Error in <TTreeFormula::Compile>: Part of the Variable "mag" exists but some of it is not accessible or useable
It looks like, it tries to find the first branch by default unless it is written explicitly as
"chain->Scan(“brCut.mag”)".
Any suggestion?
Thanks.