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
Remove deprecated exists
API in favor of fillDescriptions
in SiPixelQualityESProducer
#40135
Remove deprecated exists
API in favor of fillDescriptions
in SiPixelQualityESProducer
#40135
Conversation
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40135/33127
Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
5445d84
to
9ecd960
Compare
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40135/33128
|
A new Pull Request was created by @ferencek (Dinko F.) for master. It involves the following packages:
@malbouis, @yuanchao, @cmsbuild, @saumyaphor4252, @francescobrivio, @ChrisMisan, @tvami can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
please test |
} | ||
desc.addVPSet("ListOfRecordToMerge", desc_ps, default_ps); | ||
} | ||
descriptions.add("siPixelQualityESProducer", desc); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be addWithDefaultLabel
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the comment. Right, I didn't realize that addWithDefaultLabel
produces a cfi file with the name that matches the C++ class name but with the first character in lower case. Since the test are already done, I would avoid re-triggering all the tests just for this cosmetic change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @ferencek given that the whole PR is somewhat "cosmetic" and there is no urgent need for it to get merged, I think it's fine to retrigger tests, it's better to have this done now then to remember it and do it later...
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ca993e/29199/summary.html Comparison SummarySummary:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case there's a follow-up to https://github.com/cms-sw/cmssw/pull/40135/files#r1030742953, I have two more "cosmetic" comments.
@@ -141,4 +142,32 @@ void SiPixelQualityESProducer::setIntervalFor(const edm::eventsetup::EventSetupR | |||
oValidity = infinity; | |||
} | |||
|
|||
void SiPixelQualityESProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { | |||
// siPixelQualityESProducer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the purpose of this commented line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a literal copy-paste from the edmPythonConfigToCppValidation
executable described in this TWiki. Will remove it.
temp.addParameter<std::string>("record", "SiPixelDetVOffRcd"); | ||
temp.addParameter<std::string>("tag", ""); | ||
default_ps.push_back(temp); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The whole section above could be replaced by a loop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was also a literal copy-paste from the edmPythonConfigToCppValidation
executable with some changes in variable names to make them a bit more descriptive. I am not actually sure what you want to put in the loop. If you are referring to the two default_ps.push_back(temp);
calls, the record
parameter differs in the two instances and introducing some if
statements would seem less elegant that this implementation proposed by edmPythonConfigToCppValidation
. This I leave as is for now unless I misunderstood what you meant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
calls, the record parameter differs in the two instances and introducing some if
No need of an if
, you can just declare an array with record names and loop over it with range-based loop while doing the push_back
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
calls, the record parameter differs in the two instances and introducing some if
No need of an if
, you can just declare an array with record names and loop over it with range-based loop while doing the push_back
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest, I find the readability of the code dumped by edmPythonConfigToCppValidation
better than having it in a loop form because it resembles more the layout of the final cfi file. Unless there is some performance issue with the current implementation, which I doubt, I leave it as is :) If it bothers you that much, the branch is under the CMSTrackerDPG organization ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we have different taste in readability. Anyway It does not bother me at all, it was said upfront it's "cosmetics".
9ecd960
to
357f32c
Compare
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40135/33130
|
Pull request #40135 was updated. @malbouis, @yuanchao, @cmsbuild, @saumyaphor4252, @francescobrivio, @ChrisMisan, @tvami can you please check and sign again. |
please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ca993e/29256/summary.html Comparison SummarySummary:
|
+alca
|
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. @perrotta, @dpiparo, @rappoccio (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
PR description:
This PR addresses issue #40077
PR validation:
Code compiles and cmsDriver from the original JIRA runs successfully.
Backports:
No backports are needed.