// @(#)root/mathcore:$Id$
// Author: David Gonzalez Maline Tue Nov 10 15:01:24 2009

/*************************************************************************
 * Copyright (C) 1995-2009, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TFitResult
#define ROOT_TFitResult

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TFitResult                                                           //
//                                                                      //
// Provides a way to view the fit result and to store them.             //
//                                                                      //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TNamed
#include "TNamed.h"
#endif

#ifndef ROOT_FIT_FitResult
#include "Fit/FitResult.h"
#endif

#ifndef ROOT_TMatrixDSym
#include "TMatrixDSym.h"
#endif

class TFitResult:public TNamed, public ROOT::Fit::FitResult {

public:

   // Default constructor for I/O
   TFitResult(int status = 0): TNamed("TFitResult","TFitResult"),
                           ROOT::Fit::FitResult() {
      fStatus = status;
   };

   // constructor from name and title
   TFitResult(const char * name, const char * title) :
      TNamed(name,title),
      ROOT::Fit::FitResult()
   {}

   // constructor from an FitResult
   TFitResult(const ROOT::Fit::FitResult& f);

   virtual ~TFitResult() {}


   virtual void  Print(Option_t *option="") const;

   TMatrixDSym GetCovarianceMatrix() const;

   TMatrixDSym GetCorrelationMatrix() const;


   using TObject::Error;

   // need to re-implement to solve conflict with TObject::Error
   double Error(unsigned int i) const {
      return ParError(i);
   }

private:
   ClassDef(TFitResult,1)  // Class holding the result of the fit
};

#endif
 TFitResult.h:1
 TFitResult.h:2
 TFitResult.h:3
 TFitResult.h:4
 TFitResult.h:5
 TFitResult.h:6
 TFitResult.h:7
 TFitResult.h:8
 TFitResult.h:9
 TFitResult.h:10
 TFitResult.h:11
 TFitResult.h:12
 TFitResult.h:13
 TFitResult.h:14
 TFitResult.h:15
 TFitResult.h:16
 TFitResult.h:17
 TFitResult.h:18
 TFitResult.h:19
 TFitResult.h:20
 TFitResult.h:21
 TFitResult.h:22
 TFitResult.h:23
 TFitResult.h:24
 TFitResult.h:25
 TFitResult.h:26
 TFitResult.h:27
 TFitResult.h:28
 TFitResult.h:29
 TFitResult.h:30
 TFitResult.h:31
 TFitResult.h:32
 TFitResult.h:33
 TFitResult.h:34
 TFitResult.h:35
 TFitResult.h:36
 TFitResult.h:37
 TFitResult.h:38
 TFitResult.h:39
 TFitResult.h:40
 TFitResult.h:41
 TFitResult.h:42
 TFitResult.h:43
 TFitResult.h:44
 TFitResult.h:45
 TFitResult.h:46
 TFitResult.h:47
 TFitResult.h:48
 TFitResult.h:49
 TFitResult.h:50
 TFitResult.h:51
 TFitResult.h:52
 TFitResult.h:53
 TFitResult.h:54
 TFitResult.h:55
 TFitResult.h:56
 TFitResult.h:57
 TFitResult.h:58
 TFitResult.h:59
 TFitResult.h:60
 TFitResult.h:61
 TFitResult.h:62
 TFitResult.h:63
 TFitResult.h:64
 TFitResult.h:65
 TFitResult.h:66
 TFitResult.h:67
 TFitResult.h:68
 TFitResult.h:69
 TFitResult.h:70
 TFitResult.h:71
 TFitResult.h:72
 TFitResult.h:73
 TFitResult.h:74
 TFitResult.h:75
 TFitResult.h:76