-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
PPS clean code for bad pot #38740
PPS clean code for bad pot #38740
Conversation
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-38740/31055
|
A new Pull Request was created by @fabferro (Fabrizio Ferro) for master. It involves the following packages:
@jpata, @cmsbuild, @clacaputo can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
@cmsbuild , please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-608883/26259/summary.html Comparison SummarySummary:
|
+reconstruction
|
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, @qliphy, @rappoccio (and backports should be raised in the release meeting by the corresponding L2) |
@@ -65,31 +65,31 @@ class CTPPSPixelLocalTrackProducer : public edm::stream::EDProducer<> { | |||
|
|||
edm::InputTag inputTag_; |
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.
inputTag_
never used
@@ -65,31 +65,31 @@ class CTPPSPixelLocalTrackProducer : public edm::stream::EDProducer<> { | |||
|
|||
edm::InputTag inputTag_; |
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.
inputTag_
never used
@@ -65,31 +65,31 @@ class CTPPSPixelLocalTrackProducer : public edm::stream::EDProducer<> { | |||
|
|||
edm::InputTag inputTag_; | |||
edm::EDGetTokenT<edm::DetSetVector<CTPPSPixelRecHit>> tokenCTPPSPixelRecHit_; |
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.
why not to make const
all other classs members initialized in the ctor initialization list (and never modified afterwards)?
edm::ESWatcher<VeryForwardRealGeometryRecord> geometryWatcher_; | ||
|
||
edm::ESGetToken<CTPPSPixelAnalysisMask, CTPPSPixelAnalysisMaskRcd> tokenCTPPSPixelAnalysisMask_; | ||
const edm::ESGetToken<CTPPSPixelAnalysisMask, CTPPSPixelAnalysisMaskRcd> tokenCTPPSPixelAnalysisMask_; | ||
|
||
uint32_t numberOfPlanesPerPot_; | ||
std::vector<uint32_t> listOfAllPlanes_; |
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 is only used locally in the constructor: no need to make it a class member.
Moreover: why to reserve(6)
for it? Are you hardcoding somehow the number of elements that should be passed with the numberOfPlanesPerPot_
parameter instead? In any case, if this variable becomes local in the constructor, there is no need to reserve its size
@fabferro Please have a look at above comments. Moreover, this PR should be backport to 12_4_X |
Pull request #38740 was updated. @jpata, @cmsbuild, @clacaputo can you please check and sign again. |
const edm::ESGetToken<CTPPSGeometry, VeryForwardRealGeometryRecord> tokenCTPPSGeometry_; | ||
edm::ESWatcher<VeryForwardRealGeometryRecord> geometryWatcher_; | ||
|
||
const edm::ESGetToken<CTPPSPixelAnalysisMask, CTPPSPixelAnalysisMaskRcd> tokenCTPPSPixelAnalysisMask_; | ||
|
||
uint32_t numberOfPlanesPerPot_; | ||
std::vector<uint32_t> listOfAllPlanes_; | ||
const uint32_t numberOfPlanesPerPot_; |
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.
Thank you @fabferro
To be fully compliant with the CMS style, since this is not a class member any more, you should remove the trailing underscore from the name.
Moreover, I'd move this definition right before when it is used, i.e before L103
(I know, this is not fundamental... But since tests weren't started yet, I think you can finish the cleaning before we launch them)
please test |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-38740/31154
|
Pull request #38740 was updated. @jpata, @clacaputo can you please check and sign again. |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-608883/26343/summary.html Comparison SummarySummary:
|
@cms-sw/reconstruction-l2 could you please check and (re)sign, if you agree with the latest changes? |
+1 |
merge
|
+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 be automatically merged. |
PR description:
This PR is a follow-up of PR #38553 implemented the requested code cleaning. No changes expected.
PR validation:
Run3 data processing.
No backport needed.
@tvami @grzanka