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 
13 #include "Minuit2/MnTraceObject.h"
14 #include "Minuit2/MnPrint.h"
15 
16 namespace ROOT {
17 
18 namespace Minuit2 {
19 
20 class FunctionMinimum;
21 class MnFcn;
22 class GradientCalculator;
23 class MinimumSeed;
24 class MinimumState;
25 class MnStrategy;
26 
28 
29 public:
31 
32  virtual ~MinimumBuilder() {}
33 
34  virtual FunctionMinimum Minimum(const MnFcn &, const GradientCalculator &, const MinimumSeed &, const MnStrategy &,
35  unsigned int, double) const = 0;
36 
37  int StorageLevel() const { return fStorageLevel; }
38  int PrintLevel() const { return fPrintLevel; }
39 
40  bool TraceIter() const { return (fTracer); }
41  MnTraceObject *TraceObject() const { return (fTracer); }
42 
43  virtual void SetPrintLevel(int level) { fPrintLevel = level; }
44  virtual void SetStorageLevel(int level) { fStorageLevel = level; }
45 
46  // set trace object (user manages it)
47  virtual void SetTraceObject(MnTraceObject &obj) { fTracer = &obj; }
48 
49  void TraceIteration(int iter, const MinimumState &state) const
50  {
51  if (fTracer)
52  (*fTracer)(iter, state);
53  }
54 
55 private:
58 
59  MnTraceObject *fTracer; //! tracer object (it is managed by user)
60 };
61 
62 } // namespace Minuit2
63 
64 } // namespace ROOT
65 
66 #endif // ROOT_Minuit2_MinimumBuilder
ROOT::Minuit2::MinimumBuilder::PrintLevel
int PrintLevel() const
Definition: MinimumBuilder.h:38
ROOT::Minuit2::MnFcn
Wrapper class to FCNBase interface used internally by Minuit.
Definition: MnFcn.h:30
ROOT::Minuit2::MinimumState
MinimumState keeps the information (position, Gradient, 2nd deriv, etc) after one minimization step (...
Definition: MinimumState.h:29
ROOT::Minuit2::MinimumBuilder::SetStorageLevel
virtual void SetStorageLevel(int level)
Definition: MinimumBuilder.h:44
ROOT::Minuit2::MinimumBuilder::~MinimumBuilder
virtual ~MinimumBuilder()
Definition: MinimumBuilder.h:32
ROOT::Minuit2::MinimumBuilder::TraceObject
MnTraceObject * TraceObject() const
Definition: MinimumBuilder.h:41
ROOT::Minuit2::MnTraceObject
Definition: MnTraceObject.h:20
ROOT::Minuit2::MinimumBuilder::StorageLevel
int StorageLevel() const
Definition: MinimumBuilder.h:37
ROOT::Minuit2::MinimumBuilder::fPrintLevel
int fPrintLevel
Definition: MinimumBuilder.h:56
ROOT::Minuit2::MinimumBuilder::TraceIteration
void TraceIteration(int iter, const MinimumState &state) const
Definition: MinimumBuilder.h:49
MnTraceObject.h
ROOT::Minuit2::MinimumBuilder::SetPrintLevel
virtual void SetPrintLevel(int level)
Definition: MinimumBuilder.h:43
ROOT::Minuit2::MinimumBuilder::SetTraceObject
virtual void SetTraceObject(MnTraceObject &obj)
Definition: MinimumBuilder.h:47
ROOT::Minuit2::FunctionMinimum
class holding the full result of the minimization; both internal and external (MnUserParameterState) ...
Definition: FunctionMinimum.h:33
ROOT::Minuit2::MnStrategy
API class for defining three levels of strategies: low (0), medium (1), high (>=2); acts on: Migrad (...
Definition: MnStrategy.h:27
ROOT::Minuit2::MinimumBuilder::MinimumBuilder
MinimumBuilder()
Definition: MinimumBuilder.cxx:17
ROOT::Minuit2::MinimumBuilder::TraceIter
bool TraceIter() const
Definition: MinimumBuilder.h:40
ROOT::Minuit2::MinimumBuilder::fTracer
MnTraceObject * fTracer
Definition: MinimumBuilder.h:59
MnPrint.h
ROOT::Minuit2::GradientCalculator
interface class for gradient calculators
Definition: GradientCalculator.h:23
ROOT::Minuit2::MinimumBuilder::Minimum
virtual FunctionMinimum Minimum(const MnFcn &, const GradientCalculator &, const MinimumSeed &, const MnStrategy &, unsigned int, double) const =0
ROOT
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Definition: EExecutionPolicy.hxx:4
ROOT::Minuit2::MinimumBuilder
Definition: MinimumBuilder.h:27
ROOT::Minuit2::MinimumSeed
MinimumSeed contains the starting values for the minimization produced by the SeedGenerator.
Definition: MinimumSeed.h:31
ROOT::Minuit2::MinimumBuilder::fStorageLevel
int fStorageLevel
Definition: MinimumBuilder.h:57