12 const fs::path input(inputFilePath);
13 const fs::path output(outputFilePath);
15 if (!fs::exists(input)) {
16 throw std::runtime_error(
"2HDMC input LHA file does not exist: " + input.string());
20 if (output.has_parent_path()) {
21 fs::create_directories(output.parent_path(), ec);
23 throw std::runtime_error(
"Cannot create 2HDMC output directory '" + output.parent_path().string() +
"': " + ec.message());
28 model.read_LesHouches(input.string().c_str());
29 model.write_LesHouches(output.string().c_str(),
true,
true,
true);