Belle II Software development
UnionRecordingFilter.dcl.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#pragma once
9
10#include <tracking/trackFindingCDC/filters/base/RecordingFilter.dcl.h>
11
12#include <tracking/trackFindingCDC/filters/base/FilterFactory.fwd.h>
13
14#include <tracking/trackFindingCDC/varsets/BaseVarSet.h>
15
16#include <vector>
17#include <string>
18#include <memory>
19
20namespace Belle2 {
25 class ModuleParamList;
26 namespace TrackFindingCDC {
27
32 template <class AFilter>
33 class UnionRecording : public Recording<AFilter> {
34
35 private:
38
41
42 public:
44 using Object = typename AFilter::Object;
45
46 private:
49
50 public:
52 UnionRecording(std::unique_ptr<AFilterFactory> filterFactory,
53 const std::string& defaultRootFileName = "records.root",
54 const std::string& defaultTreeName = "records");
55
58
60 void exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix) override;
61
63 void initialize() override;
64
66 virtual std::vector<std::string> getValidVarSetNames() const;
67
69 virtual std::vector<std::string> getValidFilterNames() const;
70
72 virtual std::unique_ptr<AVarSet> createVarSet(const std::string& name) const;
73
75 const std::vector<std::string>& getVarSetNames() const;
76
77 private:
79 std::vector<std::string> m_param_varSetNames;
80
82 std::string m_param_skim = "";
83
85 std::unique_ptr<AFilterFactory> m_filterFactory;
86 };
87
89 template <class AFilterFactory>
90 class UnionRecordingFilter : public UnionRecording<typename AFilterFactory::CreatedFilter> {
91
92 private:
95
96 public:
98 UnionRecordingFilter(const std::string& defaultRootFileName = "records.root",
99 const std::string& defaultTreeName = "records");
100
103 };
104 }
106}
The Module parameter list class.
Factory that can create apropriate filter instances from a name.
Filter adapter to make a filter work on a set of variables and record the observed instances on invok...
Convience template to create a recording filter for a filter factory.
A filter that records variables form given objects.
virtual std::vector< std::string > getValidFilterNames() const
Getter for the names of valid filters.
void initialize() override
Initialize the recorder before event processing.
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< AFilterFactory > m_filterFactory
FilterFactory.
const std::vector< std::string > & getVarSetNames() const
Splits the comma separated variable names list into a vector of names.
typename AFilter::Object Object
Type of the object to be analysed.
virtual std::unique_ptr< AVarSet > createVarSet(const std::string &name) const
Create a variable set for the given name.
virtual std::vector< std::string > getValidVarSetNames() const
Getter for the list of valid names of concret variable sets.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the set of parameters of the filter to the module parameter list.
Abstract base class for different kinds of events.