11 constexpr
bool should_fail{
false};
16 bool const should_succeed =
true)
try {
18 assert(should_succeed);
21 assert(not should_succeed);
35 std::vector<std::string> vs;
36 for (
unsigned i(0); i != 10; ++i) {
37 std::ostringstream
value;
38 value <<
"label" << i <<
":" 39 <<
"instance" << i <<
":" 40 <<
"processName" << i;
41 vs.emplace_back(value.str());
43 pset.
put(
"second_key", vs);
46 auto const vec_tags = pset.
get<std::vector<art::InputTag>>(
"second_key");
48 auto const vec_tags_empty =
49 pset.
get(
"third_key", std::vector<art::InputTag>{});
51 assert(vec_tags_empty.empty());
53 std::vector<art::InputTag> vtag;
60 pset.
put<std::vector<std::string>>(
"multi1", {
"label",
"instance"});
61 pset.
put<std::vector<std::string>>(
"multi2",
62 {
"label",
"instance",
"process"});
63 pset.
put<std::vector<std::string>>(
"multierr1", {
"label:something:else"});
64 pset.
put<std::vector<std::string>>(
65 "multierr2", {
"label",
"instance",
"process",
"something",
"else"});
67 retrieve(pset,
"multi1");
68 retrieve(pset,
"multi2");
69 retrieve(pset,
"multierr1", should_fail);
70 retrieve(pset,
"multierr2", should_fail);
T get(std::string const &key) const
std::optional< T > get_if_present(std::string const &key) const
void put(std::string const &key)
cet::coded_exception< error, detail::translate > exception