00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef ROOT_THLimitsFinder
00012 #define ROOT_THLimitsFinder
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef ROOT_TObject
00025 #include "TObject.h"
00026 #endif
00027
00028 class TH1;
00029
00030 class THLimitsFinder : public TObject {
00031
00032 protected:
00033 static THLimitsFinder *fgLimitsFinder;
00034
00035 public:
00036 THLimitsFinder();
00037 virtual ~THLimitsFinder();
00038 virtual Int_t FindGoodLimits(TH1 *h, Double_t xmin, Double_t xmax);
00039 virtual Int_t FindGoodLimits(TH1 *h, Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax);
00040 virtual Int_t FindGoodLimits(TH1 *h, Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax);
00041
00042 static void Optimize(Double_t A1, Double_t A2, Int_t nold
00043 ,Double_t &BinLow, Double_t &BinHigh, Int_t &nbins, Double_t &BWID, Option_t *option="");
00044 static void OptimizeLimits(Int_t nbins, Int_t &newbins, Double_t &xmin, Double_t &xmax, Bool_t isInteger);
00045 static THLimitsFinder *GetLimitsFinder();
00046 static void SetLimitsFinder(THLimitsFinder *finder);
00047
00048 ClassDef(THLimitsFinder,0)
00049 };
00050
00051 #endif