5#include <hipo4/reader.h>
6#include <iguana/algorithms/Validator.h>
8inline int TestValidator(
10 std::vector<std::string> bank_names,
11 std::string data_file,
14 std::string output_dir,
15 std::string log_level)
19 if(vdor_name ==
"" || bank_names.empty()) {
20 fmt::print(stderr,
"ERROR: need validator name and banks\n");
24 fmt::print(stderr,
"ERROR: need a data file for command 'validator'\n");
29 hipo::reader reader(data_file.c_str(), {data_tag});
30 auto banks = reader.getBanks(bank_names);
34 std::filesystem::create_directories(output_dir);
39 vdor->SetLogLevel(log_level);
44 while(reader.next(banks) && (num_events == 0 || it_ev++ < num_events)) {
static algo_t Create(std::string const &algo_name) noexcept(false)
Base class for all algorithm validators to inherit from.
void SetOutputDirectory(std::string_view output_dir)