345 auto buildMatcher = [](
auto&
nodes) -> std::unique_ptr<DataDescriptorMatcher> {
347 std::make_unique<DataDescriptorMatcher>(DataDescriptorMatcher::Op::Just,
349 for (
size_t ni = 0, ne =
nodes.size(); ni < ne; ++ni) {
351 auto tmp = std::make_unique<DataDescriptorMatcher>(DataDescriptorMatcher::Op::And,
353 std::move(lastMatcher));
354 assert(lastMatcher.get() ==
nullptr);
355 lastMatcher = std::move(tmp);
360 std::unique_ptr<DataDescriptorMatcher> matcher;
361 if (
auto* pval = std::get_if<std::unique_ptr<DataDescriptorMatcher>>(&
inputMatcherNodes[0])) {
363 matcher = std::move(*pval);
368 if (concrete.has_value()) {
380 auto* matcher = std::get_if<std::unique_ptr<DataDescriptorMatcher>>(&child);
381 assert(matcher !=
nullptr);
382 auto* parent = std::get_if<std::unique_ptr<DataDescriptorMatcher>>(&
inputMatcherNodes.back());
383 assert(parent !=
nullptr);
384 std::unique_ptr<DataDescriptorMatcher>
node;
385 auto mergeDown = [&
node, &parent, &child]() ->
bool {
387 if (
auto* pval1 = std::get_if<ConstantValueMatcher>(&((*parent)->getLeft()))) {
389 node = std::make_unique<DataDescriptorMatcher>((*parent)->getOp(),
391 std::move((*parent)->getRight()));
395 if (
auto* pval2 = std::get_if<ConstantValueMatcher>(&((*parent)->getRight()))) {
397 node = std::make_unique<DataDescriptorMatcher>((*parent)->getOp(),
398 std::move((*parent)->getLeft()),
413 auto* parent = std::get_if<std::unique_ptr<DataDescriptorMatcher>>(&
inputMatcherNodes[nMatchers - 2]);
414 assert(parent !=
nullptr);
415 auto node = std::make_unique<DataDescriptorMatcher>((*parent)->getOp(),
417 std::move((*parent)->getRight()));
424 auto* parent = std::get_if<std::unique_ptr<DataDescriptorMatcher>>(&
inputMatcherNodes.back());
425 assert(parent !=
nullptr);
426 auto node = std::make_unique<DataDescriptorMatcher>((*parent)->getOp(),
427 std::move((*parent)->getLeft()),
440 std::unique_ptr<ConfigParamSpec> opt{
nullptr};
443 std::stringstream is;
528 metadata.back().workflowOptions.push_back(*opt);
741 std::string
v(s.c_str(), std::min(s.size(), 4UL));
745 std::string
v(s.c_str(), std::min(s.size(), 16UL));
755 op = DataDescriptorMatcher::Op::And;
756 }
else if (s ==
"or") {
757 op = DataDescriptorMatcher::Op::Or;
758 }
else if (s ==
"xor") {
759 op = DataDescriptorMatcher::Op::Xor;
760 }
else if (s ==
"just") {
761 op = DataDescriptorMatcher::Op::Just;
762 }
else if (s ==
"not") {
763 op = DataDescriptorMatcher::Op::Not;
797 metadata.back().cmdLineArgs.push_back(s);
802 metadata.back().channels.push_back(s);
809 std::stringstream errstr;
810 errstr <<
"No string handling for argument '" << std::string(
str,
length) <<
"' in state " <<
states.back() << std::endl;
811 throw std::runtime_error(errstr.str());