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 FastSimulation modules to use esConsumes #35056

Merged
merged 2 commits into from Sep 13, 2021

Conversation

wddgit
Copy link
Contributor

@wddgit wddgit commented Aug 27, 2021

PR description:

Migrate FastSimulation modules to use esConsumes

PR validation:

Depends on existing tests

@cmsbuild
Copy link
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-35056/24934

ERROR: Build errors found during clang-tidy run.

FastSimulation/EventProducer/src/FamosProducer.cc:51:39: error: calling 'consumesCollector' with incomplete return type 'edm::ConsumesCollector' [clang-diagnostic-error]
  famosManager_ = new FamosManager(p, consumesCollector());
                                      ^
/cvmfs/cms-ib.cern.ch/nweek-02695/slc7_amd64_gcc900/cms/cmssw/CMSSW_12_1_X_2021-08-27-1100/src/FWCore/Framework/interface/EDConsumerBase.h:156:23: note: 'consumesCollector' declared here
--
gmake: *** [config/SCRAM/GMake/Makefile.coderules:129: code-checks] Error 2
gmake: *** [There are compilation/build errors. Please see the detail log above.] Error 2

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-35056/24935

  • This PR adds an extra 64KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @wddgit (W. David Dagenhart) for master.

It involves the following packages:

  • FastSimulation/Calorimetry (fastsim)
  • FastSimulation/EventProducer (fastsim)
  • FastSimulation/MuonSimHitProducer (fastsim)
  • FastSimulation/ShowerDevelopment (fastsim)
  • FastSimulation/SimplifiedGeometryPropagator (fastsim)
  • FastSimulation/Tracking (fastsim)
  • FastSimulation/TrackingRecHitProducer (fastsim)

@civanch, @lveldere, @ssekmen, @mdhildreth, @cmsbuild, @sbein can you please review it and eventually sign? Thanks.
@simonepigazzini, @matt-komm, @thomreis 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

@wddgit
Copy link
Contributor Author

wddgit commented Aug 27, 2021

please test

@cmsbuild
Copy link
Contributor

+1

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

CMS StaticAnalyzer warnings: There are 7 EventSetupRecord::get warnings. See https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-613210/18106/llvm-analysis/esrget-sa.txt for details.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 39
  • DQMHistoTests: Total histograms compared: 3000352
  • DQMHistoTests: Total failures: 0
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3000330
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 38 files compared)
  • Checked 165 log files, 37 edm output root files, 39 DQM output files
  • TriggerResults: no differences found

@makortel
Copy link
Contributor

makortel commented Sep 3, 2021

@cms-sw/fastsim-l2 Could you review and sign, please?

1 similar comment
@makortel
Copy link
Contributor

makortel commented Sep 7, 2021

@cms-sw/fastsim-l2 Could you review and sign, please?

@makortel
Copy link
Contributor

makortel commented Sep 9, 2021

ping @cms-sw/fastsim-l2

@makortel
Copy link
Contributor

@cms-sw/fastsim-l2 Could you please review and sign? This PR has been open now for two weeks now without any action. Getting these EventSetup-consumes migration PRs merged would help us a lot. Thanks!

@perrotta
Copy link
Contributor

@cms-sw/fastsim-l2 Could you please review and sign? This PR has been open now for two weeks now without any action. Getting these EventSetup-consumes migration PRs merged would help us a lot. Thanks!

@civanch @lveldere @mdhildreth @sbein @ssekmen : if any of you is not supposed any more to take care of fastsim related pull requests, please remove yourself from https://github.com/cms-sw/cms-bot/blob/master/categories.py
Otherwise, could you please review this and the other longstanding pull requests with a fastsim-pending label?

@civanch
Copy link
Contributor

civanch commented Sep 11, 2021

+1

@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)

@perrotta
Copy link
Contributor

According to the static analyzer, there are still several EventSetupRecord::get function called in FamosManager, FamosProducer, as well as in other FastSim plugins not touched by this PR.

Is there any reason why the migration was not completed, at least in these already touched files? For them up to now only the ConsumesCollector is passed as argument, but nothing has been migrated.

What is the plan?

@makortel
Copy link
Contributor

As far as I can tell, FamosManager is used only by FamosProducer, and FamosProducer is not being run in IBs (with git grep I see FamosProducer being used only in FastSimulation/EventProducer/python/FamosSimHits_cff.py that itself is not imported anywhere). I'd prefer the maintainers (@cms-sw/fastsim-l2) to take care of migrating such code, or removing it if is not needed anymore.

@perrotta
Copy link
Contributor

As far as I can tell, FamosManager is used only by FamosProducer, and FamosProducer is not being run in IBs (with git grep I see FamosProducer being used only in FastSimulation/EventProducer/python/FamosSimHits_cff.py that itself is not imported anywhere). I'd prefer the maintainers (@cms-sw/fastsim-l2) to take care of migrating such code, or removing it if is not needed anymore.

Ok for the partial migration now
@cms-sw/fastsim-l2 please have a look at the modules listed in https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-613210/18106/llvm-analysis/esrget-sa.txt [1] and either remove them or finalize their migration to esConsumes

[1] For the record:

/data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_12_1_X_2021-08-27-1100/src/FastSimulation/EventProducer/src/FamosManager.cc:101:3: warning: function 'FamosManager::setupGeometryAndField' calls function 'edm::eventsetup::EventSetupRecord::get<edm::ESHandle<GeometricSearchTracker> >' with argument of type 'const std::string' with argument of type 'edm::ESHandle<GeometricSearchTracker>'. Direct call of function EventSetupRecord::get(ESHandle&) is deprecated and should be replaced with a call to EventSetup::getHandle(ESGetToken&). To use ESGetToken see https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideHowToGetDataFromES#In_ED_module To get data with the token see https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideHowToGetDataFromES#Getting_data_from_EventSetup_wit [deprecated.ESRecordGetChecker]
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_12_1_X_2021-08-27-1100/src/FastSimulation/EventProducer/src/FamosManager.cc:105:3: warning: function 'FamosManager::setupGeometryAndField' calls function 'edm::eventsetup::EventSetupRecord::get<edm::ESHandle<TrackerInteractionGeometry> >' with argument of type 'const std::string' with argument of type 'edm::ESHandle<TrackerInteractionGeometry>'. Direct call of function EventSetupRecord::get(ESHandle&) is deprecated and should be replaced with a call to EventSetup::getHandle(ESGetToken&). To use ESGetToken see https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideHowToGetDataFromES#In_ED_module To get data with the token see https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideHowToGetDataFromES#Getting_data_from_EventSetup_wit [deprecated.ESRecordGetChecker]
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_12_1_X_2021-08-27-1100/src/FastSimulation/EventProducer/src/FamosManager.cc:111:5: warning: function 'FamosManager::setupGeometryAndField' calls function 'edm::eventsetup::EventSetupRecord::get<edm::ESHandle<MagneticFieldMap> >' with argument of type 'const std::string' with argument of type 'edm::ESHandle<MagneticFieldMap>'. Direct call of function EventSetupRecord::get(ESHandle&) is deprecated and should be replaced with a call to EventSetup::getHandle(ESGetToken&). To use ESGetToken see https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideHowToGetDataFromES#In_ED_module To get data with the token see https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideHowToGetDataFromES#Getting_data_from_EventSetup_wit [deprecated.ESRecordGetChecker]
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_12_1_X_2021-08-27-1100/src/FastSimulation/EventProducer/src/FamosManager.cc:126:5: warning: function 'FamosManager::setupGeometryAndField' calls function 'edm::eventsetup::EventSetupRecord::get<edm::ESHandle<CaloGeometry> >' with argument of type 'edm::ESHandle<CaloGeometry>'. Direct call of function EventSetupRecord::get(ESHandle&) is deprecated and should be replaced with a call to EventSetup::getHandle(ESGetToken&). To use ESGetToken see https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideHowToGetDataFromES#In_ED_module To get data with the token see https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideHowToGetDataFromES#Getting_data_from_EventSetup_wit [deprecated.ESRecordGetChecker]
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_12_1_X_2021-08-27-1100/src/FastSimulation/EventProducer/src/FamosManager.cc:130:5: warning: function 'FamosManager::setupGeometryAndField' calls function 'edm::eventsetup::EventSetupRecord::get<edm::ESHandle<CaloTopology> >' with argument of type 'edm::ESHandle<CaloTopology>'. Direct call of function EventSetupRecord::get(ESHandle&) is deprecated and should be replaced with a call to EventSetup::getHandle(ESGetToken&). To use ESGetToken see https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideHowToGetDataFromES#In_ED_module To get data with the token see https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideHowToGetDataFromES#Getting_data_from_EventSetup_wit [deprecated.ESRecordGetChecker]
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_12_1_X_2021-08-27-1100/src/FastSimulation/EventProducer/src/FamosManager.cc:94:3: warning: function 'FamosManager::setupGeometryAndField' calls function 'edm::eventsetup::EventSetupRecord::get<edm::ESHandle<TrackerGeometry> >' with argument of type 'const std::string' with argument of type 'edm::ESHandle<TrackerGeometry>'. Direct call of function EventSetupRecord::get(ESHandle&) is deprecated and should be replaced with a call to EventSetup::getHandle(ESGetToken&). To use ESGetToken see https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideHowToGetDataFromES#In_ED_module To get data with the token see https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideHowToGetDataFromES#Getting_data_from_EventSetup_wit [deprecated.ESRecordGetChecker]
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_12_1_X_2021-08-27-1100/src/FastSimulation/EventProducer/src/FamosProducer.cc:68:3: warning: function 'FamosProducer::produce' calls function 'edm::eventsetup::EventSetupRecord::get<edm::ESHandle<TrackerTopology> >' with argument of type 'edm::ESHandle<TrackerTopology>'. Direct call of function EventSetupRecord::get(ESHandle&) is deprecated and should be replaced with a call to EventSetup::getHandle(ESGetToken&). To use ESGetToken see https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideHowToGetDataFromES#In_ED_module To get data with the token see https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideHowToGetDataFromES#Getting_data_from_EventSetup_wit [deprecated.ESRecordGetChecker]

@perrotta
Copy link
Contributor

+1

@perrotta
Copy link
Contributor

Issue #35243 have been opened to keep track of the still missing migrations

@wddgit wddgit deleted the fastSimuationESConsumesMigration1 branch November 16, 2021 21:57
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.

None yet

5 participants