Logo ROOT  
Reference Guide
TPaveStats.h
Go to the documentation of this file.
1 // @(#)root/graf:$Id$
2 // Author: Rene Brun 15/03/99
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, 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 #ifndef ROOT_TPaveStats
12 #define ROOT_TPaveStats
13 
14 
15 #include "TPaveText.h"
16 #include "TVirtualPaveStats.h"
17 
18 class TPaveStats : public TPaveText, public TVirtualPaveStats {
19 
20 protected:
21  Int_t fOptFit; ///< option Fit
22  Int_t fOptStat; ///< option Stat
23  TString fFitFormat; ///< Printing format for fit parameters
24  TString fStatFormat; ///< Printing format for stats
25  TObject *fParent; ///< owner of this TPaveStats
26 
27 public:
30  virtual ~TPaveStats();
31  virtual TBox *AddBox(Double_t , Double_t , Double_t , Double_t) {return 0;}
32  virtual TLine *AddLine(Double_t , Double_t , Double_t, Double_t) {return 0;}
33  virtual void DeleteText() { }
34  virtual void EditText() { }
35  virtual const char *GetFitFormat() const {return fFitFormat.Data();}
36  virtual const char *GetStatFormat() const {return fStatFormat.Data();}
37  Int_t GetOptFit() const;
38  Int_t GetOptStat() const;
39  virtual TObject *GetParent() const {return fParent;}
40  virtual void Paint(Option_t *option="");
41  virtual void InsertText(const char *) { }
42  virtual void InsertLine() { }
43  virtual void ReadFile(const char *, Option_t *, Int_t, Int_t) { }
44  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
45  virtual void SaveStyle(); // *MENU*
46  virtual void SetAllWith(const char *, Option_t *, Double_t) { }
47  virtual void SetMargin(Float_t) { }
48  virtual void SetFitFormat(const char *format="5.4g"); // *MENU*
49  virtual void SetStatFormat(const char *format="6.4g"); // *MENU*
50  void SetOptFit(Int_t fit=1); // *MENU*
51  void SetOptStat(Int_t stat=1); // *MENU*
52  virtual void SetParent(TObject*obj) {fParent = obj;}
53  virtual void UseCurrentStyle();
54 
55  ClassDef(TPaveStats,5) //A special TPaveText to draw histogram statistics.
56 };
57 
58 #endif
TPaveStats::Paint
virtual void Paint(Option_t *option="")
Paint the pave stat.
Definition: TPaveStats.cxx:320
TPaveStats::UseCurrentStyle
virtual void UseCurrentStyle()
Replace current attributes by current style.
Definition: TPaveStats.cxx:569
TPaveStats::InsertLine
virtual void InsertLine()
Add a new line at the mouse position.
Definition: TPaveStats.h:48
TPaveStats::fFitFormat
TString fFitFormat
Printing format for fit parameters.
Definition: TPaveStats.h:29
TLine
Definition: TLine.h:22
TPaveStats::InsertText
virtual void InsertText(const char *)
Add a new Text line at the mouse position.
Definition: TPaveStats.h:47
TPaveStats::SetStatFormat
virtual void SetStatFormat(const char *format="6.4g")
Change (i.e. set) the format for printing statistics.
Definition: TPaveStats.cxx:312
TPaveStats::GetStatFormat
virtual const char * GetStatFormat() const
Definition: TPaveStats.h:42
TPaveStats::SetParent
virtual void SetParent(TObject *obj)
Definition: TPaveStats.h:58
TString::Data
const char * Data() const
Definition: TString.h:369
TPaveStats::TPaveStats
TPaveStats()
TPaveStats default constructor.
Definition: TPaveStats.cxx:226
TPaveStats::AddLine
virtual TLine * AddLine(Double_t, Double_t, Double_t, Double_t)
Add a new graphics line to this pavetext.
Definition: TPaveStats.h:38
TPaveStats::SetFitFormat
virtual void SetFitFormat(const char *format="5.4g")
Change (i.e. set) the format for printing fit parameters in statistics box.
Definition: TPaveStats.cxx:286
TPaveStats::SetOptFit
void SetOptFit(Int_t fit=1)
Set the fit option.
Definition: TPaveStats.cxx:294
TPaveStats::GetParent
virtual TObject * GetParent() const
Definition: TPaveStats.h:45
TPaveStats::EditText
virtual void EditText()
Edit text at the mouse position.
Definition: TPaveStats.h:40
Float_t
float Float_t
Definition: RtypesCore.h:57
Int_t
int Int_t
Definition: RtypesCore.h:45
TPaveStats::GetOptStat
Int_t GetOptStat() const
Return the stat option.
Definition: TPaveStats.cxx:266
TPaveStats::DeleteText
virtual void DeleteText()
Delete text at the mouse position.
Definition: TPaveStats.h:39
TString
Definition: TString.h:136
TPaveStats::AddBox
virtual TBox * AddBox(Double_t, Double_t, Double_t, Double_t)
Add a new graphics box to this pavetext.
Definition: TPaveStats.h:37
TPaveText.h
TPaveStats
Definition: TPaveStats.h:18
x1
static const double x1[5]
Definition: RooGaussKronrodIntegrator1D.cxx:346
TPaveStats::SavePrimitive
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.
Definition: TPaveStats.cxx:503
TPaveStats::fParent
TObject * fParent
owner of this TPaveStats
Definition: TPaveStats.h:31
Option_t
const typedef char Option_t
Definition: RtypesCore.h:66
TPaveStats::GetFitFormat
virtual const char * GetFitFormat() const
Definition: TPaveStats.h:41
TVirtualPaveStats.h
TPaveStats::SetAllWith
virtual void SetAllWith(const char *, Option_t *, Double_t)
Set attribute option for all lines containing string text.
Definition: TPaveStats.h:52
TPaveStats::ReadFile
virtual void ReadFile(const char *, Option_t *, Int_t, Int_t)
Read lines of filename in this pavetext.
Definition: TPaveStats.h:49
TPaveStats::SaveStyle
virtual void SaveStyle()
Save This TPaveStats options in current style.
Definition: TPaveStats.cxx:275
TPaveStats::fStatFormat
TString fStatFormat
Printing format for stats.
Definition: TPaveStats.h:30
TVirtualPaveStats
Definition: TVirtualPaveStats.h:28
TPaveStats::SetMargin
virtual void SetMargin(Float_t)
Definition: TPaveStats.h:53
TPaveStats::fOptStat
Int_t fOptStat
option Stat
Definition: TPaveStats.h:28
TBox
Definition: TBox.h:22
Double_t
double Double_t
Definition: RtypesCore.h:59
TPaveStats::GetOptFit
Int_t GetOptFit() const
Return the fit option.
Definition: TPaveStats.cxx:257
TPaveStats::fOptFit
Int_t fOptFit
option Fit
Definition: TPaveStats.h:27
TObject
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
x2
static const double x2[5]
Definition: RooGaussKronrodIntegrator1D.cxx:364
TPaveText
Definition: TPaveText.h:21
TPaveStats::SetOptStat
void SetOptStat(Int_t stat=1)
Set the stat option.
Definition: TPaveStats.cxx:303
TPaveStats::~TPaveStats
virtual ~TPaveStats()
TPaveStats default destructor.
Definition: TPaveStats.cxx:249
int