Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions evtgen-2.0.0.patch
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,42 @@

template <class T>
class EvtMatrix {

--- a/EvtGenExternal/EvtPythiaEngine.hh
+++ b/EvtGenExternal/EvtPythiaEngine.hh
@@ -82,7 +82,7 @@

bool _convertPhysCodes, _initialised, _useEvtGenRandom;

- std::unique_ptr<EvtPythiaRandom> _evtgenRandom;
+ std::shared_ptr<EvtPythiaRandom> _evtgenRandom;

std::map<int, int> _addedPDGCodes;
};

--- a/src/EvtGenExternal/EvtPythiaEngine.cpp
+++ b/src/EvtGenExternal/EvtPythiaEngine.cpp
@@ -75,7 +75,7 @@
// from EvtGen for Pythia 8.
_useEvtGenRandom = useEvtGenRandom;

- _evtgenRandom = std::make_unique<EvtPythiaRandom>();
+ _evtgenRandom = std::make_shared<EvtPythiaRandom>();

_initialised = false;
}
@@ -128,8 +128,13 @@

// Set the random number generator
if ( _useEvtGenRandom == true ) {
+#if PYTHIA_VERSION_INTEGER < 8310
_genericPythiaGen->setRndmEnginePtr( _evtgenRandom.get() );
_aliasPythiaGen->setRndmEnginePtr( _evtgenRandom.get() );
+#else
+ _genericPythiaGen->setRndmEnginePtr( _evtgenRandom );
+ _aliasPythiaGen->setRndmEnginePtr( _evtgenRandom );
+#endif
}

_genericPythiaGen->init();

5 changes: 1 addition & 4 deletions pythia8.spec
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
### RPM external pythia8 309
### RPM external pythia8 311

Source: https://pythia.org/download/pythia83/%{n}%{realversion}.tgz
# https://gitlab.com/Pythia8/releases/-/issues/289: fix compilation of C++20 code with pythia8
Patch0: pythia8_309-289

Requires: hepmc hepmc3 lhapdf

%prep
%setup -q -n %{n}%{realversion}
%patch0 -p1

./configure --prefix=%i --enable-shared --with-hepmc2=${HEPMC_ROOT} --with-hepmc3=${HEPMC3_ROOT} --with-lhapdf6=${LHAPDF_ROOT} --enable-mg5mes

Expand Down
31 changes: 0 additions & 31 deletions pythia8_309-289.patch

This file was deleted.