Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RF] Fix some design issues with the RooTreeDataStore #17165

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

guitargeek
Copy link
Contributor

  1. The RooAbsDataStore has a virtual function tree() which is not meaningful for a general data store. This function should be removed.

  2. The RooTreeDataStore has one const version on tree() and one non-const version. One returns a pointer and the other a reference, which is very confusing.

  3. The RooTreeDataStore has some methods that just forward to the underlying TTree, but they were not used.

Changes to the data store classes can be made without impacting users because they are implementation details of the RooFit dataset classes.

Copy link

github-actions bot commented Dec 2, 2024

Test Results

    19 files      19 suites   4d 4h 12m 5s ⏱️
 2 726 tests  2 724 ✅ 1 💤 1 ❌
49 143 runs  49 140 ✅ 0 💤 3 ❌

For more details on these failures, see this check.

Results for commit b3554e8.

♻️ This comment has been updated with latest results.

1. The RooAbsDataStore has a virtual function `tree()` which is not
   meaningful for a general data store. This function should be removed.

2. The RooTreeDataStore has one `const` version on `tree()` and one
   non-const version. One returns a pointer and the other a reference,
   which is very confusing.

3. The RooTreeDataStore has some methods that just forward to the
   underlying TTree, but they were not used.

Changes to the data store classes can be made without impacting users
because they are implementation details of the RooFit dataset classes.
Using this function is introducing memory leaks too easily if used
wrong, because it returns a `RooArgsSet *` that needs to be deleted by
the caller without documenting this.

This commit suggests to simply remove this function, after all one could
just call `addColumn()` in a loop and be safe.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant