Skip to content

Conversation

@cburgard
Copy link
Contributor

This Pull request:

Adds more functionality to the RooPolyFunc

Changes or fixes:

Add a new constructor and change an existing one slightly to avoid collisions.
Add getters for internal variables.
Fix bugs in printout.

Checklist:

  • tested changes locally
  • updated the docs (if necessary)

This PR fixes #

@cburgard cburgard force-pushed the roopolyfunc-improvements branch from c406335 to 9a16379 Compare December 21, 2022 16:11
@guitargeek guitargeek changed the title Roopolyfunc improvements [RF] RooPolyFunc improvements Dec 21, 2022
@guitargeek guitargeek self-assigned this Dec 21, 2022
 * Add a new constructor and change an existing one slightly to avoid
   collisions.

 * Add getters for internal variables.

 * Fix bugs in printout.
@guitargeek guitargeek force-pushed the roopolyfunc-improvements branch from 9a16379 to 2dc3946 Compare January 1, 2023 16:50
@guitargeek guitargeek force-pushed the roopolyfunc-improvements branch from 2dc3946 to 2a0ee54 Compare January 1, 2023 17:52
@root-project root-project deleted a comment from phsft-bot Jan 1, 2023
@root-project root-project deleted a comment from phsft-bot Jan 1, 2023
@root-project root-project deleted a comment from phsft-bot Jan 1, 2023
@root-project root-project deleted a comment from phsft-bot Jan 1, 2023
@root-project root-project deleted a comment from phsft-bot Jan 1, 2023
@root-project root-project deleted a comment from phsft-bot Jan 1, 2023
@root-project root-project deleted a comment from phsft-bot Jan 1, 2023
@root-project root-project deleted a comment from phsft-bot Jan 1, 2023
@guitargeek guitargeek force-pushed the roopolyfunc-improvements branch 3 times, most recently from 68cab5d to 136a3b9 Compare January 1, 2023 20:23
The `RooPolyFunc::taylorExpand()` had several overloads that were
dangerously similar. To avoid user error, the overloads are reduced to a
single one that includes all the functionality of the others.

This entails an interface change, but it's acceptable because the
function has only existed since 6.26 and is used by a few users in ATLAS.

Therefore, the benefits of this change outweigh the disadvantages.
@guitargeek guitargeek force-pushed the roopolyfunc-improvements branch from 136a3b9 to cab77a7 Compare January 1, 2023 22:05
@guitargeek guitargeek requested a review from couet as a code owner January 1, 2023 22:05
The `RooAbsCollection::snapshot()` overload with an output parameter
should be preferred in the RooFit implementation:

  * it doesn't return a pointer that the caller needs to remember to
    delete

  * the returned pointer doesn't need to be upcasted to the actual type

  * less memory allocation on the heap
Like all other RooFit generator context classes, the `RooEffGenContext`
should never participate in IO.
@root-project root-project deleted a comment from phsft-bot Jan 1, 2023
@root-project root-project deleted a comment from phsft-bot Jan 1, 2023
@root-project root-project deleted a comment from phsft-bot Jan 1, 2023
@root-project root-project deleted a comment from phsft-bot Jan 1, 2023
@root-project root-project deleted a comment from phsft-bot Jan 1, 2023
@root-project root-project deleted a comment from phsft-bot Jan 1, 2023
@root-project root-project deleted a comment from phsft-bot Jan 1, 2023
@root-project root-project deleted a comment from phsft-bot Jan 1, 2023
@root-project root-project deleted a comment from phsft-bot Jan 1, 2023
@root-project root-project deleted a comment from phsft-bot Jan 1, 2023
@root-project root-project deleted a comment from phsft-bot Jan 1, 2023
@root-project root-project deleted a comment from phsft-bot Jan 1, 2023
@root-project root-project deleted a comment from phsft-bot Jan 1, 2023
@root-project root-project deleted a comment from phsft-bot Jan 1, 2023
@guitargeek guitargeek force-pushed the roopolyfunc-improvements branch from cab77a7 to 736075c Compare January 1, 2023 23:10
@guitargeek
Copy link
Contributor

@phsft-bot build

@phsft-bot
Copy link

Starting build on ROOT-debian10-i386/soversion, ROOT-performance-centos8-multicore/cxx17, ROOT-ubuntu18.04/nortcxxmod, ROOT-ubuntu2004/python3, mac12/noimt, mac11/cxx14, windows10/cxx14
How to customize builds

Copy link
Contributor

@guitargeek guitargeek left a comment

Choose a reason for hiding this comment

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

LGTM, thank you for the improvement!

The unit tests were failing initially, because your PR effectively made an interface change: if one was passing an integer as the observableValue as the value to extend the function around, it now hit your new overload where the order integer is at the same position as the observaleValue float in the old overload.

To avoid this confusion due to type ambiguity, I took the liberty of going one step further with the interface change and reduced all three overloads of taylorExpand to one, such that there can't be any ambiguity anymore.

I also added some general code improvement commits while at it.

Thanks again for the contribution!

@phsft-bot
Copy link

Build failed on ROOT-ubuntu18.04/nortcxxmod.
Running on sft-ubuntu-1804-2.cern.ch:/build/workspace/root-pullrequests-build
See console output.

Warnings:

  • [2023-01-01T23:16:31.344Z] /mnt/build/workspace/root-pullrequests-build/build/include/ROOT/RDataSource.hxx:213:11: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-01T23:16:31.344Z] /mnt/build/workspace/root-pullrequests-build/build/include/ROOT/RCsvDS.hxx:112:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-01T23:16:31.344Z] /mnt/build/workspace/root-pullrequests-build/build/include/ROOT/RSqliteDS.hxx:117:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-01T23:16:31.344Z] /mnt/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:215:7: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2023-01-01T23:16:31.344Z] /mnt/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RCsvDS.hxx:114:114: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2023-01-01T23:16:31.344Z] /mnt/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:215:7: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2023-01-01T23:16:31.600Z] /mnt/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:215:7: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2023-01-01T23:16:31.600Z] /mnt/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:215:7: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2023-01-01T23:16:31.600Z] /mnt/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:215:7: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2023-01-01T23:16:31.600Z] /mnt/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:215:7: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]

And 60 more

Failing tests:

@phsft-bot
Copy link

Build failed on ROOT-performance-centos8-multicore/cxx17.
Running on olbdw-01.cern.ch:/data/sftnight/workspace/root-pullrequests-build
See console output.

Warnings:

  • [2023-01-01T23:24:03.184Z] /data/sftnight/workspace/root-pullrequests-build/build/include/ROOT/RDataSource.hxx:213:11: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-01T23:24:04.461Z] /data/sftnight/workspace/root-pullrequests-build/build/include/ROOT/RCsvDS.hxx:112:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-01T23:24:04.461Z] /data/sftnight/workspace/root-pullrequests-build/build/include/ROOT/RSqliteDS.hxx:117:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-01T23:24:04.461Z] /data/sftnight/workspace/root-pullrequests-build/build/include/ROOT/RNTupleDS.hxx:96:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-01T23:24:04.462Z] /data/sftnight/workspace/root-pullrequests-build/build/include/ROOT/RNTupleDS.hxx:98:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-01T23:24:17.327Z] /data/sftnight/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:215:7: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2023-01-01T23:24:19.590Z] /data/sftnight/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RCsvDS.hxx:114:114: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2023-01-01T23:24:19.590Z] /data/sftnight/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RSqliteDS.hxx:118:81: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2023-01-01T23:24:19.590Z] /data/sftnight/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RNTupleDS.hxx:97:86: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2023-01-01T23:24:19.590Z] /data/sftnight/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RNTupleDS.hxx:99:47: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]

And 130 more

Failing tests:

@phsft-bot
Copy link

Build failed on mac12/noimt.
Running on macphsft18.dyndns.cern.ch:/Users/sftnight/build/jenkins/workspace/root-pullrequests-build
See console output.

Warnings:

  • [2023-01-01T23:51:55.005Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/build/include/ROOT/RDataSource.hxx:213:11: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-01T23:51:55.005Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/build/include/ROOT/RCsvDS.hxx:112:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-01T23:51:55.005Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/build/include/ROOT/RSqliteDS.hxx:117:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-01T23:51:55.262Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:213:11: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-01T23:51:55.262Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RCsvDS.hxx:112:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-01T23:51:55.262Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:213:11: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-01T23:51:55.263Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:213:11: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-01T23:51:55.263Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:213:11: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-01T23:51:55.263Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:213:11: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-01T23:51:55.263Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:213:11: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]

And 53 more

Failing tests:

@phsft-bot
Copy link

Build failed on mac11/cxx14.
Running on macphsft23.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build
See console output.

Warnings:

  • [2023-01-02T00:07:07.266Z] /Users/sftnight/build/workspace/root-pullrequests-build/build/include/ROOT/RDataSource.hxx:213:11: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-02T00:07:07.266Z] /Users/sftnight/build/workspace/root-pullrequests-build/build/include/ROOT/RCsvDS.hxx:112:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-02T00:07:07.266Z] /Users/sftnight/build/workspace/root-pullrequests-build/build/include/ROOT/RSqliteDS.hxx:117:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-02T00:07:20.914Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:213:11: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-02T00:07:23.416Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:213:11: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-02T00:07:24.803Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:213:11: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-02T00:07:27.656Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:213:11: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-02T00:07:27.951Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:213:11: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-02T00:07:28.208Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:213:11: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2023-01-02T00:07:29.627Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:213:11: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]

And 54 more

Failing tests:

@guitargeek guitargeek merged commit f80a4e1 into root-project:master Jan 2, 2023
@guitargeek guitargeek deleted the roopolyfunc-improvements branch January 2, 2023 10:21
@phsft-bot
Copy link

Build failed on ROOT-ubuntu2004/python3.
Running on root-ubuntu-2004-1.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build
See console output.

Errors:

  • [2023-01-09T11:56:51.089Z] CMake Error at /home/sftnight/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1138 (message):

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.

3 participants