Skip to content

Commit

Permalink
Merge pull request #24715 from gartung/GeneratorInterface-Herwig7Inte…
Browse files Browse the repository at this point in the history
…rface-strictcxx17

GeneratorInterface/Herwig7Interface: replace auto_ptr removed in strict std=c++17
  • Loading branch information
cmsbuild committed Oct 3, 2018
2 parents a632fe0 + 94620d7 commit faeb7be
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions GeneratorInterface/Core/interface/BaseHadronizer.h
Expand Up @@ -83,8 +83,8 @@ namespace gen {

protected:
GenRunInfoProduct& runInfo() { return genRunInfo_; }
std::auto_ptr<HepMC::GenEvent>& event() { return genEvent_; }
std::auto_ptr<GenEventInfoProduct>& eventInfo() { return genEventInfo_; }
std::unique_ptr<HepMC::GenEvent>& event() { return genEvent_; }
std::unique_ptr<GenEventInfoProduct>& eventInfo() { return genEventInfo_; }

lhef::LHEEvent* lheEvent() { return lheEvent_.get(); }
lhef::LHERunInfo *lheRunInfo() { return lheRunInfo_.get(); }
Expand All @@ -98,11 +98,11 @@ namespace gen {
virtual std::vector<std::string> const& doSharedResources() const { return theSharedResources; }

GenRunInfoProduct genRunInfo_;
std::auto_ptr<HepMC::GenEvent> genEvent_;
std::auto_ptr<GenEventInfoProduct> genEventInfo_;
std::unique_ptr<HepMC::GenEvent> genEvent_;
std::unique_ptr<GenEventInfoProduct> genEventInfo_;

boost::shared_ptr<lhef::LHERunInfo> lheRunInfo_;
std::auto_ptr<lhef::LHEEvent> lheEvent_;
std::unique_ptr<lhef::LHEEvent> lheEvent_;

edm::Event *edmEvent_;

Expand Down
Expand Up @@ -56,14 +56,14 @@ class Herwig7Interface {
bool initGenerator();
void flushRandomNumberGenerator();

static std::auto_ptr<HepMC::GenEvent>
static std::unique_ptr<HepMC::GenEvent>
convert(const ThePEG::EventPtr &event);

static double pthat(const ThePEG::EventPtr &event);



std::auto_ptr<HepMC::IO_BaseClass> iobc_;
std::unique_ptr<HepMC::IO_BaseClass> iobc_;

// HerwigUi contains settings piped to Herwig7
Herwig::HerwigUIProvider* HwUI_;
Expand Down
6 changes: 3 additions & 3 deletions GeneratorInterface/Herwig7Interface/src/Herwig7Interface.cc
Expand Up @@ -60,7 +60,7 @@ Herwig7Interface::Herwig7Interface(const edm::ParameterSet &pset) :
// Write events in hepmc ascii format for debugging purposes
string dumpEvents = pset.getUntrackedParameter<string>("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
Expand Down Expand Up @@ -237,10 +237,10 @@ void Herwig7Interface::flushRandomNumberGenerator()
*/
}

auto_ptr<HepMC::GenEvent> Herwig7Interface::convert(
unique_ptr<HepMC::GenEvent> Herwig7Interface::convert(
const ThePEG::EventPtr &event)
{
return std::auto_ptr<HepMC::GenEvent>(
return std::unique_ptr<HepMC::GenEvent>(
ThePEG::HepMCConverter<HepMC::GenEvent>::convert(*event));
}

Expand Down

0 comments on commit faeb7be

Please sign in to comment.