Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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#include "Rtypes.h"
26
27#include <memory>
28#include <string>
29
30class TFitResult;
31
33public:
34
35 TFitResultPtr(int status = -1): fStatus(status), fPointer(nullptr) {}
36
37 TFitResultPtr(const std::shared_ptr<TFitResult> & p);
38
40
41 TFitResultPtr(const TFitResultPtr& rhs);
42
43 operator int() const { return fStatus; }
44
45 TFitResult& operator*() const;
46
47 TFitResult* operator->() const;
48
49 TFitResult* Get() const;
50
52
53 virtual ~TFitResultPtr();
54
55private:
56
57 int fStatus; ///< fit status code
58 std::shared_ptr<TFitResult> fPointer; ///<! Smart Pointer to TFitResult class
59
60 ClassDef(TFitResultPtr,2) //indirection to TFitResult
61};
62
63namespace cling {
64 std::string printValue(const TFitResultPtr* val);
65}
66#endif
#define ClassDef(name, id)
Definition Rtypes.h:342
winID h TVirtualViewer3D TVirtualGLPainter p
Provides an indirection to the TFitResult class and with a semantics identical to a TFitResult pointe...
virtual ~TFitResultPtr()
Destructor.
TFitResult * Get() const
Return contained pointer.
std::shared_ptr< TFitResult > fPointer
! Smart Pointer to TFitResult class
int fStatus
fit status code
TFitResult & operator*() const
Implement the de-reference operator to make the class acts as a pointer to a TFitResult assert in cas...
TFitResult * operator->() const
Implement the -> operator to make the class acts as a pointer to a TFitResult.
TFitResultPtr & operator=(const TFitResultPtr &rhs)
Assignment operator.
TFitResultPtr(int status=-1)
Extends the ROOT::Fit::Result class with a TNamed inheritance providing easy possibility for I/O.
Definition TFitResult.h:34