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