TEventDisplay.hxx
Go to the documentation of this file.
1 #ifndef TEventDisplay_hxx_seen
2 #define TEventDisplay_hxx_seen
3 
4 namespace EDep {
5  class TEventDisplay;
6  class TGUIManager;
7  class TEventChangeManager;
8  class TPlotDigitsHits;
9  class TPlotTimeCharge;
10 }
11 
12 /// A singleton class for an event display based on EVE.
14 public:
15 
16  /// Get a pointer to the singleton instance of the event display. This
17  /// creates the event display the first time it is called.
18  static TEventDisplay& Get(void);
19 
20  /// Deconstruct the event display.
21  virtual ~TEventDisplay();
22 
23  /// Return a reference to the gui manager.
25 
26  /// Return a reference to the event change manager.
28 
29  /// Get a color from the palette using a linear value scale.
30  int LinearColor(double val, double minVal, double maxVal);
31 
32  /// Get a color from the palette using a logarithmic value scale.
33  int LogColor(double val, double minVal, double maxVal, double magScale=5.0);
34 
35  /// Convert an charge into a crude energy.
36  double CrudeEnergy(double charge) {return fEnergyPerCharge*charge;}
37 
38 private:
39  // Prevent direct construction.
40  TEventDisplay();
41 
42  // Actually initialize the event display
43  void Init();
44 
45  // Hold the static instance of the event display.
47 
48  // The gui manager.
50 
51  // The event change manager.
53 
54  // The digit drawing class. This is connected directly to the buttons.
55  TPlotDigitsHits* fPlotDigitsHits;
56 
57  // The hit time and charge drawing class. This is connected directly to
58  // the buttons.
59  TPlotTimeCharge* fPlotTimeCharge;
60 
61  // The base color index of the palette to use.
63 
64  // The number of colors in the palette.
66 
67  // The crude energy per charge conversion.
69 
70 };
71 
72 #endif
EDep::TGUIManager & GUI()
Return a reference to the gui manager.
TEventChangeManager * fEventChangeManager
virtual ~TEventDisplay()
Deconstruct the event display.
EDep::TEventChangeManager & EventChange()
Return a reference to the event change manager.
TGUIManager * fGUIManager
static TEventDisplay & Get(void)
int LinearColor(double val, double minVal, double maxVal)
Get a color from the palette using a linear value scale.
static EDep::TEventDisplay * fEventDisplay
TPlotDigitsHits * fPlotDigitsHits
int LogColor(double val, double minVal, double maxVal, double magScale=5.0)
Get a color from the palette using a logarithmic value scale.
double CrudeEnergy(double charge)
Convert an charge into a crude energy.
TPlotTimeCharge * fPlotTimeCharge
A singleton class for an event display based on EVE.