Dear experts,
I have a code which should clone 2 trees in 2 separate directory:
- the 1st clone tree should be a simple clone (without changes).
- the 2d tree is a clone after a branch has been disable.
When I clone with 10000 entries everything is fine for both clone trees, but when I clone with 200000 evt for ex, the 1st clone tree does not contain the branch that I disable after I cloned it.
This is a piece of code:
1 TTree* itree=(TTree*)idir->Get(“t”);
2 odir =(TDirectory*)ofile->mkdir(idir->GetName()); odir->cd();
3 itree->CloneTree()->Write();
4 itree->SetBranchStatus(“jtpt”,0);
5 TTree* otree = (debug) ? itree->CloneTree(10000) : itree->CloneTree();
6 itree->SetBranchStatus(“jtpt”,1);
…
What is weird is that both clones are ok when at line 5 I’m clonning with a low entries number:
TTree* otree = (debug) ? itree->CloneTree(10000) : itree->CloneTree();
but when I changed line 5 into:
TTree* otree = (debug) ? itree->CloneTree() : itree->CloneTree(200000);
the clone tree created at line 3 does not contain the branch disable at line 4.
Do you have an explanation for this?
Regards