From 6d9d7de6fc00b9d1a2f63f67f4ea2ca6d4dc721a Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Thu, 27 Sep 2018 18:06:52 +0200 Subject: [PATCH 1/2] GeneratorInterface/Core: replace auto_ptr removed in strict std=c++17 --- GeneratorInterface/Core/interface/BaseHadronizer.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/GeneratorInterface/Core/interface/BaseHadronizer.h b/GeneratorInterface/Core/interface/BaseHadronizer.h index 5a2df214974d4..eb8fcc86cc4f4 100644 --- a/GeneratorInterface/Core/interface/BaseHadronizer.h +++ b/GeneratorInterface/Core/interface/BaseHadronizer.h @@ -83,8 +83,8 @@ namespace gen { protected: GenRunInfoProduct& runInfo() { return genRunInfo_; } - std::auto_ptr& event() { return genEvent_; } - std::auto_ptr& eventInfo() { return genEventInfo_; } + std::unique_ptr& event() { return genEvent_; } + std::unique_ptr& eventInfo() { return genEventInfo_; } lhef::LHEEvent* lheEvent() { return lheEvent_.get(); } lhef::LHERunInfo *lheRunInfo() { return lheRunInfo_.get(); } @@ -98,11 +98,11 @@ namespace gen { virtual std::vector const& doSharedResources() const { return theSharedResources; } GenRunInfoProduct genRunInfo_; - std::auto_ptr genEvent_; - std::auto_ptr genEventInfo_; + std::unique_ptr genEvent_; + std::unique_ptr genEventInfo_; boost::shared_ptr lheRunInfo_; - std::auto_ptr lheEvent_; + std::unique_ptr lheEvent_; edm::Event *edmEvent_; From b011b2e7c3ec84c5a75d001b2e1e4fd828cf2383 Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Thu, 27 Sep 2018 18:17:43 +0200 Subject: [PATCH 2/2] GeneratorInterface/Herwig7Interface: replace auto_ptr removed in strict std=c++17 --- .../Herwig7Interface/interface/Herwig7Interface.h | 4 ++-- GeneratorInterface/Herwig7Interface/src/Herwig7Interface.cc | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/GeneratorInterface/Herwig7Interface/interface/Herwig7Interface.h b/GeneratorInterface/Herwig7Interface/interface/Herwig7Interface.h index a3cbe4f1479c2..d7ab4b23097e8 100644 --- a/GeneratorInterface/Herwig7Interface/interface/Herwig7Interface.h +++ b/GeneratorInterface/Herwig7Interface/interface/Herwig7Interface.h @@ -56,14 +56,14 @@ class Herwig7Interface { bool initGenerator(); void flushRandomNumberGenerator(); - static std::auto_ptr + static std::unique_ptr convert(const ThePEG::EventPtr &event); static double pthat(const ThePEG::EventPtr &event); - std::auto_ptr iobc_; + std::unique_ptr iobc_; // HerwigUi contains settings piped to Herwig7 Herwig::HerwigUIProvider* HwUI_; diff --git a/GeneratorInterface/Herwig7Interface/src/Herwig7Interface.cc b/GeneratorInterface/Herwig7Interface/src/Herwig7Interface.cc index 85e1ea3e8f3f2..8de2896774535 100644 --- a/GeneratorInterface/Herwig7Interface/src/Herwig7Interface.cc +++ b/GeneratorInterface/Herwig7Interface/src/Herwig7Interface.cc @@ -60,7 +60,7 @@ Herwig7Interface::Herwig7Interface(const edm::ParameterSet &pset) : // Write events in hepmc ascii format for debugging purposes string dumpEvents = pset.getUntrackedParameter("dumpEvents", ""); if (!dumpEvents.empty()) { - iobc_.reset(new HepMC::IO_GenEvent(dumpEvents.c_str(), ios::out)); + iobc_.reset(new HepMC::IO_GenEvent(dumpEvents, ios::out)); edm::LogInfo("ThePEGSource") << "Event logging switched on (=> " << dumpEvents << ")"; } // Clear dumpConfig target @@ -237,10 +237,10 @@ void Herwig7Interface::flushRandomNumberGenerator() */ } -auto_ptr Herwig7Interface::convert( +unique_ptr Herwig7Interface::convert( const ThePEG::EventPtr &event) { - return std::auto_ptr( + return std::unique_ptr( ThePEG::HepMCConverter::convert(*event)); }