GGS(GenericGEANT4Simulation)Software  2.7.0
 All Data Structures Namespaces Files Functions Variables Typedefs Macros
VPalette.h
1 /*
2  * VPalette.h
3  *
4  * Created on: 16 Mar 2017
5  * Author: Valerio Formato
6  */
7 
8 /*
9  * A simple color-palette class. Why ROOT people must always complicate things?
10  * log-scale was not tested so far
11  */
12 
13 #include "TH2D.h"
14 #include "TPad.h"
15 #include "TPaletteAxis.h"
16 
17 #ifndef _VPALETTE_
18 #define _VPALETTE_
19 
20 class VPalette : public TPaletteAxis {
21 
22 public:
23  VPalette();
24  virtual ~VPalette();
25 
26  void Rebin(Double_t xmin, Double_t xmax, Int_t nbins = _defNbins);
27  void SetLog(bool isLog = kTRUE) { _isLog = isLog; };
28  Int_t GetValueColor2(Double_t zc);
29 
30 private:
31  static const Int_t _defNbins;
32 
33  Bool_t _isLog;
34  Int_t _nBins;
35  Double_t _xMin;
36  Double_t _xMax;
37 };
38 
39 #endif