Skip to content

Commit

Permalink
print warning if SLHA block name is not a symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Voigt authored and Alexander Voigt committed Jan 31, 2016
1 parent cee5fcf commit 0920e0b
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions meta/WriteOut.m
Original file line number Diff line number Diff line change
Expand Up @@ -485,21 +485,30 @@
Return[result];
];

ReadSLHAOutputBlock[{parameter_, {blockName_Symbol, pdg_?NumberQ}}] :=
Module[{result, blockNameStr, parmStr, pdgStr, gutNorm = ""},
blockNameStr = ToString[blockName];
ReadSLHAOutputBlock[{parameter_, {blockName_String, pdg_?NumberQ}}] :=
Module[{result, parmStr, pdgStr, gutNorm = ""},
parmStr = CConversion`ToValidCSymbolString[parameter];
pdgStr = ToString[pdg];
If[parameter === SARAH`hyperchargeCoupling,
gutNorm = " * " <> CConversion`RValueToCFormString[
1/Parameters`GetGUTNormalization[parameter]];
];
result = "model.set_" <> parmStr <>
"(slha_io.read_entry(\"" <> blockNameStr <> "\", " <>
"(slha_io.read_entry(\"" <> blockName <> "\", " <>
pdgStr <> ")" <> gutNorm <> ");\n";
Return[result];
];

ReadSLHAOutputBlock[{parameter_, {blockName_Symbol, pdg_?NumberQ}}] :=
ReadSLHAOutputBlock[{parameter, {ToString[blockName], pdg}}];

ReadSLHAOutputBlock[{parameter_, {blockName_, pdg_?NumberQ}}] :=
Block[{},
Print["Warning: SLHA block name is not a symbol: ", blockName];
Print[" I'm using: ", CConversion`RValueToCFormString[blockName]];
ReadSLHAOutputBlock[{parameter, {CConversion`RValueToCFormString[blockName], pdg}}]
];

ReadSLHAOutputBlock[{parameter_, blockName_Symbol}] :=
Module[{paramStr, blockNameStr},
paramStr = CConversion`ToValidCSymbolString[parameter];
Expand Down

0 comments on commit 0920e0b

Please sign in to comment.