Logo ROOT   6.08/07
Reference Guide
TFitResult.h
Go to the documentation of this file.
1 // @(#)root/mathcore:$Id$
2 // Author: David Gonzalez Maline Tue Nov 10 15:01:24 2009
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2009, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TFitResult
13 #define ROOT_TFitResult
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TFitResult //
18 // //
19 // Provides a way to view the fit result and to store them. //
20 // //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 #ifndef ROOT_TNamed
25 #include "TNamed.h"
26 #endif
27 
28 #ifndef ROOT_FIT_FitResult
29 #include "Fit/FitResult.h"
30 #endif
31 
32 #ifndef ROOT_TMatrixDSym
33 #include "TMatrixDSym.h"
34 #endif
35 
36 class TFitResult:public TNamed, public ROOT::Fit::FitResult {
37 
38 public:
39 
40  // Default constructor for I/O
41  TFitResult(int status = 0): TNamed("TFitResult","TFitResult"),
42  ROOT::Fit::FitResult() {
43  fStatus = status;
44  };
45 
46  // constructor from name and title
47  TFitResult(const char * name, const char * title) :
48  TNamed(name,title),
49  ROOT::Fit::FitResult()
50  {}
51 
52  // constructor from an FitResult
54 
55  virtual ~TFitResult() {}
56 
57 
58  virtual void Print(Option_t *option="") const;
59 
61 
63 
64 
65  using TObject::Error;
66 
67  // need to re-implement to solve conflict with TObject::Error
68  double Error(unsigned int i) const {
69  return ParError(i);
70  }
71 
72 private:
73  ClassDef(TFitResult, 0); // Class holding the result of the fit
74 };
75 
76 namespace cling {
77  std::string printValue(const TFitResult* val);
78 }
79 #endif
std::string printValue(const TFitResult *val)
Print the TFitResult.
Definition: TFitResult.cxx:89
This namespace contains pre-defined functions to be used in conjuction with TExecutor::Map and TExecu...
Definition: StringConv.hxx:21
TMatrixDSym GetCovarianceMatrix() const
Return the covariance matrix from fit.
Definition: TFitResult.cxx:57
const char Option_t
Definition: RtypesCore.h:62
TMatrixDSym GetCorrelationMatrix() const
Return the correlation matrix from fit.
Definition: TFitResult.cxx:75
TFitResult(const char *name, const char *title)
Definition: TFitResult.h:47
#define ClassDef(name, id)
Definition: Rtypes.h:254
Extends the ROOT::Fit::Result class with a TNamed inheritance providing easy possibility for I/O...
Definition: TFitResult.h:36
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:33
TFitResult(int status=0)
Definition: TFitResult.h:41
virtual void Print(Option_t *option="") const
Print result of the fit, by default chi2, parameter values and errors.
Definition: TFitResult.cxx:42
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition: TObject.cxx:925
double Error(unsigned int i) const
Definition: TFitResult.h:68
class containg the result of the fit and all the related information (fitted parameter values...
Definition: FitResult.h:52
double f(double x)
TFitResultPtr Fit(FitObject *h1, TF1 *f1, Foption_t &option, const ROOT::Math::MinimizerOptions &moption, const char *goption, ROOT::Fit::DataRange &range)
Definition: HFitImpl.cxx:134
Print a TSeq at the prompt:
Definition: TDatime.h:114
FitResult()
Default constructor for an empty (non valid) fit result.
Definition: FitResult.cxx:45
virtual ~TFitResult()
Definition: TFitResult.h:55
char name[80]
Definition: TGX11.cxx:109
double ParError(unsigned int i) const
parameter error by index
Definition: FitResult.h:195