root icon indicating copy to clipboard operation
root copied to clipboard

[RF] Implement `reduce()` also for concrete RooAbsData classes

Open guitargeek opened this issue 1 year ago • 1 comments

Add member functions to RooAbsData and RooDataHist that forward to RooAbsData::reduce(), but cast the return value to the actual type.

This is not that useful now except for avoiding some boiler plate code, but will be crucial once we change the return type to std::unique_ptr to fix memory leaks: in that case, PyROOT doesn't do the automatic conversion to the actual type anymore, and we would end up with RooDataHists or RooDataSets where we can't call their member functions (unless they are overrides of RooAbsData methods).

guitargeek avatar May 07 '24 22:05 guitargeek

Test Results

     9 files       9 suites   1d 17h 34m 59s :stopwatch:  2 634 tests  2 625 :white_check_mark: 0 :zzz:  9 :x: 22 322 runs  22 241 :white_check_mark: 0 :zzz: 81 :x:

For more details on these failures, see this check.

Results for commit 26ab4fb0.

github-actions[bot] avatar May 08 '24 06:05 github-actions[bot]

Closing, because this would not be needed anymore once automatic downcasting of smartpointers is implemented:

  • https://github.com/root-project/root/issues/16210

guitargeek avatar Aug 12 '24 11:08 guitargeek