validate_large_sequence_t.cc
Go to the documentation of this file.
2 
4 #include "fhiclcpp/types/Table.h"
5 
6 #include <cassert>
7 #include <iostream>
8 #include <numeric>
9 
10 using namespace fhicl;
11 
12 namespace {
13  struct Configuration {
14  Sequence<int> numbers{Name("many_numbers")};
15  };
16 }
17 
18 int
20 {
21  ParameterSet pset;
22  std::vector<int> numbers(5000);
23  std::iota(begin(numbers), end(numbers), 0);
24  pset.put("many_numbers", numbers);
25  auto const numbers_str = pset.to_indented_string();
26 
27  auto new_pset = ParameterSet::make(numbers_str);
28  auto const a = new_pset.get<std::vector<int>>("many_numbers");
29  assert(numbers == a);
30 
31  Table<Configuration> validated_config{new_pset};
32  auto const b = validated_config().numbers();
33  assert(numbers == b);
34 }
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
static ParameterSet make(intermediate_table const &tbl)
Definition: ParameterSet.cc:68
ChannelGroupService::Name Name
const double a
std::string to_indented_string() const
static bool * b
Definition: config.cpp:1043
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
Definition: StdUtils.h:72
void put(std::string const &key)