Belle II Software  release-08-01-10
ChooseableFilter< AFilterFactory > Class Template Reference

Convenvience wrapper to setup a Chooseable filter from a specific factory object. More...

#include <ChooseableFilter.dcl.h>

Inheritance diagram for ChooseableFilter< AFilterFactory >:
Collaboration diagram for ChooseableFilter< AFilterFactory >:

Public Types

using Object = typename AFilter::Object
 Type of the object to be analysed.
 

Public Member Functions

 ChooseableFilter ()
 Constructor of the chooseable filter.
 
 ChooseableFilter (const std::string &filterName)
 Constructor of the chooseable filter taking the default filter name.
 
void exposeParameters (ModuleParamList *moduleParamList, const std::string &prefix) final
 Expose the set of parameters of the filter to the module parameter list. More...
 
void initialize () override
 Initialize before event processing. More...
 
bool needsTruthInformation () override
 Indicates if the filter requires Monte Carlo information.
 
Weight operator() (const Object &object) final
 Function to evaluate the object. More...
 
Weight operator() (const Object &object) const
 Const version of operator.
 
std::string getFilterName () const
 Return name of the selected filter.
 

Private Types

using Super = Chooseable< typename AFilterFactory::CreatedFilter >
 Type of the super class.
 

Private Attributes

std::string m_param_filterName
 Parameters : Name of the selected filter.
 
FilterParamMap m_param_filterParameters
 Parameter: Parameter keys and values to be forwarded to the chosen filter.
 
std::unique_ptr< FilterFactory< AFilterFactory::CreatedFilter > > m_filterFactory
 Filter factor to construct a chosen filter.
 
std::unique_ptr< AFilterFactory::CreatedFilter > m_filter
 Chosen filter.
 

Detailed Description

template<class AFilterFactory>
class Belle2::TrackFindingCDC::ChooseableFilter< AFilterFactory >

Convenvience wrapper to setup a Chooseable filter from a specific factory object.

Definition at line 97 of file ChooseableFilter.dcl.h.

Member Function Documentation

◆ exposeParameters()

void exposeParameters ( ModuleParamList moduleParamList,
const std::string &  prefix 
)
finalinherited

Expose the set of parameters of the filter to the module parameter list.

Make a force parameter in case no default was given

Make a normal parameter in case default is known

Definition at line 48 of file ChooseableFilter.icc.h.

◆ initialize()

void initialize ( void  )
overrideinherited

Initialize before event processing.

Transfer parameters

Definition at line 51 of file ChooseableFilter.icc.h.

◆ operator()()

Weight operator() ( const Object object)
finalinherited

Function to evaluate the object.

Delegates to the filter chosen by module parameters.

Parameters
objectThe object to be accepted or rejected.
Returns
A finit float value if the object is accepted. NAN if the object is rejected.

Definition at line 64 of file ChooseableFilter.icc.h.


The documentation for this class was generated from the following files: