Skip to content
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

Merged
merged 5 commits into from
Oct 21, 2021
Merged

Conversation

hyunyong
Copy link
Contributor

@hyunyong hyunyong commented Oct 18, 2021

PR description:

Resolves cms-AlCaDB/AlCaTools#39

esConsumes migration for

Alignment/MuonAlignment/src/MuonAlignmentInputXML.cc
Alignment/MuonAlignment/src/MuonAlignmentInputMethod.cc
Alignment/MuonAlignment/src/MuonAlignmentInputSurveyDB.cc
Alignment/MuonAlignment/src/MuonAlignmentOutputXML.cc
Alignment/MuonAlignment/plugins/MuonGeometrySanityCheck.cc
Alignment/MuonAlignmentAlgorithms/plugins/CSCOverlapsTrackPreparation.cc
Alignment/MuonAlignmentAlgorithms/src/SegmentToTrackAssociator.cc

PR validation:

Alignment/MuonAlignment/test/test_MuonGeometryDBConverter.sh is working correctly.

Copy link
Contributor

@tvami tvami left a 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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
MuonAlignmentInputSurveyDB(const DTGeometry* DTGeometry,
MuonAlignmentInputSurveyDB(const DTGeometry* dtGeometry,

Copy link
Contributor Author

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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const CSCGeometry* CSCGeometry,
const CSCGeometry* cscGeometry,

Copy link
Contributor Author

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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const GEMGeometry* GEMGeometry,
const GEMGeometry* gemGeometry,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I fixed it.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-35719/26037

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @hyunyong for master.

It involves the following packages:

  • Alignment/MuonAlignment (alca)
  • Alignment/MuonAlignmentAlgorithms (alca)
  • Alignment/SurveyAnalysis (alca)

@cmsbuild, @malbouis, @tvami, @yuanchao, @francescobrivio can you please review it and eventually sign? Thanks.
@pakhotin, @adewit, @abbiendi, @jhgoh, @tocheng, @tlampen, @mmusich, @trocino this is something you requested to watch as well.
@perrotta, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

edm::ESHandle<DTGeometry> dtGeometry1;
edm::ESHandle<CSCGeometry> cscGeometry1;
edm::ESHandle<GEMGeometry> gemGeometry1;
dtGeometry1 = iSetup.getHandle(dtGeomToken1_);
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I fixed it.

Comment on lines +175 to +189
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_;
Copy link
Contributor

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?

Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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

@tvami
Copy link
Contributor

tvami commented Oct 18, 2021

@cmsbuild , please test

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-35719/26046

@cmsbuild
Copy link
Contributor

Pull request #35719 was updated. @malbouis, @tvami, @yuanchao, @francescobrivio can you please check and sign again.

gemGeometryIdeal = iSetup.getHandle(gemGeomIdealToken_);

MuonAlignmentInputXML inputMethod1(_inputXMLCurrent,
&*dtGeometry1,
Copy link
Contributor

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 ESHandles could be avoided with

Suggested change
&*dtGeometry1,
&iSetup.getData(dtGeomToken1_),

Copy link
Contributor Author

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.

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ae46bb/19725/summary.html
COMMIT: 81220fe
CMSSW: CMSSW_12_1_X_2021-10-18-1100/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/35719/19725/install.sh to create a dev area with all the needed externals and cmssw changes.

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 Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 10 differences found in the comparisons
  • DQMHistoTests: Total files compared: 40
  • DQMHistoTests: Total histograms compared: 2751113
  • DQMHistoTests: Total failures: 11
  • DQMHistoTests: Total nulls: 1
  • DQMHistoTests: Total successes: 2751079
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.004 KiB( 39 files compared)
  • DQMHistoSizes: changed ( 312.0 ): 0.004 KiB MessageLogger/Warnings
  • Checked 170 log files, 37 edm output root files, 40 DQM output files
  • TriggerResults: no differences found

@tvami
Copy link
Contributor

tvami commented Oct 19, 2021

Hi @hyunyong besides Matti's comment it would be nice to deal with the SA errors too, reported here
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ae46bb/19725/llvm-analysis/legacy-mod-sa.txt

@cmsbuild
Copy link
Contributor

Pull request #35719 was updated. @malbouis, @tvami, @yuanchao, @francescobrivio can you please check and sign again.

@cmsbuild
Copy link
Contributor

-1

Failed Tests: Build HeaderConsistency ClangBuild
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ae46bb/19771/summary.html
COMMIT: 7e93281
CMSSW: CMSSW_12_1_X_2021-10-19-2300/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/35719/19771/install.sh to create a dev area with all the needed externals and cmssw changes.

Build

I found compilation warning when building: See details on the summary page.

Clang Build

I found compilation warning while trying to compile with clang. Command used:

USER_CUDA_FLAGS='--expt-relaxed-constexpr' USER_CXXFLAGS='-Wno-register -fsyntax-only' scram build -k -j 32 COMPILER='llvm compile'

See details on the summary page.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-35719/26093

@cmsbuild
Copy link
Contributor

Pull request #35719 was updated. @cmsbuild, @malbouis, @tvami, @yuanchao, @francescobrivio can you please check and sign again.

@tvami
Copy link
Contributor

tvami commented Oct 20, 2021

@cmsbuild , please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ae46bb/19774/summary.html
COMMIT: 906a1fc
CMSSW: CMSSW_12_1_X_2021-10-19-2300/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/35719/19774/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 40
  • DQMHistoTests: Total histograms compared: 2751113
  • DQMHistoTests: Total failures: 11
  • DQMHistoTests: Total nulls: 1
  • DQMHistoTests: Total successes: 2751079
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.004 KiB( 39 files compared)
  • DQMHistoSizes: changed ( 312.0 ): 0.004 KiB MessageLogger/Warnings
  • Checked 170 log files, 37 edm output root files, 40 DQM output files
  • TriggerResults: no differences found

@tvami
Copy link
Contributor

tvami commented Oct 20, 2021

+alca

  • test pass, diffs only in MsgLogger
  • code is in line with the description, follow-up to the review was carried out

@cmsbuild
Copy link
Contributor

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)

@qliphy
Copy link
Contributor

qliphy commented Oct 21, 2021

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecated ES get functions in Alignment/MuonAlignment
7 participants