Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-15 09:25:25

0001 // @(#)root/hist:$Id$
0002 // Author: Rene Brun   30/08/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_THLimitsFinder
0012 #define ROOT_THLimitsFinder
0013 
0014 
0015 //////////////////////////////////////////////////////////////////////////
0016 //                                                                      //
0017 // THLimitsFinder                                                       //
0018 //                                                                      //
0019 // class to find nice axis limits                                       //
0020 //                                                                      //
0021 //////////////////////////////////////////////////////////////////////////
0022 
0023 
0024 #include "TObject.h"
0025 
0026 class TH1;
0027 
0028 class THLimitsFinder : public TObject {
0029 
0030 protected:
0031    static THLimitsFinder *fgLimitsFinder;   ///<! Pointer to hist limits finder
0032 
0033 public:
0034    THLimitsFinder();
0035    ~THLimitsFinder() override;
0036    virtual Int_t      FindGoodLimits(TH1 *h, Double_t xmin, Double_t xmax);
0037    virtual Int_t      FindGoodLimitsXY(TH1 *h, Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax,
0038                                        Int_t newbinsx = 0, Int_t newbinsy = 0);
0039    virtual Int_t      FindGoodLimitsXYZ(TH1 *h, Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax,
0040                                         Int_t newbinsx = 0, Int_t newbinsy = 0, Int_t newbinsz = 0);
0041 
0042    static  void       Optimize(Double_t A1,  Double_t A2,  Int_t nold,
0043                                Double_t &BinLow, Double_t &BinHigh, Int_t &nbins, Double_t &BWID, Option_t *option="");
0044    static void        OptimizeLimits(Int_t nbins, Int_t &newbins, Double_t &xmin, Double_t &xmax, Bool_t isInteger);
0045    static THLimitsFinder *GetLimitsFinder();
0046    static  void       SetLimitsFinder(THLimitsFinder *finder);
0047 
0048    ClassDefOverride(THLimitsFinder,0)  //Class to find best axis limits
0049 };
0050 
0051 #endif