Skip to content

Conversation

@elusian
Copy link
Contributor

@elusian elusian commented Jan 31, 2023

This Pull request:

Fixes some small issues with debug printout during integration or generation

Changes or fixes:

The first commit changes the debug printout in RooRealIntegral::evaluate. _mode here is the analytical integral code, _intOperMode is the variable that can be Hybrid, Analytic or PassThrough (like in the switch-case above).

The second commit adds printMultiline to RooEffGenContext. This is used when requesting verbose printout during dataset generation, which is supposed to recursively print all gen contexts. Before this change, having a RooEffProd inside the model stopped the recursive printout.

Checklist:

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

`_mode` is the analytical integral code, not the integral operation mode
@phsft-bot
Copy link

Can one of the admins verify this patch?

@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

@elusian
Copy link
Contributor Author

elusian commented Jan 31, 2023

Apologies, I copied the function from another gen context and did not notice that RooEffGenContext was already in the 3 spaces convention. Should I fix this?

@guitargeek
Copy link
Contributor

Hi, thanks for the PR first of all!

Yes, it would be nice to fix that, I see now that the RooEffGenContext header and source almost correctly follow the ROOT clang-format style correctly:
https://github.com/root-project/root/blob/master/.clang-format

(well, the header not really, but it also doesn't have that many lines)

I think your PR is a good opportunity to correctly format them for good! Could you add an initial commit to this PR where you clang-format these files first? You can write in the commit message something like "this reformatting is done now because the files will be changed in the following commit, and the differences to the ROOT code style were already minor".

And then, on top of the reformatting commit, you could make the commit with your actual new function (and code format again).

Does that sound good to you?

@phsft-bot
Copy link

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

Warnings:

  • [2023-01-31T11:20:37.361Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/core/base/src/TDirectory.cxx:1292:7: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]

@phsft-bot
Copy link

@elusian
Copy link
Contributor Author

elusian commented Jan 31, 2023

Hello, I can do that. Just to be clear, that applies only to RooEffGenContex.h and cxx, right? Not RooRealIntegral.cxx, which would change a lot with the ROOT format

@guitargeek
Copy link
Contributor

Yes, exactly. I'd prefer not to re-format the older more complicated sources, because that makes it harder to understand where things are coming from via git blame.

Enrico Lusiani added 2 commits January 31, 2023 14:00
This reformatting is done now because the files will be changed in the following commit, and the differences to the ROOT code style were already minor
@elusian elusian force-pushed the fix-roofit-debug-print branch from fcf3132 to b07f976 Compare January 31, 2023 13:09
@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

@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-31T13:20:39.939Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/core/base/src/TDirectory.cxx:1292:7: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]

@phsft-bot
Copy link

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

Failing tests:

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, thanks a lot for these fixes!

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.

3 participants