14 #include <mrpt/system/CTimeLogger.h>
27 const mrpt::optional_ref<mrpt::system::CTimeLogger>& profiler)
29 for (
const auto&
f : filters)
31 ASSERT_(
f.get() !=
nullptr);
33 std::optional<mrpt::system::CTimeLoggerEntry> tle;
34 if (profiler) tle.emplace(*profiler,
f->GetRuntimeClass()->className);
41 const mrpt::containers::yaml& c,
const mrpt::system::VerbosityLevel& vLevel)
43 if (c.isNullNode())
return {};
45 ASSERT_(c.isSequence());
49 for (
const auto& entry : c.asSequence())
51 const auto& e = entry.asMap();
53 const auto sClass = e.at(
"class_name").as<
std::string>();
54 auto o = mrpt::rtti::classFactory(sClass);
57 auto f = std::dynamic_pointer_cast<FilterBase>(o);
60 "`%s` class seems not to be derived from FilterBase",
63 f->setMinLoggingLevel(vLevel);
65 f->initialize(e.at(
"params"));
75 const auto yamlContent = mrpt::containers::yaml::FromFile(
filename);
77 ASSERT_(yamlContent.has(
"filters") && yamlContent[
"filters"].isSequence());