10#include <tracking/ckf/general/findlets/LimitedOnStateApplier.dcl.h>
11#include <tracking/trackFindingCDC/utilities/Functional.h>
12#include <tracking/trackFindingCDC/utilities/StringManipulation.h>
14#include <framework/core/ModuleParamList.templateDetails.h>
23 template <
class AState,
class AFilter>
26 this->addProcessingSignalListener(&m_filter);
29 template <
class AState,
class AFilter>
33 Super::apply(currentPath, childStates);
35 if (m_param_useNStates > 0 and childStates.size() >
static_cast<unsigned int>(m_param_useNStates)) {
37 childStates.erase(childStates.begin() + m_param_useNStates, childStates.end());
41 template <
class AState,
class AFilter>
44 return m_filter(
object);
47 template <
class AState,
class AFilter>
50 m_filter.exposeParameters(moduleParamList, prefix);
52 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"useNStates"), m_param_useNStates,
"Only use the best N states",
typename Super::Object Object
The object to filer.
The Module parameter list class.
A mixin class to attach a weight to an object.
void addParameter(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.
void apply(const std::vector< TrackFindingCDC::WithWeight< const AState * > > ¤tPath, std::vector< TrackFindingCDC::WithWeight< AState * > > &childStates) override
Apply the filter to each pair of states and current path and let only pass the best N states.
TrackFindingCDC::Weight operator()(const Object &object) override
Copy the filter operator to this method.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the subfindlet.
LimitedOnStateApplier()
Constructor adding the findlet as a listener.
Abstract base class for different kinds of events.
Functor factory turning a binary functor and two functors into a new functor which executes the binar...