-
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 Geometry from setConsumes() to type-deducing consumes() #31289
Conversation
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-31289/18005
|
A new Pull Request was created by @makortel (Matti Kortelainen) for master. It involves the following packages: Geometry/CSCGeometryBuilder @civanch, @Dr15Jones, @makortel, @cvuosalo, @ianna, @mdhildreth, @cmsbuild, @kpedro88 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
@cmsbuild, please test |
FYI @Dr15Jones |
The tests are being triggered in jenkins. |
please abort |
Jenkins tests are aborted. |
cddf889
to
18b4c4b
Compare
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-31289/18006
|
Pull request #31289 was updated. @civanch, @Dr15Jones, @makortel, @cvuosalo, @ianna, @mdhildreth, @cmsbuild, @kpedro88 can you please check and sign again. |
@cmsbuild, please test |
The tests are being triggered in jenkins.
|
Comparison is ready Comparison Summary:
|
setWhatProduced(this).setConsumes(geomToken_); | ||
} | ||
MuonNumberingInitialization::MuonNumberingInitialization(const edm::ParameterSet&) | ||
: geomToken_{setWhatProduced(this).consumes()} {} |
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 believe
: geomToken_{setWhatProduced(this).consumes()} {} | |
: geomToken_{setWhatProduced(this)} {} |
also works. Not sure I like it or not.
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.
Actually it doesn't work. I tested and it leads to compilation errors
In file included from .../src/FWCore/Framework/interface/es_impl/MayConsumeChooser.h:28,
from .../src/FWCore/Framework/interface/ESConsumesCollector.h:33,
from .../src/FWCore/Framework/interface/ESProducer.h:77,
from .../Geometry/MuonNumbering/plugins/MuonNumberingInitialization.cc:22:
.../FWCore/Utilities/interface/ESGetToken.h: In instantiation of 'constexpr edm::ESGetToken<ESProduct, ESRecord>::ESGetToken(ADAPTER&&) [with ADAPTER = edm::ESConsumesCollectorT<Mu
onNumberingRecord>; ESProduct = DDCompactView; ESRecord = IdealGeometryRecord]':
.../Geometry/MuonNumbering/plugins/MuonNumberingInitialization.cc:41:39: required from here
.../FWCore/Utilities/interface/ESGetToken.h:52:117: error: no matching function for call to 'edm::ESConsumesCollectorT<MuonNumberingRecord>::consumes<DDCompactView, IdealGeometryRe
cord>()'
constexpr explicit ESGetToken(ADAPTER&& iAdapter) : ESGetToken(iAdapter.template consumes<ESProduct, ESRecord>()) {}
In file included from .../FWCore/Framework/interface/es_impl/MayConsumeChooser.h:28,
from .../FWCore/Framework/interface/ESConsumesCollector.h:33,
from .../FWCore/Framework/interface/ESProducer.h:77,
from .../Geometry/MuonNumbering/plugins/MuonNumberingInitialization.cc:22:
.../FWCore/Utilities/interface/ESGetToken.h: In instantiation of 'constexpr edm::ESGetToken<ESProduct, ESRecord>::ESGetToken(ADAPTER&&) [with ADAPTER = edm::ESConsumesCollectorT<Mu
onNumberingRecord>; ESProduct = DDCompactView; ESRecord = IdealGeometryRecord]':
.../Geometry/MuonNumbering/plugins/MuonNumberingInitialization.cc:41:39: required from here
.../FWCore/Utilities/interface/ESGetToken.h:52:117: error: no matching function for call to 'edm::ESConsumesCollectorT<MuonNumberingRecord>::consumes<DDCompactView, IdealGeometryRe
cord>()'
constexpr explicit ESGetToken(ADAPTER&& iAdapter) : ESGetToken(iAdapter.template consumes<ESProduct, ESRecord>()) {}
I think this happens because setWhatConsumes()
returns ESConsumesCollector<T>
, whose consumes()
takes only one template argument, while the ESGetToken
constructor calls consumes()
with two template arguments.
Anyway, I think the explicit call to consumes()
makes the call slightly easier to understand.
+1 |
+upgrade |
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. @silviodonato, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2) |
assign core |
New categories assigned: core @Dr15Jones,@smuzaffar,@makortel you have been requested to review this Pull request/Issue and eventually sign? Thanks |
From
Correct, but in that discussion I meant from the |
+core |
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. @silviodonato, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
PR description:
To try out the simpler consumes from #31223.
PR validation:
Code compiles.