Belle II Software development
BaseTracer.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * Forked from https://github.com/iLCSoft/MarlinKinfit *
6 * *
7 * Further information about the fit engine and the user interface *
8 * provided in MarlinKinfit can be found at *
9 * https://www.desy.de/~blist/kinfit/doc/html/ *
10 * and in the LCNotes LC-TOOL-2009-001 and LC-TOOL-2009-004 available *
11 * from http://www-flc.desy.de/lcnotes/ *
12 * *
13 * See git log for contributors and copyright holders. *
14 * This file is licensed under LGPL-3.0, see LICENSE.md. *
15 **************************************************************************/
16
17#include "analysis/OrcaKinFit/BaseTracer.h"
18
19namespace Belle2 {
24 namespace OrcaKinFit {
25
26 BaseTracer::BaseTracer(): next(nullptr) {}
27
28 BaseTracer::~BaseTracer() = default;
29
31 {
32 if (next) next->initialize(fitter);
33 }
34
36 {
37 if (next) next->step(fitter);
38 }
39
40 void BaseTracer::substep(BaseFitter& fitter, int flag)
41 {
42 if (next) next->substep(fitter, flag);
43 }
44
46 {
47 if (next) next->finish(fitter);
48 }
49
50 void BaseTracer::setNextTracer(BaseTracer* next_)
51 {
52 next = next_;
53 }
54
55 void BaseTracer::setNextTracer(BaseTracer& next_)
56 {
57 next = &next_;
58 }
59
60 BaseTracer* BaseTracer::getNextTracer()
61 {
62 return next;
63 }
64
65 }// end OrcaKinFit namespace
67} // end Belle2 namespace
68
69
Abstract base class for fitting engines of kinematic fits.
Definition BaseFitter.h:47
Abstract base class for trace objects of kinematic fits.
Definition BaseTracer.h:70
virtual void step(BaseFitter &fitter)
Called at the end of each step.
Definition BaseTracer.cc:35
virtual void initialize(BaseFitter &fitter)
Called at the start of a new fit (during initialization)
Definition BaseTracer.cc:30
virtual void finish(BaseFitter &fitter)
Called at the end of a fit.
Definition BaseTracer.cc:45
virtual void substep(BaseFitter &fitter, int flag)
Called at intermediate points during a step.
Definition BaseTracer.cc:40
Abstract base class for different kinds of events.