Skip to content

Commit

Permalink
Update ESProducers following cms-sw#31556 (#555)
Browse files Browse the repository at this point in the history
Remove setConsumes() from ESConsumesCollector: the functionality was replaced with the type-deducing consumes().
  • Loading branch information
fwyzard committed Nov 6, 2020
1 parent f1bd443 commit 6c33c16
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ class SiPixelGainCalibrationForHLTGPUESProducer : public edm::ESProducer {
};

SiPixelGainCalibrationForHLTGPUESProducer::SiPixelGainCalibrationForHLTGPUESProducer(const edm::ParameterSet& iConfig) {
setWhatProduced(this).setConsumes(gainsToken_).setConsumes(geometryToken_);
auto cc = setWhatProduced(this);
gainsToken_ = cc.consumes();
geometryToken_ = cc.consumes();
}

void SiPixelGainCalibrationForHLTGPUESProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ class SiPixelFedCablingMapGPUWrapperESProducer : public edm::ESProducer {

SiPixelFedCablingMapGPUWrapperESProducer::SiPixelFedCablingMapGPUWrapperESProducer(const edm::ParameterSet& iConfig)
: useQuality_(iConfig.getParameter<bool>("UseQualityInfo")) {
std::string component = iConfig.getParameter<std::string>("ComponentName");
auto const& component = iConfig.getParameter<std::string>("ComponentName");
auto cc = setWhatProduced(this, component);
cc.setConsumes(cablingMapToken_, edm::ESInputTag{"", iConfig.getParameter<std::string>("CablingMapLabel")});
cablingMapToken_ = cc.consumes(edm::ESInputTag{"", iConfig.getParameter<std::string>("CablingMapLabel")});
if (useQuality_) {
cc.setConsumes(qualityToken_);
qualityToken_ = cc.consumes();
}
cc.setConsumes(geometryToken_);
geometryToken_ = cc.consumes();
}

void SiPixelFedCablingMapGPUWrapperESProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
Expand Down
21 changes: 10 additions & 11 deletions RecoLocalTracker/SiPixelRecHits/plugins/PixelCPEFastESProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,19 @@ class PixelCPEFastESProducer : public edm::ESProducer {

using namespace edm;

PixelCPEFastESProducer::PixelCPEFastESProducer(const edm::ParameterSet& p) {
std::string myname = p.getParameter<std::string>("ComponentName");
auto magname = p.getParameter<edm::ESInputTag>("MagneticFieldRecord");
PixelCPEFastESProducer::PixelCPEFastESProducer(const edm::ParameterSet& p) : pset_(p) {
auto const& myname = p.getParameter<std::string>("ComponentName");
auto const& magname = p.getParameter<edm::ESInputTag>("MagneticFieldRecord");
UseErrorsFromTemplates_ = p.getParameter<bool>("UseErrorsFromTemplates");

pset_ = p;
auto c = setWhatProduced(this, myname);
c.setConsumes(magfieldToken_, magname)
.setConsumes(pDDToken_)
.setConsumes(hTTToken_)
.setConsumes(lorentzAngleToken_, edm::ESInputTag(""));
c.setConsumes(lorentzAngleWidthToken_, edm::ESInputTag("", "forWidth"));
auto cc = setWhatProduced(this, myname);
magfieldToken_ = cc.consumes(magname);
pDDToken_ = cc.consumes();
hTTToken_ = cc.consumes();
lorentzAngleToken_ = cc.consumes(edm::ESInputTag(""));
lorentzAngleWidthToken_ = cc.consumes(edm::ESInputTag("", "forWidth"));
if (UseErrorsFromTemplates_) {
c.setConsumes(genErrorDBObjectToken_);
genErrorDBObjectToken_ = cc.consumes();
}
}

Expand Down

0 comments on commit 6c33c16

Please sign in to comment.