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

CalibCalorimetry/HcalPlugins: Change return type of ESProducer to unique_ptr. #22057

Merged
merged 3 commits into from Feb 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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