Skip to content

Commit f312811

Browse files
committed
Changes to handle userhooks and not create clashing copies
1 parent 02a6f79 commit f312811

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

GeneratorInterface/Pythia8Interface/plugins/Pythia8Hadronizer.cc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,9 @@ bool Pythia8Hadronizer::initializeForInternalPartons() {
447447
}
448448

449449
if (!(fUserHooksVector->hooks).empty() && !UserHooksSet) {
450-
fMasterGen->setUserHooksPtr(fUserHooksVector);
450+
for (auto &fUserHook : fUserHooksVector->hooks) {
451+
fMasterGen->addUserHooksPtr(fUserHook);
452+
}
451453
UserHooksSet = true;
452454
}
453455

@@ -590,7 +592,9 @@ bool Pythia8Hadronizer::initializeForExternalPartons() {
590592
}
591593

592594
if (!(fUserHooksVector->hooks).empty() && !UserHooksSet) {
593-
fMasterGen->setUserHooksPtr(fUserHooksVector);
595+
for (auto &fUserHook : fUserHooksVector->hooks) {
596+
fMasterGen->addUserHooksPtr(fUserHook);
597+
}
594598
UserHooksSet = true;
595599
}
596600

0 commit comments

Comments
 (0)