Belle II Software  release-08-01-10
OnStateApplier.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/findlets/base/Findlet.h>
11 
12 #include <tracking/trackFindingCDC/numerics/WithWeight.h>
13 #include <tracking/trackFindingCDC/numerics/Weight.h>
14 
15 #include <vector>
16 
17 namespace Belle2 {
28  template <class AState>
29  class OnStateApplier : public
30  TrackFindingCDC::Findlet<const TrackFindingCDC::WithWeight<const AState*>, TrackFindingCDC::WithWeight<AState*>> {
31  private:
34 
35  public:
37  using Object = std::pair<const std::vector<TrackFindingCDC::WithWeight<const AState*>>, AState*>;
38 
40  void apply(const std::vector<TrackFindingCDC::WithWeight<const AState*>>& currentPath,
41  std::vector<TrackFindingCDC::WithWeight<AState*>>& childStates) override;
42 
44  virtual TrackFindingCDC::Weight operator()(const Object& object);
45  };
47 }
Helper findlet which applies its () operator to all pairs of path and state with all states in the gi...
std::pair< const std::vector< TrackFindingCDC::WithWeight< const AState * > >, AState * > Object
The object this filter refers to.
Interface for a minimal algorithm part that wants to expose some parameters to a module.
Definition: Findlet.h:26
A mixin class to attach a weight to an object.
Definition: WithWeight.h:24
virtual TrackFindingCDC::Weight operator()(const Object &object)
The filter operator for this class.
void apply(const std::vector< TrackFindingCDC::WithWeight< const AState * >> &currentPath, std::vector< TrackFindingCDC::WithWeight< AState * >> &childStates) override
Apply the () operator to all pairs of state and current path.
Abstract base class for different kinds of events.