 |
Belle II Software
release-05-01-25
|
12 #include <tracking/trackFindingCDC/filters/base/FilterFactory.fwd.h>
14 #include <tracking/trackFindingCDC/filters/base/FilterParamMap.h>
16 #include <tracking/trackFindingCDC/numerics/Weight.h>
26 class ModuleParamList;
28 namespace TrackFindingCDC {
30 template <
class AFilter>
31 class Chooseable :
public AFilter {
35 using Super = AFilter;
39 using Object =
typename AFilter::Object;
47 const std::string& filterName);
98 template <
class AFilterFactory>
100 :
public Chooseable<typename AFilterFactory::CreatedFilter> {
Factory that can create apropriate filter instances from a name.
Convenvience wrapper to setup a Chooseable filter from a specific factory object.
void initialize() override
Initialize before event processing.
Chooseable(std::unique_ptr< FilterFactory< AFilter >> filterFactory)
Setup the chooseable filter with available choices from the factory.
Weight operator()(const Object &object) final
Function to evaluate the object.
std::unique_ptr< FilterFactory< AFilter > > m_filterFactory
Filter factor to construct a chosen filter.
typename AFilter::Object Object
Type of the object to be analysed.
Abstract base class for different kinds of events.
std::string getFilterName() const
Return name of the selected filter.
std::string m_param_filterName
Parameters : Name of the selected filter.
bool needsTruthInformation() override
Indicates if the filter requires Monte Carlo information.
ChooseableFilter()
Constructor of the chooseable filter.
std::unique_ptr< AFilter > m_filter
Chosen filter.
FilterParamMap m_param_filterParameters
Parameter: Parameter keys and values to be forwarded to the chosen filter.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the set of parameters of the filter to the module parameter list.
Filter can delegate to a filter chosen and set up at run time by parameters.
The Module parameter list class.
Variant of types allowed to be forwarded to a filter selected at runtime.
AFilter Super
Type of the base class.