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
Code-cleanup of RPC-DQM #33854
Code-cleanup of RPC-DQM #33854
Conversation
…he RPCMonitorDigi package
fill default value set minimum of 2d summary map plot change name
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-33854/22878
Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-33854/22879
|
A new Pull Request was created by @jhgoh (Junghwan John Goh) for master. It involves the following packages: DQM/RPCMonitorClient @andrius-k, @kmaeshima, @ErnestaP, @ahmad3213, @cmsbuild, @jfernan2, @rvenditti can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
please test |
Thanks @jhgoh !! |
-1 Failed Tests: Build ClangBuild BuildI found compilation warning when building: See details on the summary page. Clang BuildI found compilation warning while trying to compile with clang. Command used:
See details on the summary page. |
@jfernan2 thank you for checks. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-33854/22935
|
Pull request #33854 was updated. @andrius-k, @kmaeshima, @ErnestaP, @ahmad3213, @cmsbuild, @jfernan2, @rvenditti can you please check and sign again. |
please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-59d35f/15405/summary.html Comparison SummarySummary:
|
+1 |
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @silviodonato, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
PR description:
This PR updates current RPC DQM codes to have better code structure and modernize C++ syntax.
We'd like to have some advantage for the possible new developments.
The amount of code change in this PR is big, but they are technical ones - we don't expect any change in the output.
1. Better helper class design for the chamber naming, histogram decoration.
There is a class 'RPCGeomServ' which is widely used to map RPCDetId to the RPC nomenclature such as RB#in/out_W#_S##_B/F/M etc. This class stores flags as private member variables during some function calls, therefore developers could not declare it as const object.
There is another object rpcdqm::utils mainly used to set the axis labels. (and the name of the class is too generic).
We add a lightweight interface, RPCNameHelper, RPCSummaryMapHisto and RPCRollMapHisto, hopefully replace RPCGeomServ and rpcdqm::utils.
For the smooth and transparent migration (+ there are some items still to go), existing classes are kept for now.
2. Migration to fmt::format()
std::stringstream have been massively used in the RPC DQM modules.
Existing code works without any problem, but fmt::format gives better readability (and known to have a better performance).
3. Separating library and plugins
Some classes are used across the DQM/RPCMonitorDigi and DQM/RPCMonitorClient plugin modules.
In addition, RPC DPG analyzers uses features in the rpcdqm::utils (which hopefully to be replaced by RPCRollMapHisto class) in their modules.
These common features are factored out and moved to the DQM/RPCMonitorClient/src. The plugin modules are moved to the plugins directory.
4. Code cleanup
Cleaned up unnecessary includes, simplify for-loops, etc.
5. Fix potential memory allocation problem in the RPCDqmClient module
This module registers 'client modules' by appending pointer to the dynamically allocated objects but it is not deleted anywhere. We use smart pointers to be properly cleaned up at the termination.
We haven't observe any serious memory leak before this fix, because the new allocations happens only for the initialization step.
PR validation:
Tested runTheMatrix.py command and passes the tests.
Related presentation in 2020 Oct: slide
Related issue #33761 : please consider this PR as the first step to cleanup of unused modules, although any modules are not removed (yet).
@mileva @andresib