374 auto const& process_name = table().process_name();
375 auto const& test_properties = table().test_properties();
383 auto module_configs = get_module_configs(pset);
384 auto paths_to_modules = get_paths_to_modules(physics, module_configs);
385 auto const trigger_paths =
386 select_paths(pset, tables_with_modifiers, paths_to_modules);
387 auto end_paths = paths_to_modules;
389 auto const end_path = merge_end_paths(end_paths);
394 auto& source_info = modules[
"input_source"];
395 if (!trigger_paths.empty()) {
396 source_info.paths = path_names(trigger_paths);
397 }
else if (!end_path.empty()) {
398 source_info.paths = {
"end_path"};
402 std::map<std::string, std::set<art::ProductInfo>> produced_products{};
403 for (
auto const& path : trigger_paths) {
404 fillProducesInfo(pset,
422 bool graph_failure{
false};
424 for (
auto const& path : trigger_paths) {
425 fillModifierInfo(pset,
433 if (!trigger_paths.empty()) {
438 pset, process_name,
"end_path", end_path, produced_products, modules);
442 graph_failure =
true;
447 if (err_msg.empty()) {
449 auto const module_graph =
451 auto const&
err = module_graph.second;
454 graph_failure =
true;
460 std::ofstream ofs{basename +
".dot"};
466 bool const graph_failure_expected = test_properties.graph_failure_expected();
467 if (graph_failure && !graph_failure_expected) {
468 std::cerr <<
"Unexpected graph-construction failure.\n" 469 <<
"Error message:\n" 472 }
else if (!graph_failure && graph_failure_expected) {
473 std::cerr <<
"Unexpected graph-construction success.\n";
477 if (test_properties.error_message(expected_msg)) {
478 std::regex
const re{expected_msg};
479 if (!std::regex_search(err_msg, re)) {
480 std::cerr <<
" The error message does not match what was expected:\n" 481 <<
" Actual: [" << err_msg <<
"]\n" 482 <<
" Expected: [" << expected_msg <<
"]\n";
488 catch (detail::validationException
const& v) {
489 std::cerr << v.what();
493 std::cerr << e.what() <<
'\n';
497 std::cerr <<
"Job failed.\n";
static ParameterSet make(intermediate_table const &tbl)
std::map< module_name_t, ModuleGraphInfo > collection_map_t
void print_module_graph(std::ostream &os, ModuleGraphInfoMap const &modInfos, ModuleGraph const &graph)
void err(const char *fmt,...)
std::optional< T > get_if_present(std::string const &key) const
def maker(G, ac, typename)
cet::coded_exception< error, detail::translate > exception
std::pair< ModuleGraph, std::string > make_module_graph(ModuleGraphInfoMap const &modInfos, paths_to_modules_t const &trigger_paths, configs_t const &end_path)