Skip to content

Object auto registration: Next steps#22817

Draft
hageboeck wants to merge 18 commits into
root-project:masterfrom
hageboeck:AutoReg_GlobalDefault
Draft

Object auto registration: Next steps#22817
hageboeck wants to merge 18 commits into
root-project:masterfrom
hageboeck:AutoReg_GlobalDefault

Conversation

@hageboeck

@hageboeck hageboeck commented Jul 15, 2026

Copy link
Copy Markdown
Member

Work on disabling auto registration of TEventList / TEntryList

Typically, when working towards disabling the auto-registration of certain classes, there is an opportunity to clean up code and fix tangentially related issues that are encountered on the way. Like for the last auto-registration PR (#18083), these will be split off into smaller chunks that are going to be merged first:

Note that to uncover potential auto-registration problems, ROOT is in ROOT 7 mode while this PR is in draft mode. The commit that globally enables ROOT 7 mode will be removed before merging the actual work for TEventList / TEntryList.

TODOs:

  • Remove the commit enabling ROOT 7 mode globally

@hageboeck hageboeck self-assigned this Jul 15, 2026
@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown

Test Results

    19 files      19 suites   2d 20h 37m 56s ⏱️
 3 872 tests  3 871 ✅ 0 💤 1 ❌
65 024 runs  65 021 ✅ 0 💤 3 ❌

For more details on these failures, see this check.

Results for commit 2a86453.

♻️ This comment has been updated with latest results.

Fixtures run even when the setup test is not selected,
whereas dependencies only have an effect when setup and main test are selected.
Also remove further includes that were unused.
- Remove unused headers.
- Use member initialisers to clean up constructors.
- Apply clang-tidy/clang-format fixes for member init.
@hageboeck
hageboeck force-pushed the AutoReg_GlobalDefault branch from 08db558 to 7e74353 Compare July 23, 2026 11:39
hageboeck added 14 commits July 23, 2026 13:50
Many delete[] and strlcpy could be replaced by changing one type.
…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.
TEntryList and its derived classes will from here on only register
themselves to gDirectory when the thread-local auto-registration is
enabled.
Explain that defaults can be set using .rootrc or using environment
variables, and how to do this from within the program.
This commit is to test auto-registration=off across all platforms. It
will be removed before merging.
@hageboeck
hageboeck force-pushed the AutoReg_GlobalDefault branch from 7e74353 to 2a86453 Compare July 23, 2026 11:55
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.

1 participant