ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TFitResultPtr.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_TFitResultPtr
13 #define ROOT_TFitResultPtr
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TFitResultPtr //
18 // //
19 // Provides an indirection to TFitResult class and with a semantics //
20 // identical to a TFitResult pointer //
21 // //
22 // //
23 //////////////////////////////////////////////////////////////////////////
24 
25 #ifndef ROOT_Rtypes
26 #include "Rtypes.h"
27 #endif
28 
29 class TFitResult;
30 
31 #include <memory>
32 
34 public:
35 
37 
38  TFitResultPtr(const std::shared_ptr<TFitResult> & p);
39 
41 
42  TFitResultPtr(const TFitResultPtr& rhs);
43 
44  operator int() const { return fStatus; }
45 
46  TFitResult& operator*() const;
47 
48  TFitResult* operator->() const;
49 
50  TFitResult* Get() const;
51 
53 
54  virtual ~TFitResultPtr();
55 
56 private:
57 
58  int fStatus; // fit status code
59  std::shared_ptr<TFitResult> fPointer; //! Smart Pointer to TFitResult class
60 
61  ClassDef(TFitResultPtr,2) //indirection to TFitResult
62 };
63 
64 #endif
TAlienJobStatus * status
Definition: TAlienJob.cxx:51
TFitResultPtr & operator=(const TFitResultPtr &rhs)
Assignment operator.
#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
virtual ~TFitResultPtr()
Destructor.
TFitResult & operator*() const
Implement the de-reference operator to make the class acts as a pointer to a TFitResult assert in cas...
TFitResultPtr(int status=-1)
Definition: TFitResultPtr.h:36
Provides an indirection to the TFitResult class and with a semantics identical to a TFitResult pointe...
Definition: TFitResultPtr.h:33
TFitResult * operator->() const
Implement the -> operator to make the class acts as a pointer to a TFitResult.
TFitResult * Get() const
Return contained pointer.
std::shared_ptr< TFitResult > fPointer
Definition: TFitResultPtr.h:59