TFitResultPtr.h

Go to the documentation of this file.
00001 // @(#)root/mathcore:$Id: TFitResultPtr.h 31262 2009-11-18 07:38:37Z brun $
00002 // Author: David Gonzalez Maline Tue Nov 10 15:01:24 2009
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2009, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TFitResultPtr
00013 #define ROOT_TFitResultPtr
00014 
00015 //////////////////////////////////////////////////////////////////////////
00016 //                                                                      //
00017 // TFitResultPtr                                                        //
00018 //                                                                      //
00019 // Provides an indirection to TFitResult class and with a semantics     //
00020 // identical to a TFitResult pointer                                    //
00021 //                                                                      //
00022 //                                                                      //
00023 //////////////////////////////////////////////////////////////////////////
00024 
00025 #ifndef ROOT_Rtypes
00026 #include "Rtypes.h"
00027 #endif
00028 
00029 class TFitResult;
00030 
00031 class TFitResultPtr {
00032 public:
00033 
00034    TFitResultPtr(int status = -1): fStatus(status), fPointer(0) {};
00035 
00036    TFitResultPtr(TFitResult* p);
00037 
00038    TFitResultPtr(const TFitResultPtr& rhs); 
00039 
00040    operator int() const { return fStatus; }
00041    
00042    TFitResult& operator*() const;
00043 
00044    TFitResult* operator->() const;
00045 
00046    TFitResult* Get() const { return fPointer; }
00047 
00048    TFitResultPtr& operator= (const TFitResultPtr& rhs); 
00049 
00050    virtual ~TFitResultPtr();
00051 
00052 private:
00053    
00054    int fStatus;          // fit status code
00055    TFitResult* fPointer; // Smart Pointer to TFitResult class  
00056 
00057    ClassDef(TFitResultPtr,1)  //indirection to TFitResult
00058 };
00059 
00060 #endif

Generated on Tue Jul 5 14:22:49 2011 for ROOT_528-00b_version by  doxygen 1.5.1