File indexing completed on 2026-09-15 09:25:25
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef ROOT_THLimitsFinder
0012 #define ROOT_THLimitsFinder
0013
0014
0015
0016
0017
0018
0019
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;
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)
0049 };
0050
0051 #endif