Configs.h
Go to the documentation of this file.
1 #ifndef art_test_Framework_Core_data_dependencies_Configs_h
2 #define art_test_Framework_Core_data_dependencies_Configs_h
3 
10 #include "fhiclcpp/types/Table.h"
11 #include "fhiclcpp/types/TupleAs.h"
12 
13 #include <string>
14 
15 namespace art::test {
16 
17  inline void
19  {
20  if (friendlyName.empty()) {
22  "There was an error processing typenames.\n"}
23  << "No friendly type name was provided.\n";
24  }
25  }
26 
27  // For producing products
28  struct TypeAndInstance {
30  : friendlyClassName{(throwIfEmpty(friendlyName), move(friendlyName))}
32  {}
33 
36  };
37 
38  // For consuming products
39  struct TypeAndTag {
41  : friendlyClassName{(throwIfEmpty(friendlyName), move(friendlyName))}
42  , inputTag{std::move(tag)}
43  {}
44 
47  };
48 
49  struct TopLevelTable {
50  using Name = fhicl::Name;
51  struct TestProperties {
52  fhicl::Atom<bool> graph_failure_expected{Name{"graph_failure_expected"}};
53  fhicl::OptionalAtom<std::string> error_message{Name{"error_message"}};
54  };
55  fhicl::Table<TestProperties> test_properties{Name{"test_properties"}};
56  fhicl::Atom<std::string> process_name{Name{"process_name"}};
57  struct Source {
59  };
63  };
64 
66  using Name = fhicl::Name;
69  produces{Name{"produces"}};
72  consumes{Name{"consumes"}};
73  fhicl::OptionalSequence<std::string> consumesMany{Name{"consumesMany"}};
74  };
75 
77  using Name = fhicl::Name;
80  consumes{Name{"consumes"}};
81  fhicl::OptionalSequence<std::string> consumesMany{Name{"consumesMany"}};
82  fhicl::OptionalSequence<std::string> select_events{Name{"SelectEvents"}};
83  };
84 }
85 
86 #endif /* art_test_Framework_Core_data_dependencies_Configs_h */
87 
88 // Local Variables:
89 // mode: c++
90 // End:
std::string string
Definition: nybbler.cc:12
TypeAndTag(std::string friendlyName, art::InputTag tag)
Definition: Configs.h:40
ChannelGroupService::Name Name
const std::string instance
ModuleType module_type(std::string const &full_key)
std::string productInstanceName
Definition: Configs.h:35
std::string friendlyClassName
Definition: Configs.h:34
def move(depos, offset)
Definition: depos.py:107
art::InputTag inputTag
Definition: Configs.h:46
std::string friendlyName(std::string const &iFullName)
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
void throwIfEmpty(std::string const &friendlyName)
Definition: Configs.h:18
std::string friendlyClassName
Definition: Configs.h:45
TypeAndInstance(std::string friendlyName, std::string instance)
Definition: Configs.h:29