Logo ROOT   6.14/05
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 #include "TNamed.h"
25 
26 #include "Fit/FitResult.h"
27 
28 #include "TMatrixDSym.h"
29 
30 class TFitResult:public TNamed, public ROOT::Fit::FitResult {
31 
32 public:
33 
34  // Default constructor for I/O
35  TFitResult(int status = 0): TNamed("TFitResult","TFitResult"),
36  ROOT::Fit::FitResult() {
37  fStatus = status;
38  };
39 
40  // constructor from name and title
41  TFitResult(const char * name, const char * title) :
42  TNamed(name,title),
43  ROOT::Fit::FitResult()
44  {}
45 
46  // constructor from an FitResult
48 
49  virtual ~TFitResult() {}
50 
51 
52  virtual void Print(Option_t *option="") const;
53 
55 
57 
58 
59  using TObject::Error;
60 
61  // need to re-implement to solve conflict with TObject::Error
62  double Error(unsigned int i) const {
63  return ParError(i);
64  }
65 
66 private:
67  ClassDef(TFitResult, 0); // Class holding the result of the fit
68 };
69 
70 namespace cling {
71  std::string printValue(const TFitResult* val);
72 }
73 #endif
std::string printValue(const TFitResult *val)
Print the TFitResult.
Definition: TFitResult.cxx:89
Namespace for new ROOT classes and functions.
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
#define f(i)
Definition: RSha256.hxx:104
TFitResult(const char *name, const char *title)
Definition: TFitResult.h:41
#define ClassDef(name, id)
Definition: Rtypes.h:320
Extends the ROOT::Fit::Result class with a TNamed inheritance providing easy possibility for I/O...
Definition: TFitResult.h:30
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
TFitResult(int status=0)
Definition: TFitResult.h:35
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:880
double Error(unsigned int i) const
Definition: TFitResult.h:62
class containg the result of the fit and all the related information (fitted parameter values...
Definition: FitResult.h:48
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:115
FitResult()
Default constructor for an empty (non valid) fit result.
Definition: FitResult.cxx:45
virtual ~TFitResult()
Definition: TFitResult.h:49
char name[80]
Definition: TGX11.cxx:109
double ParError(unsigned int i) const
parameter error by index
Definition: FitResult.h:191