Skip to content

Commit 5bf2948

Browse files
committed
Minor improvements in Generator/Pythia8
1 parent 46f2bee commit 5bf2948

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Generators/include/Generators/ConfigurationMacroHelper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace eventgen
2626
{
2727

2828
template <typename T>
29-
T GetFromMacro(const std::string file, const std::string funcname, const std::string type, const std::string unique)
29+
T GetFromMacro(const std::string& file, const std::string& funcname, const std::string& type, const std::string& unique)
3030
{
3131

3232
/** tweak the string to get the required global function **/

Generators/src/GeneratorPythia8.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,10 @@ Bool_t GeneratorPythia8::Init()
6464
/** user hooks via configuration macro **/
6565
if (!mHooksFileName.empty()) {
6666
auto hooks = GetFromMacro<Pythia8::UserHooks*>(mHooksFileName, mHooksFuncName, "Pythia8::UserHooks*", "pythia8_user_hooks");
67-
if (!hooks)
67+
if (!hooks) {
6868
LOG(FATAL) << "Failed to init \'Pythia8\': problem with user hooks configuration ";
69+
return false;
70+
}
6971
#if PYTHIA_VERSION_INTEGER < 8300
7072
mPythia.setUserHooksPtr(hooks);
7173
#else

0 commit comments

Comments
 (0)