Garfield++ 3.0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
PlottingEngine.hh
Go to the documentation of this file.
1#ifndef G_PLOTTING_ENGINE_H
2#define G_PLOTTING_ENGINE_H
3
4namespace Garfield {
5
6/// Abstract base class for plotting engines.
7
9 public:
10 /// Default constructor
11 PlottingEngine() = delete;
12 /// Constructor
13 PlottingEngine(const std::string& name) : m_className(name) {}
14 /// Destructor
15 virtual ~PlottingEngine() {}
16
17 /// Use serif font.
18 void SetSerif() { m_serif = true; }
19 /// Use sans-serif font.
20 void SetSansSerif() { m_serif = false; }
21
22 // Set/get colors.
23 void SetLineColor1(const std::string& col) { m_colorLine1 = col; }
24 void SetLineColor2(const std::string& col) { m_colorLine2 = col; }
25 void SetElectronColor(const std::string& col) { m_colorElectron = col; }
26 void SetHoleColor(const std::string& col) { m_colorHole = col; }
27 void SetIonColor(const std::string& col) { m_colorIon = col; }
28 void SetPhotonColor(const std::string& col) { m_colorPhoton = col; }
29 void SetChargedParticleColor(const std::string& col) {
31 }
32
33 std::string GetLineColor1() const { return m_colorLine1; }
34 std::string GetLineColor2() const { return m_colorLine2; }
35 std::string GetElectronColor() const { return m_colorElectron; }
36 std::string GetHoleColor() const { return m_colorHole; }
37 std::string GetIonColor() const { return m_colorIon; }
38 std::string GetPhotonColor() const { return m_colorPhoton; }
39 std::string GetChargedParticleColor() const { return m_colorChargedParticle; }
40
41 /// Switch debugging messages on/off.
42 void EnableDebugging(const bool on = true) { m_debug = on; }
43
44 protected:
45 std::string m_className = "PlottingEngine";
46
47 bool m_serif = false;
48
49 std::string m_colorLine1 = "dark-blue";
50 std::string m_colorLine2 = "olive";
51 std::string m_colorElectron = "orange";
52 std::string m_colorHole = "red";
53 std::string m_colorIon = "dark-red";
54 std::string m_colorPhoton = "blue";
55 std::string m_colorChargedParticle = "dark-green";
56
57 bool m_debug = false;
58};
59}
60
61#endif
Abstract base class for plotting engines.
std::string GetIonColor() const
std::string GetLineColor2() const
std::string m_colorChargedParticle
void EnableDebugging(const bool on=true)
Switch debugging messages on/off.
void SetElectronColor(const std::string &col)
PlottingEngine()=delete
Default constructor.
void SetSerif()
Use serif font.
void SetPhotonColor(const std::string &col)
void SetChargedParticleColor(const std::string &col)
void SetLineColor2(const std::string &col)
void SetIonColor(const std::string &col)
std::string GetPhotonColor() const
void SetHoleColor(const std::string &col)
std::string GetElectronColor() const
std::string GetHoleColor() const
std::string GetLineColor1() const
void SetSansSerif()
Use sans-serif font.
virtual ~PlottingEngine()
Destructor.
PlottingEngine(const std::string &name)
Constructor.
std::string GetChargedParticleColor() const
void SetLineColor1(const std::string &col)