Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:12:19

0001 // @(#)root/graf:$Id$
0002 // Author: Rene Brun   15/03/99
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 #ifndef ROOT_TPaveStats
0012 #define ROOT_TPaveStats
0013 
0014 
0015 #include "TPaveText.h"
0016 #include "TVirtualPaveStats.h"
0017 
0018 class TPaveStats : public TPaveText, public TVirtualPaveStats {
0019 
0020 protected:
0021    Int_t         fOptFit;            ///< option Fit
0022    Int_t         fOptStat;           ///< option Stat
0023    TString       fFitFormat;         ///< Printing format for fit parameters
0024    TString       fStatFormat;        ///< Printing format for stats
0025    TObject      *fParent{nullptr};  ///< owner of this TPaveStats
0026 
0027 public:
0028    TPaveStats();
0029    TPaveStats(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2, Option_t *option="br");
0030    ~TPaveStats() override;
0031    TBox            *AddBox(Double_t , Double_t , Double_t , Double_t) override {return nullptr;}
0032    TLine           *AddLine(Double_t , Double_t , Double_t, Double_t) override {return nullptr;}
0033    void             DeleteText() override {}
0034    void             EditText() override {}
0035    virtual const char  *GetFitFormat()  const {return fFitFormat.Data();}
0036    virtual const char  *GetStatFormat() const {return fStatFormat.Data();}
0037    Int_t            GetOptFit() const;
0038    Int_t            GetOptStat() const;
0039    TObject         *GetParent() const override { return fParent; }
0040    void             Paint(Option_t *option="") override;
0041    void             InsertText(const char *) override { }
0042    void             InsertLine() override { }
0043    void             ReadFile(const char *, Option_t *, Int_t, Int_t) override {}
0044    void             SavePrimitive(std::ostream &out, Option_t *option = "") override;
0045    virtual void     SaveStyle(); // *MENU*
0046    void             SetAllWith(const char *, Option_t *, Double_t) override {}
0047    void             SetMargin(Float_t) override { }
0048    virtual void     SetFitFormat(const char *format="5.4g");    // *MENU*
0049    virtual void     SetStatFormat(const char *format="6.4g");   // *MENU*
0050    void             SetOptFit(Int_t fit=1);                     // *MENU*
0051    void             SetOptStat(Int_t stat=1);                   // *MENU*
0052    void             SetParent(TObject*obj) override { fParent = obj; }
0053    void             UseCurrentStyle() override;
0054 
0055    ClassDefOverride(TPaveStats,5)  //A special TPaveText to draw histogram statistics.
0056 };
0057 
0058 #endif