Garfield++ v1r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
ViewSignal.hh
Go to the documentation of this file.
1#ifndef G_VIEW_SIGNAL
2#define G_VIEW_SIGNAL
3
4#include <string>
5
6#include <TCanvas.h>
7#include <TH1D.h>
8#include <TGraph.h>
9
10namespace Garfield {
11
12class Sensor;
13
15
16 public:
17 // Constructor
18 ViewSignal();
19 // Destructor
21
22 void SetSensor(Sensor* s);
23 void SetCanvas(TCanvas* c);
24
25 void PlotSignal(const std::string label);
26 TH1D* GetHistogram() { return m_hSignal; }
27
28 void EnableDebugging() { m_debug = true; }
29 void DisableDebugging() { m_debug = false; }
30
31 private:
32 std::string m_className;
33
34 // Options
35 bool m_debug;
36
37 // Sensor
38 Sensor* m_sensor;
39
40 // Canvas
41 TCanvas* m_canvas;
42 bool m_hasExternalCanvas;
43
44 // Histogram
45 TH1D* m_hSignal;
46
47 // Threshold crossings
48 TGraph* m_gCrossings;
49};
50}
51#endif
void PlotSignal(const std::string label)
Definition: ViewSignal.cc:52
void SetSensor(Sensor *s)
Definition: ViewSignal.cc:30
void SetCanvas(TCanvas *c)
Definition: ViewSignal.cc:41