[ROOT-6885] TChain::Process with more than kBigNumber entries without reading TTree headers Created: 08/Nov/14 Updated: 21/Sep/15 Resolved: 21/Sep/15
|Reporter:||Valery Yundin||Assignee:||Philippe Canal|
TChain::Process stops prematurely after kBigNumber (1234567890) entries if trees were added without reading their sizes.
One can add files to TChain without touching them by using default value of the second parameter of AddFile:
In which case we take the second branch below and set fEntries = nentries = kBigNumber
Which is problematic, because TTreePlayer::Process gets it from TTree::GetEntriesFriend via GetEntriesToProcess and uses it to decide how many entries to process:
As a result it stops after kBigNumber (1234567890) entries
Later when another tree is loaded on demand it sets fEntries = fTreeOffset[fNtrees] = theBigNumber
It would make sense to set fEntries to theBigNumber already in TChain::AddFile so TTreePlayer::Process uses it as the upper limit.
Nothing in TChain relies on fEntries being equal to kBigNumber and it changes to theBigNumber after the first tree is loaded anyway.
PS Line numbers correspond to git tag v5-34-23
|Comment by Valery Yundin [ 09/Nov/14 ]|
There is a not-so-obvious workaround:
|Comment by Philippe Canal [ 21/Sep/15 ]|
This problem has been fixed in the v5-34, v6-02 and 6-04 patch branches as well as in the master (where kBigNumber and theBigNumber are actually also merged).
Thanks for your report and patience.