-
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
Migrate to esConsumes muon alignment #35719
Conversation
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 consistent with the rest of the code, and also the coding rules
@@ -30,8 +30,13 @@ | |||
|
|||
class MuonAlignmentInputSurveyDB : public MuonAlignmentInputMethod { | |||
public: | |||
MuonAlignmentInputSurveyDB(); | |||
MuonAlignmentInputSurveyDB(std::string dtLabel, std::string cscLabel, std::string idealLabel); | |||
MuonAlignmentInputSurveyDB(const DTGeometry* DTGeometry, |
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.
MuonAlignmentInputSurveyDB(const DTGeometry* DTGeometry, | |
MuonAlignmentInputSurveyDB(const DTGeometry* dtGeometry, |
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.
Yes, I fixed it.
MuonAlignmentInputSurveyDB(); | ||
MuonAlignmentInputSurveyDB(std::string dtLabel, std::string cscLabel, std::string idealLabel); | ||
MuonAlignmentInputSurveyDB(const DTGeometry* DTGeometry, | ||
const CSCGeometry* CSCGeometry, |
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.
const CSCGeometry* CSCGeometry, | |
const CSCGeometry* cscGeometry, |
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.
Yes, I fixed it.
MuonAlignmentInputSurveyDB(std::string dtLabel, std::string cscLabel, std::string idealLabel); | ||
MuonAlignmentInputSurveyDB(const DTGeometry* DTGeometry, | ||
const CSCGeometry* CSCGeometry, | ||
const GEMGeometry* GEMGeometry, |
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.
const GEMGeometry* GEMGeometry, | |
const GEMGeometry* gemGeometry, |
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.
Yes, I fixed it.
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-35719/26037
|
A new Pull Request was created by @hyunyong for master. It involves the following packages:
@cmsbuild, @malbouis, @tvami, @yuanchao, @francescobrivio can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
edm::ESHandle<DTGeometry> dtGeometry1; | ||
edm::ESHandle<CSCGeometry> cscGeometry1; | ||
edm::ESHandle<GEMGeometry> gemGeometry1; | ||
dtGeometry1 = iSetup.getHandle(dtGeomToken1_); |
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.
You still need to call esConsumes
with the appropriate labels in the module's constructor in order to initialize the tokens so they know what you want to get.
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.
Yes, I fixed it.
const edm::ESGetToken<DTGeometry, MuonGeometryRecord> dtGeomToken1_; | ||
const edm::ESGetToken<CSCGeometry, MuonGeometryRecord> cscGeomToken1_; | ||
const edm::ESGetToken<GEMGeometry, MuonGeometryRecord> gemGeomToken1_; | ||
|
||
const edm::ESGetToken<DTGeometry, MuonGeometryRecord> dtGeomToken2_; | ||
const edm::ESGetToken<CSCGeometry, MuonGeometryRecord> cscGeomToken2_; | ||
const edm::ESGetToken<GEMGeometry, MuonGeometryRecord> gemGeomToken2_; | ||
|
||
const edm::ESGetToken<DTGeometry, MuonGeometryRecord> dtGeomToken3_; | ||
const edm::ESGetToken<CSCGeometry, MuonGeometryRecord> cscGeomToken3_; | ||
const edm::ESGetToken<GEMGeometry, MuonGeometryRecord> gemGeomToken3_; | ||
|
||
const edm::ESGetToken<DTGeometry, MuonGeometryRecord> dtGeomIdealToken_; | ||
const edm::ESGetToken<CSCGeometry, MuonGeometryRecord> cscGeomIdealToken_; | ||
const edm::ESGetToken<GEMGeometry, MuonGeometryRecord> gemGeomIdealToken_; |
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 dont understand why you need these 3+1 times, these are the inputs to 3 different methods but since the input doesnt change (especially since they are const
) why not use the same thing?
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.
Ahh based on https://github.com/cms-sw/cmssw/pull/35719/files#r731246134 I understand that these were supposed to have different labels, fine then I understand. But then can they be names so they better describe the content?
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.
MuonAlignmentInputXML()
needs one ideal geometry set for the aligner and another ideal geometry set for comparison.
This code has three MuonAlignmentInputXML()
, so three tokens (1,2, and 3) for the aligner and idealToken for the comparison.
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.
Right, after reading #35719 (comment) I understood it
@cmsbuild , please test |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-35719/26046
|
Pull request #35719 was updated. @malbouis, @tvami, @yuanchao, @francescobrivio can you please check and sign again. |
gemGeometryIdeal = iSetup.getHandle(gemGeomIdealToken_); | ||
|
||
MuonAlignmentInputXML inputMethod1(_inputXMLCurrent, | ||
&*dtGeometry1, |
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.
Just to note that the intermediate ESHandle
s could be avoided with
&*dtGeometry1, | |
&iSetup.getData(dtGeomToken1_), |
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.
Yes, I removed the intermediate ESHandle
usage.
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ae46bb/19725/summary.html CMS StaticAnalyzer warnings: There are 2 inherits from legacy modules warnings. See https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ae46bb/19725/llvm-analysis/legacy-mod-sa.txt for details. Comparison SummarySummary:
|
Hi @hyunyong besides Matti's comment it would be nice to deal with the SA errors too, reported here |
Pull request #35719 was updated. @malbouis, @tvami, @yuanchao, @francescobrivio can you please check and sign again. |
-1 Failed Tests: Build HeaderConsistency 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. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-35719/26093
|
@cmsbuild , please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ae46bb/19774/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, @qliphy (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
PR description:
Resolves cms-AlCaDB/AlCaTools#39
esConsumes migration for
PR validation:
Alignment/MuonAlignment/test/test_MuonGeometryDBConverter.sh is working correctly.