You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When iterating over c2, branches coming from c1 stop updating after the first file boundary is reached in c1. They start updating again once a file boundary is reached in c2.
I think this is distinct from #16804 because in this case the issues lie in TChain::LoadTree, while for #16804TChain::LoadTree is the sole culprit.
As in #16804, the root cause of the issue is that the following code is not invoked often enough:
Fixing this is much more annoying. For my application, I ended up subscribing to the Notify signal and calling TFriendElement::MarkUpdated again. This is only a partial solution because when c2 loads a new file, it doesn't reset friend elements that were marked updated, which would happen somewhere along this line:
Check duplicate issues.
Description
Consider the following tree loading structure:
When iterating over
c2
, branches coming fromc1
stop updating after the first file boundary is reached inc1
. They start updating again once a file boundary is reached inc2
.I think this is distinct from #16804 because in this case the issues lie in
TChain::LoadTree
, while for #16804TChain::LoadTree
is the sole culprit.As in #16804, the root cause of the issue is that the following code is not invoked often enough:
root/tree/tree/src/TChain.cxx
Lines 1407 to 1434 in 2cc4b70
I will call the operation above an "address refresh".
TChain has code triggering an address refresh when needed for friends of the current tree:
root/tree/tree/src/TChain.cxx
Lines 1384 to 1393 in 2cc4b70
Unfortunately this doesn't work for two reasons:
c2
itself has friends because of the following condition:root/tree/tree/src/TChain.cxx
Line 1370 in 2cc4b70
In our case
c2
doesn't have friends, but thefTree
does. This is easy to fix (or work around).fFriends
is made non-null,fetree->IsUpdated()
always returnsfalse
becauseTTree::LoadTree
resets it:root/tree/tree/src/TTree.cxx
Line 6512 in 18b4f31
Fixing this is much more annoying. For my application, I ended up subscribing to the
Notify
signal and callingTFriendElement::MarkUpdated
again. This is only a partial solution because whenc2
loads a new file, it doesn't reset friend elements that were marked updated, which would happen somewhere along this line:root/tree/tree/src/TChain.cxx
Line 1666 in 2cc4b70
Reproducer
Rename to
recursiveBugDemo.C
and run the following macro: recursiveBugDemo.txtIt works similarly to #16804 and should only print
true
.ROOT version
Seen in:
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
No response
The text was updated successfully, but these errors were encountered: