10#include <tracking/trackFindingCDC/filters/base/AndFilter.dcl.h>
12#include <tracking/trackFindingCDC/numerics/Weight.h>
21 namespace TrackFindingCDC {
23 template <
class AFilter>
25 std::unique_ptr<AFilter> rhsFilter)
26 : m_lhsFilter(
std::move(lhsFilter))
27 , m_rhsFilter(
std::move(rhsFilter))
29 this->addProcessingSignalListener(
m_lhsFilter.get());
30 this->addProcessingSignalListener(
m_rhsFilter.get());
33 template <
class AFilter>
36 template <
class AFilter>
38 const std::string& prefix)
40 if (m_lhsFilter) m_lhsFilter->exposeParameters(moduleParamList, prefix);
41 if (m_rhsFilter) m_rhsFilter->exposeParameters(moduleParamList, prefix);
44 template<
class AFilter>
47 Weight lhsResult = (*m_lhsFilter)(obj);
49 if (std::isnan(lhsResult)) {
52 Weight rhsResult = (*m_rhsFilter)(obj);
The Module parameter list class.
AndFilter(std::unique_ptr< AFilter > lhsFilter, std::unique_ptr< AFilter > rhsFilter)
Constructor from two filters to be joined.
std::unique_ptr< AFilter > m_rhsFilter
Right hand side filter.
Weight operator()(const typename AFilter::Object &obj) final
Return result of right hand side filter if left hand side filter acknowledges.
~AndFilter()
Default destructor.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
std::unique_ptr< AFilter > m_lhsFilter
Left hand side filter.
Abstract base class for different kinds of events.