Skip to content

Commit

Permalink
Merge pull request #22057 from gartung/CalibCalorimetry-HcalPlugins-E…
Browse files Browse the repository at this point in the history
…SProdoucer-returntype

CalibCalorimetry/HcalPlugins: Change return type of ESProducer to unique_ptr.
  • Loading branch information
cmsbuild committed Feb 2, 2018
2 parents f31a28d + 5b4c7a0 commit 551ee12
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
7 changes: 2 additions & 5 deletions CalibCalorimetry/HcalPlugins/src/HBHEDarkeningEP.cc
Expand Up @@ -67,17 +67,14 @@ HBHEDarkeningEP::produce(const HBHEDarkeningRecord& iRecord) {
);
}

ReturnType myResult(
new HBHEDarkening(
return std::make_unique<HBHEDarkening>(
pset_.getParameter<int>("ieta_shift"),
pset_.getParameter<double>("drdA"),
pset_.getParameter<double>("drdB"),
dosemaps,
years
)
);
);

return myResult;
}

DEFINE_FWK_EVENTSETUP_SOURCE(HBHEDarkeningEP);
2 changes: 1 addition & 1 deletion CalibCalorimetry/HcalPlugins/src/HBHEDarkeningEP.h
Expand Up @@ -21,7 +21,7 @@ class HBHEDarkeningEP : public edm::ESProducer, public edm::EventSetupRecordInte
HBHEDarkeningEP(const edm::ParameterSet&);
~HBHEDarkeningEP() override;

typedef std::shared_ptr<HBHEDarkening> ReturnType;
typedef std::unique_ptr<HBHEDarkening> ReturnType;

static void fillDescriptions( edm::ConfigurationDescriptions & descriptions );

Expand Down
5 changes: 1 addition & 4 deletions CalibCalorimetry/HcalPlugins/src/HcalTimeSlewEP.cc
Expand Up @@ -56,10 +56,7 @@ HcalTimeSlewEP::produce(const HcalTimeSlewRecord& iRecord){
std::vector<edm::ParameterSet> p_TimeSlewM2 = pset_.getParameter<std::vector<edm::ParameterSet>>("timeSlewParametersM2");
std::vector<edm::ParameterSet> p_TimeSlewM3 = pset_.getParameter<std::vector<edm::ParameterSet>>("timeSlewParametersM3");

ReturnType hcalTimeSlew(
new HcalTimeSlew(
)
);
ReturnType hcalTimeSlew = std::make_unique<HcalTimeSlew>();

//loop over the VPSets
for(const auto& p_timeslew : p_TimeSlewM2){
Expand Down
2 changes: 1 addition & 1 deletion CalibCalorimetry/HcalPlugins/src/HcalTimeSlewEP.h
Expand Up @@ -21,7 +21,7 @@ class HcalTimeSlewEP : public edm::ESProducer, public edm::EventSetupRecordInter
HcalTimeSlewEP(const edm::ParameterSet&);
~HcalTimeSlewEP();

typedef std::shared_ptr<HcalTimeSlew> ReturnType;
typedef std::unique_ptr<HcalTimeSlew> ReturnType;

static void fillDescriptions( edm::ConfigurationDescriptions & descriptions );

Expand Down

0 comments on commit 551ee12

Please sign in to comment.