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] Enable streaming of RooLagrangianMorphFunc and other improvements #11023

Merged
merged 4 commits into from
Jul 22, 2022

Conversation

guitargeek
Copy link
Contributor

@guitargeek guitargeek commented Jul 22, 2022

This PR enables the streaming of the RooLagrangianMorph by creating dictionaries also for RooLagrangianMorph::Config.

Furthermore, some improvements are made to the RooLagrangianMorphFunc and its tutorials in separate commits.

Tons of memory leaks are fixed in the RooLagrangianMorphFunc as well.

This commit removes the `_curNormSet` and `_ownParameters` member
variables from the RooLagrangianMorphFunc. The `_ownParameters` was
simply unused, and the `_curNormSet` was redundant because there is
already `RooAbsReal::_lastNSet` that also points to the current
normalization set.

Now, the `RooLagrangianMorphFunc::getValV()` can also be removed because
the sole purpose was to set `_curNormSet`, and also the private
`RooLagrangianMorphFunc::getCache()` interface can be changed to take no
normSet parameter (as it was unused anyway).

The `RooLagrangianMorphFunc::_cacheMgr` declaration is also moved to the
bottom of the file together with the other member variables.
This is to enable IO for the RooLagrangianMorphFunc.
The title for the x-axis of the first plot should be `"p_{T}^{V}"` and
not `"c_{Hq^{(3)}}"`.

Also, the title for the observable is changed to `"p_{T}^{V}"` to get
the right axis label for the x-axes of the plots.
@phsft-bot
Copy link
Collaborator

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

@phsft-bot
Copy link
Collaborator

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

The RooLagrangianMorphFunc was a desaster concerning memory safety.

This commit fixes almost all of the memory leaks that were easy to spot
because of the usage of `new`.

One leak that still remains are the `RooDataHist`s that underlies the
`RooHistFunc`s. But to fix that, it would be important to first come up
with an elegant way to have the RooHistFunc own their underlying
RooDataHist.
@phsft-bot
Copy link
Collaborator

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

@rahulgrit
Copy link
Contributor

Hi @guitargeek thanks a lot for fixing this important issue ! I tested locally and the serialisation is fixed.

Copy link
Member

@lmoneta lmoneta 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 Jonas for fixing this !

@phsft-bot
Copy link
Collaborator

Build failed on mac1015/cxx17.
Running on macitois21.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build
See console output.

Failing tests:

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.

4 participants