Logo ROOT   6.08/07
Reference Guide
THLimitsFinder.h
Go to the documentation of this file.
1 // @(#)root/hist:$Id$
2 // Author: Rene Brun 30/08/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_THLimitsFinder
12 #define ROOT_THLimitsFinder
13 
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // THLimitsFinder //
18 // //
19 // class to find nice axis limits //
20 // //
21 //////////////////////////////////////////////////////////////////////////
22 
23 
24 #ifndef ROOT_TObject
25 #include "TObject.h"
26 #endif
27 
28 class TH1;
29 
30 class THLimitsFinder : public TObject {
31 
32 protected:
33  static THLimitsFinder *fgLimitsFinder; //!Pointer to hist limits finder
34 
35 public:
37  virtual ~THLimitsFinder();
41 
42  static void Optimize(Double_t A1, Double_t A2, Int_t nold
43  ,Double_t &BinLow, Double_t &BinHigh, Int_t &nbins, Double_t &BWID, Option_t *option="");
44  static void OptimizeLimits(Int_t nbins, Int_t &newbins, Double_t &xmin, Double_t &xmax, Bool_t isInteger);
46  static void SetLimitsFinder(THLimitsFinder *finder);
47 
48  ClassDef(THLimitsFinder,0) //Class to find best axis limits
49 };
50 
51 #endif
float xmin
Definition: THbookFile.cxx:93
virtual ~THLimitsFinder()
const char Option_t
Definition: RtypesCore.h:62
float ymin
Definition: THbookFile.cxx:93
Class to find nice axis limits.
TH1 * h
Definition: legend2.C:5
static void Optimize(Double_t A1, Double_t A2, Int_t nold, Double_t &BinLow, Double_t &BinHigh, Int_t &nbins, Double_t &BWID, Option_t *option="")
static function to compute reasonable axis limits
static THLimitsFinder * GetLimitsFinder()
Return pointer to the current finder.
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
int nbins[3]
virtual Int_t FindGoodLimits(TH1 *h, Double_t xmin, Double_t xmax)
compute the best axis limits for the X axis.
static void OptimizeLimits(Int_t nbins, Int_t &newbins, Double_t &xmin, Double_t &xmax, Bool_t isInteger)
Optimize axis limits.
#define ClassDef(name, id)
Definition: Rtypes.h:254
static void SetLimitsFinder(THLimitsFinder *finder)
This static function can be used to specify a finder derived from THLimitsFinder. ...
float ymax
Definition: THbookFile.cxx:93
float xmax
Definition: THbookFile.cxx:93
THLimitsFinder()
Pointer to hist limits finder.
double Double_t
Definition: RtypesCore.h:55
The TH1 histogram class.
Definition: TH1.h:80
Mother of all ROOT objects.
Definition: TObject.h:37
static THLimitsFinder * fgLimitsFinder