HerdSoftware  0.4.0
VPalette.h
Go to the documentation of this file.
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  * backported from GGSLeonard
12  */
13 
14 #include "TH2D.h"
15 #include "TPad.h"
16 #include "TPaletteAxis.h"
17 
18 #ifndef _VPALETTE_
19 #define _VPALETTE_
20 
21 namespace Herd {
22 class VPalette : public TPaletteAxis {
23 
24 public:
25  VPalette();
26  ~VPalette() override;
27 
28  void Rebin(Double_t xmin, Double_t xmax, Int_t nbins = _defNbins);
29  void SetLog(bool isLog = kTRUE) { m_isLog = isLog; };
30  Int_t ValueColor2(Double_t zc);
31 
32 private:
33  static const Int_t _defNbins;
34 
35  Bool_t m_isLog;
36  Int_t m_nBins;
37  Double_t m_xMin;
38  Double_t m_xMax;
39 };
40 } // namespace Herd
41 
42 #endif
Herd::VPalette::~VPalette
~VPalette() override
Herd::VPalette::VPalette
VPalette()
Definition: VPalette.cpp:22
Herd::VPalette::SetLog
void SetLog(bool isLog=kTRUE)
Definition: VPalette.h:29
Herd
CssGeoParams.h CssGeoParams class declaration.
Definition: CaloPDCalibrationAlgo.h:22
Herd::VPalette::m_xMax
Double_t m_xMax
Definition: VPalette.h:38
Herd::VPalette::m_xMin
Double_t m_xMin
Definition: VPalette.h:37
Herd::VPalette::m_isLog
Bool_t m_isLog
Definition: VPalette.h:35
Herd::VPalette::m_nBins
Int_t m_nBins
Definition: VPalette.h:36
Herd::VPalette
Definition: VPalette.h:22
Herd::VPalette::ValueColor2
Int_t ValueColor2(Double_t zc)
Definition: VPalette.cpp:34
Herd::VPalette::_defNbins
static const Int_t _defNbins
Definition: VPalette.h:33
Herd::VPalette::Rebin
void Rebin(Double_t xmin, Double_t xmax, Int_t nbins=_defNbins)
Definition: VPalette.cpp:26