Belle II Software  release-08-01-10
NotFilter.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/numerics/Weight.h>
11 
12 #include <memory>
13 
14 namespace Belle2 {
19  class ModuleParamList;
20 
21  namespace TrackFindingCDC {
23  template<class AFilter>
24  class NotFilter : public AFilter {
25 
26  private:
28  using Super = AFilter;
29 
30  public:
32  using Object = typename AFilter::Object;
33 
34  public:
36  explicit NotFilter(std::unique_ptr<AFilter> filter);
37 
40 
42  void exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix) final;
43 
45  Weight operator()(const typename AFilter::Object& obj) final;
46 
47  private:
49  std::unique_ptr<AFilter> m_filter;
50  };
51  }
53 }
The Module parameter list class.
Filter adapter type that inverts the acceptance criterion for cross checks.
Definition: NotFilter.dcl.h:24
AFilter Super
Type of the base class.
Definition: NotFilter.dcl.h:28
std::unique_ptr< AFilter > m_filter
Filter to be inverted.
Definition: NotFilter.dcl.h:49
NotFilter(std::unique_ptr< AFilter > filter)
Constructor from filter to be inverted.
Definition: NotFilter.icc.h:25
Weight operator()(const typename AFilter::Object &obj) final
Accept inverse.
Definition: NotFilter.icc.h:42
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
Definition: NotFilter.icc.h:35
typename AFilter::Object Object
Type of the object to be filtered.
Definition: NotFilter.dcl.h:32
~NotFilter()
Default destructor.
std::map< ExpRun, std::pair< double, double > > filter(const std::map< ExpRun, std::pair< double, double >> &runs, double cut, std::map< ExpRun, std::pair< double, double >> &runsRemoved)
filter events to remove runs shorter than cut, it stores removed runs in runsRemoved
Definition: Splitter.cc:38
Abstract base class for different kinds of events.