Description
Check duplicate issues.
- Checked for duplicates
Description
When a TChain
is added as a friend to a TTree
, branches coming from the TChain
are no longer updated after switching to the second file in the chain.
Reproducer
The attached macro reproduces the issue. Save it bugDemo.C
and run it. The correct behavior is to always print true
, but we get some false
.
The code first constructs two trees with an index
branch. The index is the entry number, going from 0 to 10 in the first file and 10 to 20 in the second one. Then, a longer tree is constructed with 20 empty entries. The two files containing the entry number as merged into a chain and attached as a friend to the empty tree.
Iterating over the long tree yields the correct value of index
until the 10th entry, than a constant 9 (the last value in the first file). Correct behavior is 0 to 20. This can be obtained by wrapping the long tree in a TChain
.
The underlying issue is that TTree::LoadTree
lacks the following code present in TChain::LoadTree
:
Lines 1407 to 1434 in 2cc4b70
ROOT version
Seen in:
- ROOT 6.30/04 (anaconda)
- ROOT 6.28/04 (LCG 104)
I couldn't find any code change in master
in the relevant areas.
Installation method
anaconda and LCG 104
Operating system
Linux (CentOS 9, Ubuntu 22.04, Ubuntu 24.04)
Additional context
Possibly related to the following Jira tickets:
- https://its.cern.ch/jira/browse/ROOT-10778 (open)
- https://its.cern.ch/jira/browse/ROOT-2935 (reportedly fixed in 6.04.00)
Metadata
Metadata
Assignees
Type
Projects
Status