Skip to content

Commit

Permalink
[generation] Fix segfault in finalize
Browse files Browse the repository at this point in the history
  • Loading branch information
vvolkl committed Nov 8, 2020
1 parent 76fa06c commit 1e2240f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions Generation/src/components/PythiaInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,20 +151,20 @@ StatusCode PythiaInterface::initialize() {
}


m_powhegHooks = std::make_shared<Pythia8::PowhegHooks>();
m_powhegHooks = new Pythia8::PowhegHooks();
#if PYTHIA_VERSION_INTEGER < 8300
m_pythiaSignal->addUserHooksPtr(m_powhegHooks.get());
m_pythiaSignal->addUserHooksPtr(m_powhegHooks);
#else
m_pythiaSignal->addUserHooksPtr((Pythia8::UserHooksPtr)m_powhegHooks.get());
m_pythiaSignal->setUserHooksPtr((Pythia8::UserHooksPtr)m_powhegHooks);
#endif
}
bool resonanceDecayFilter = m_pythiaSignal->settings.flag("ResonanceDecayFilter:filter");
if (resonanceDecayFilter) {
m_resonanceDecayFilterHook = std::make_shared<ResonanceDecayFilterHook>();
m_resonanceDecayFilterHook = new ResonanceDecayFilterHook();
#if PYTHIA_VERSION_INTEGER < 8300
m_pythiaSignal->addUserHooksPtr(m_resonanceDecayFilterHook.get());
m_pythiaSignal->addUserHooksPtr(m_resonanceDecayFilterHook);
#else
m_pythiaSignal->addUserHooksPtr((Pythia8::UserHooksPtr)m_resonanceDecayFilterHook.get());
m_pythiaSignal->addUserHooksPtr((Pythia8::UserHooksPtr)m_resonanceDecayFilterHook);
#endif
}

Expand Down
4 changes: 2 additions & 2 deletions Generation/src/components/PythiaInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ class PythiaInterface : public GaudiTool, virtual public IHepMCProviderTool {
unsigned long int m_nISRveto{0};
unsigned long int m_nFSRveto{0};
/// Pythia8 engine for Powheg ME/PS merging
std::shared_ptr<Pythia8::PowhegHooks> m_powhegHooks{nullptr};
Pythia8::PowhegHooks* m_powhegHooks{nullptr};

std::shared_ptr<ResonanceDecayFilterHook> m_resonanceDecayFilterHook{nullptr};
ResonanceDecayFilterHook* m_resonanceDecayFilterHook{nullptr};

/// flag for additional printouts
Gaudi::Property<bool> m_printPythiaStatistics{this, "printPythiaStatistics", false,
Expand Down

0 comments on commit 1e2240f

Please sign in to comment.