Belle II Software development
ObserverFilter.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
12namespace Belle2 {
17 namespace TrackFindingCDC {
18
20 template<class AFilter>
21 class ObserverFilter : public AFilter {
22
23 private:
25 using Super = AFilter;
26
27 public:
29 using AFilter::AFilter;
30
32 using Object = typename AFilter::Object;
33
34 public:
36 void terminate() override;
37
38 public:
47 Weight operator()(const Object& object) override;
48
49 private:
51 unsigned int m_yesAnswers = 0;
52
54 unsigned int m_noAnswers = 0;
55 };
56 }
58}
Observer listening to the number of yes and no answers from the filter.
Weight operator()(const Object &object) override
Function to evaluate the object.
void terminate() override
Terminate the filter after event processing.
AFilter Super
Type of the filter base class.
unsigned int m_yesAnswers
Number of counted yes answers.
unsigned int m_noAnswers
Number of counted no answers.
typename AFilter::Object Object
Object type to be filtered.
Abstract base class for different kinds of events.