344 auto buildMatcher = [](
auto&
nodes) -> std::unique_ptr<DataDescriptorMatcher> {
346 std::make_unique<DataDescriptorMatcher>(DataDescriptorMatcher::Op::Just,
348 for (
size_t ni = 0, ne =
nodes.size(); ni < ne; ++ni) {
350 auto tmp = std::make_unique<DataDescriptorMatcher>(DataDescriptorMatcher::Op::And,
352 std::move(lastMatcher));
353 assert(lastMatcher.get() ==
nullptr);
354 lastMatcher = std::move(tmp);
359 std::unique_ptr<DataDescriptorMatcher> matcher;
360 if (
auto* pval = std::get_if<std::unique_ptr<DataDescriptorMatcher>>(&
inputMatcherNodes[0])) {
362 matcher = std::move(*pval);
367 if (concrete.has_value()) {
379 auto* matcher = std::get_if<std::unique_ptr<DataDescriptorMatcher>>(&child);
380 assert(matcher !=
nullptr);
381 auto* parent = std::get_if<std::unique_ptr<DataDescriptorMatcher>>(&
inputMatcherNodes.back());
382 assert(parent !=
nullptr);
383 std::unique_ptr<DataDescriptorMatcher> node;
384 auto mergeDown = [&node, &parent, &child]() ->
bool {
386 if (
auto* pval1 = std::get_if<ConstantValueMatcher>(&((*parent)->getLeft()))) {
388 node = std::make_unique<DataDescriptorMatcher>((*parent)->getOp(),
390 std::move((*parent)->getRight()));
394 if (
auto* pval2 = std::get_if<ConstantValueMatcher>(&((*parent)->getRight()))) {
396 node = std::make_unique<DataDescriptorMatcher>((*parent)->getOp(),
397 std::move((*parent)->getLeft()),
412 auto* parent = std::get_if<std::unique_ptr<DataDescriptorMatcher>>(&
inputMatcherNodes[nMatchers - 2]);
413 assert(parent !=
nullptr);
414 auto node = std::make_unique<DataDescriptorMatcher>((*parent)->getOp(),
416 std::move((*parent)->getRight()));
423 auto* parent = std::get_if<std::unique_ptr<DataDescriptorMatcher>>(&
inputMatcherNodes.back());
424 assert(parent !=
nullptr);
425 auto node = std::make_unique<DataDescriptorMatcher>((*parent)->getOp(),
426 std::move((*parent)->getLeft()),
438 std::unique_ptr<ConfigParamSpec> opt{
nullptr};
441 std::stringstream is;
526 metadata.back().workflowOptions.push_back(*opt);
739 std::string
v(s.c_str(), std::min(s.size(), 4UL));
743 std::string
v(s.c_str(), std::min(s.size(), 16UL));
753 op = DataDescriptorMatcher::Op::And;
754 }
else if (s ==
"or") {
755 op = DataDescriptorMatcher::Op::Or;
756 }
else if (s ==
"xor") {
757 op = DataDescriptorMatcher::Op::Xor;
758 }
else if (s ==
"just") {
759 op = DataDescriptorMatcher::Op::Just;
760 }
else if (s ==
"not") {
761 op = DataDescriptorMatcher::Op::Not;
795 metadata.back().cmdLineArgs.push_back(s);
800 metadata.back().channels.push_back(s);
807 std::stringstream errstr;
808 errstr <<
"No string handling for argument '" << std::string(
str,
length) <<
"' in state " <<
states.back() << std::endl;
809 throw std::runtime_error(errstr.str());