JG ROOT Tools libraries  version 5.0 - august 2014
RGHistoLimits.hh
Go to the documentation of this file.
1 //======================================================================
2 /*! \file RGHistoLimits.hh
3  *
4  * Include file for class RGHistoLimits
5  */
6 //======================================================================
7 
8 #ifndef RG_HISTO_LIMITS_HH
9 #define RG_HISTO_LIMITS_HH
10 
11 #include <TH1.h>
12 #include "RBaseFunctions.hh"
13 
14 //======================================================================
15 /*! class RGHistoLimits
16  *
17  * This class defines axis information for histogram display.
18  */
19 
21 {
22  //------------------------------------------------------------
23  /*! \object_doc{RGHistoLimits} */
25  //------------------------------------------------------------
26 
27  protected:
28 
29  Int_t dimension; ///< Histogram dimension
30 
31  // limites et autorisations d'échelle log
32  Double_t lim_x_min; ///< Axis lower limit
33  Double_t lim_x_max; ///< Axis upper limit
34  Double_t lim_y_min; ///< Axis lower limit
35  Double_t lim_y_max; ///< Axis upper limit
36  Double_t lim_z_min; ///< Axis lower limit
37  Double_t lim_z_max; ///< Axis upper limit
38 
39  Double_t log_x_min; ///< Lower limit for log scale
40  Double_t log_y_min; ///< Lower limit for log scale
41  Double_t log_z_min; ///< Lower limit for log scale
42 
43  bool allow_x_log; ///< Test if log scale allowed
44  bool allow_y_log; ///< Test if log scale allowed
45  bool allow_z_log; ///< Test if log scale allowed
46 
47  // bornes effectives et état d'échelle log
48  Double_t x_min; ///< Current display lower bound
49  Double_t x_max; ///< Current display upper bound
50  Double_t y_min; ///< Current display lower bound
51  Double_t y_max; ///< Current display upper bound
52  Double_t z_min; ///< Current display lower bound
53  Double_t z_max; ///< Current display upper bound
54 
55  bool x_log; ///< Log scale status
56  bool y_log; ///< Log scale status
57  bool z_log; ///< Log scale status
58 
59  //------------------------------------------------------------
60  // Constructors / affectation / destructor
61  public:
62  RGHistoLimits ( TH1 * hptr = NULL );
63  RGHistoLimits ( const RGHistoLimits &original );
64 
65  RGHistoLimits & operator = ( const RGHistoLimits &original );
66 
67  virtual void Affect ( const RGHistoLimits &original );
68 
69  virtual ~RGHistoLimits();
70 
71  //------------------------------------------------------------
72  // Functions
73  public:
74 
75  virtual void Reset ( );
76  virtual Int_t SetHisto ( TH1 * hptr = NULL, const bool reset = true );
77 
78  virtual bool IsDataSet ( ) const; // inline
79 
80  protected:
81  virtual void Set1DHisto ( const TH1 * hptr );
82  virtual void Set2DHisto ( const TH1 * hptr );
83  virtual void Set3DHisto ( const TH1 * hptr );
84 
85  public:
86 
87  virtual bool SetXLog ( const Bool_t b = kTRUE );
88  virtual bool SetYLog ( const Bool_t b = kTRUE );
89  virtual bool SetZLog ( const Bool_t b = kTRUE );
90 
91  virtual void SetXFull ( );
92  virtual void SetYFull ( );
93  virtual void SetZFull ( );
94 
95  virtual void Unzoom ( ); // inline
96 
97  //------------------------------------------------------------
98  /*! For ROOT dictionary.*/
100 } ;
101 
102 //----------------------------------------------------------------------
103 // Inline functions
104 #include "icc/RGHistoLimits.icc"
105 
106 //======================================================================
107 #endif
108 
virtual bool IsDataSet() const
Definition: RGHistoLimits.icc:9
Double_t log_y_min
Lower limit for log scale.
Definition: RGHistoLimits.hh:40
bool x_log
Log scale status.
Definition: RGHistoLimits.hh:55
Double_t lim_z_max
Axis upper limit.
Definition: RGHistoLimits.hh:37
Double_t lim_y_max
Axis upper limit.
Definition: RGHistoLimits.hh:35
virtual Int_t SetHisto(TH1 *hptr=NULL, const bool reset=true)
Definition: RGHistoLimits.cpp:138
virtual void Set1DHisto(const TH1 *hptr)
Definition: RGHistoLimits.cpp:193
virtual void Affect(const RGHistoLimits &original)
Definition: RGHistoLimits.cpp:53
Double_t x_max
Current display upper bound.
Definition: RGHistoLimits.hh:49
virtual void SetZFull()
Definition: RGHistoLimits.cpp:757
bool y_log
Log scale status.
Definition: RGHistoLimits.hh:56
Double_t z_min
Current display lower bound.
Definition: RGHistoLimits.hh:52
RGHistoLimits(TH1 *hptr=NULL)
Definition: RGHistoLimits.cpp:17
RGHistoLimits & operator=(const RGHistoLimits &original)
Definition: RGHistoLimits.cpp:40
Double_t x_min
Current display lower bound.
Definition: RGHistoLimits.hh:48
Double_t y_max
Current display upper bound.
Definition: RGHistoLimits.hh:51
Double_t y_min
Current display lower bound.
Definition: RGHistoLimits.hh:50
virtual bool SetXLog(const Bool_t b=kTRUE)
Definition: RGHistoLimits.cpp:619
Double_t z_max
Current display upper bound.
Definition: RGHistoLimits.hh:53
virtual void SetXFull()
Definition: RGHistoLimits.cpp:723
GObject(RGHistoLimits)
Double_t lim_y_min
Axis lower limit.
Definition: RGHistoLimits.hh:34
virtual ~RGHistoLimits()
Definition: RGHistoLimits.cpp:86
Int_t dimension
Histogram dimension.
Definition: RGHistoLimits.hh:29
virtual void Unzoom()
Definition: RGHistoLimits.icc:13
virtual bool SetYLog(const Bool_t b=kTRUE)
Definition: RGHistoLimits.cpp:654
Double_t lim_z_min
Axis lower limit.
Definition: RGHistoLimits.hh:36
virtual bool SetZLog(const Bool_t b=kTRUE)
Definition: RGHistoLimits.cpp:689
Double_t lim_x_min
Axis lower limit.
Definition: RGHistoLimits.hh:32
ClassDef(RGHistoLimits, 0)
Double_t log_x_min
Lower limit for log scale.
Definition: RGHistoLimits.hh:39
bool allow_z_log
Test if log scale allowed.
Definition: RGHistoLimits.hh:45
virtual void Set3DHisto(const TH1 *hptr)
Definition: RGHistoLimits.cpp:487
virtual void SetYFull()
Definition: RGHistoLimits.cpp:736
virtual void Set2DHisto(const TH1 *hptr)
Definition: RGHistoLimits.cpp:319
Double_t log_z_min
Lower limit for log scale.
Definition: RGHistoLimits.hh:41
bool z_log
Log scale status.
Definition: RGHistoLimits.hh:57
bool allow_y_log
Test if log scale allowed.
Definition: RGHistoLimits.hh:44
Double_t lim_x_max
Axis upper limit.
Definition: RGHistoLimits.hh:33
virtual void Reset()
Definition: RGHistoLimits.cpp:95
Definition: RGHistoLimits.hh:20
bool allow_x_log
Test if log scale allowed.
Definition: RGHistoLimits.hh:43