root
root copied to clipboard
[RF] Warning message on repeated named RooCmdArgs in RooCmdConfig
More detailed description of main commit (1st commit)
This commit addresses Jira issue ROOT-2784 (from 2010, oldest open RooFit "bug"!).
Emit warning message in RooCmdConfig when multiple named arguments of the same type are encountered, for which no chaining behavior is defined.
To make the warning message more clear, a map is implemeted to look up
the name of the function in the RooFit namespace that is used to
create the repeated RooCmdArg. Usually, the names of the argument and
the name of the function that created it are identical, but there are
exceptions that are hardcoded in this map.
Furthermore, a warning message is also emitted for the commands that
have a defined chaining behavior (Import, Link, and Slice), where
the alternatives that take a std::map with the multiple commands is
suggested. This is done to encourage RooFit code that can be easily
ported to Python if desired, because chainig command arguments with the
same name is not possible in Python RooFit (commands are passed as
keyword arguments, which can't be repeated).
Having such a warning message also helps users that try to chain more
commands than RooAbsReal::plotOn can digest. They will get the
solution in the warning message instead of having to ask in the forum,
which happend for example in this forum post.
Quick description of other commits
- commit 1:
- main commit explianed above
- commit 2 - 4:
- update RooFit code to not trigger the warnings
- commit 5:
- update RooFit C tutorial files to not trigger the warnings
- Python tutorials can only be updated after pythonizations for
Import,Link, andSlice
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
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
Build failed on windows10/cxx14. Running on null:C:\build\workspace\root-pullrequests-build See console output.
Failing tests:
PR closed because the JIRA issue that motivated this PR was also closed (deemed not important enough).