Logo ROOT  
Reference Guide
MinimumBuilder.h
Go to the documentation of this file.
1// @(#)root/minuit2:$Id$
2// Authors: M. Winkler, F. James, L. Moneta, A. Zsenei 2003-2005
3
4/**********************************************************************
5 * *
6 * Copyright (c) 2005 LCG ROOT Math team, CERN/PH-SFT *
7 * *
8 **********************************************************************/
9
10#ifndef ROOT_Minuit2_MinimumBuilder
11#define ROOT_Minuit2_MinimumBuilder
12
14#include "Minuit2/MnPrint.h"
15
16namespace ROOT {
17
18 namespace Minuit2 {
19
20
21class FunctionMinimum;
22class MnFcn;
23class GradientCalculator;
24class MinimumSeed;
25class MinimumState;
26class MnStrategy;
27
29
30public:
31
33
34 virtual ~MinimumBuilder() {}
35
36 virtual FunctionMinimum Minimum(const MnFcn&, const GradientCalculator&, const MinimumSeed&, const MnStrategy&, unsigned int, double) const = 0;
37
38 int StorageLevel() const { return fStorageLevel; }
39 int PrintLevel() const { return fPrintLevel; }
40
41 bool TraceIter() const { return (fTracer); }
42 MnTraceObject * TraceObject() const { return (fTracer); }
43
44 virtual void SetPrintLevel(int level) { fPrintLevel = level;}
45 virtual void SetStorageLevel(int level) { fStorageLevel = level;}
46
47 // set trace object (user manages it)
48 virtual void SetTraceObject(MnTraceObject & obj) {
49 fTracer = &obj;
50 }
51
52 void TraceIteration(int iter, const MinimumState & state) const {
53 if (fTracer) (*fTracer)(iter, state);
54 }
55
56protected:
57 // use an internal structure to control local vs global print level
58 // when the structure is created the global printlevel will be synhronized to the given value
59 // and when it is deleted it will be reset to the original value
61 BuilderPrintLevelConf(int printLevel);
62
64
65 int fPrevGlobLevel = 0; // cache previous global print level
66 };
67
68private:
69
72
73 MnTraceObject * fTracer; //! tracer object (it is managed by user)
74
75};
76
77 } // namespace Minuit2
78
79} // namespace ROOT
80
81#endif // ROOT_Minuit2_MinimumBuilder
class holding the full result of the minimization; both internal and external (MnUserParameterState) ...
interface class for gradient calculators
virtual void SetStorageLevel(int level)
void TraceIteration(int iter, const MinimumState &state) const
virtual void SetPrintLevel(int level)
virtual void SetTraceObject(MnTraceObject &obj)
MnTraceObject * TraceObject() const
virtual FunctionMinimum Minimum(const MnFcn &, const GradientCalculator &, const MinimumSeed &, const MnStrategy &, unsigned int, double) const =0
MinimumSeed contains the starting values for the minimization produced by the SeedGenerator.
Definition: MinimumSeed.h:31
MinimumState keeps the information (position, Gradient, 2nd deriv, etc) after one minimization step (...
Definition: MinimumState.h:29
Wrapper class to FCNBase interface used internally by Minuit.
Definition: MnFcn.h:33
API class for defining three levels of strategies: low (0), medium (1), high (>=2); acts on: Migrad (...
Definition: MnStrategy.h:27
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Definition: StringConv.hxx:21