Skip to content

Prepare ROOT for a TEventList without auto registration - #22935

Merged
hageboeck merged 5 commits into
root-project:masterfrom
hageboeck:AutoReg_prepareTEventList
Jul 28, 2026
Merged

Prepare ROOT for a TEventList without auto registration#22935
hageboeck merged 5 commits into
root-project:masterfrom
hageboeck:AutoReg_prepareTEventList

Conversation

@hageboeck

Copy link
Copy Markdown
Member
  • Prepare a few tests for TEventList that don't auto-register themselves
  • Explicitly register TEventList/TEntryList to gDirectory in TTree::Draw (that's what the documentation states)
  • Add test
  • Add warnings if TTree::Draw(">>+entryList") is asked to append to a list that's not registered

…ory.

When TEventLists don't register themselves to gDirectory, TTree::Draw
expressions can't fill them. Therefore, a few lists need to be added to
gDirectory manually.
Once their Draw expressions have run, they are removed again.
The TTree::Draw documentation states that entry lists and event lists
are added to gDirectory. To make this fact independent of ROOT 7 mode,
explicitly add instances of these classes to gDirectory.

Also add a warning when trying to append to an existing list that can't
be found in the current directory.
The TTree::Draw documentation states that event and entry lists can be
found in the current directory after Draw(">>entrylist"), so this needs
to work consistently with auto-registration on and off.
When users ask to append to an existing histogram or event list in a
TTree::Draw expression, but the histogram/event list is not in the
current directory, issue a warning that object->SetDirectory() might
have been forgotten.

@vepadulano vepadulano left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I added a minor comment for consideration. Thanks for the nice work!

Comment thread math/mlp/src/TMultiLayerPerceptron.cxx
@github-actions

Copy link
Copy Markdown

Test Results

    23 files      23 suites   3d 14h 13m 18s ⏱️
 3 874 tests  3 874 ✅ 0 💤 0 ❌
78 921 runs  78 921 ✅ 0 💤 0 ❌

Results for commit 6cc101a.

@hageboeck
hageboeck merged commit 8811c5a into root-project:master Jul 28, 2026
30 checks passed
@hageboeck
hageboeck deleted the AutoReg_prepareTEventList branch July 28, 2026 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants