Belle II Software  release-08-01-10
UnionRecording< AFilter > Class Template Reference

A filter that records variables form given objects. More...

#include <UnionRecordingFilter.dcl.h>

Inheritance diagram for UnionRecording< AFilter >:
Collaboration diagram for UnionRecording< AFilter >:

Public Types

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

Public Member Functions

 UnionRecording (std::unique_ptr< AFilterFactory > filterFactory, const std::string &defaultRootFileName="records.root", const std::string &defaultTreeName="records")
 Constructor of the filter.
 
 ~UnionRecording ()
 Default destructor.
 
void exposeParameters (ModuleParamList *moduleParamList, const std::string &prefix) override
 Expose the set of parameters of the filter to the module parameter list.
 
void initialize () override
 Initialize the recorder before event processing. More...
 
virtual std::vector< std::string > getValidVarSetNames () const
 Getter for the list of valid names of concret variable sets.
 
virtual std::vector< std::string > getValidFilterNames () const
 Getter for the names of valid filters.
 
virtual std::unique_ptr< AVarSetcreateVarSet (const std::string &name) const
 Create a variable set for the given name.
 
const std::vector< std::string > & getVarSetNames () const
 Splits the comma separated variable names list into a vector of names.
 
void terminate () override
 Initialize the recorder after event processing.
 
Weight operator() (const Object &obj) final
 Function to evaluate the cluster for its backgroundness.
 
bool needsTruthInformation () override
 Checks if any variables need Monte Carlo information.
 
std::unique_ptr< AVarSetreleaseVarSet () &&
 Steal the set of variables form this filter - filter becomes disfunctional afterwards.
 

Protected Member Functions

MayBePtr< AFilter > getSkimFilter () const
 Getter for the skim filter to select objects to be recorded.
 
void setSkimFilter (std::unique_ptr< AFilter > skimFilter)
 Setter for the skim filter to select objects to be recorded.
 
AVarSetgetVarSet () const
 Getter for the set of variables.
 
void setVarSet (std::unique_ptr< AVarSet > varSet)
 Setter for the set of variables.
 

Private Types

using Super = Recording< AFilter >
 Type of the super class.
 
using AFilterFactory = FilterFactory< AFilter >
 Type of the factory used to produce FilterVarSets to be add to the recording.
 
using AVarSet = BaseVarSet< Object >
 Type of the factory used to produce FilterVarSets to be add to the recording.
 

Private Attributes

std::vector< std::string > m_param_varSetNames
 List of varsets that should be recorded.
 
std::string m_param_skim = ""
 Name of the filter to selected to objects to be record.
 
std::unique_ptr< AFilterFactorym_filterFactory
 FilterFactory.
 
std::unique_ptr< Recorderm_recorder
 Recorder to write all variable sets of the encountered objects.
 
std::string m_param_rootFileName
 Name of the ROOT file to which shall be written.
 
std::string m_param_treeName
 Name of Tree to be written.
 
Weight m_param_returnWeight
 Returns Weight when this filter is called.
 
std::unique_ptr< AFilter > m_skimFilter = nullptr
 Skimming filter to select a subset of objects to be recorded.
 
std::unique_ptr< AVarSetm_varSet
 Instance of the variable set to be used in the filter.
 

Detailed Description

template<class AFilter>
class Belle2::TrackFindingCDC::UnionRecording< AFilter >

A filter that records variables form given objects.

It may record native varsets and/or weigths from other filters.

Definition at line 33 of file UnionRecordingFilter.dcl.h.

Member Function Documentation

◆ initialize()

void initialize ( void  )
override

Initialize the recorder before event processing.

Create the skimming filter

Create and add the concrete varsets from the varset parameter.

Definition at line 67 of file UnionRecordingFilter.icc.h.


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