REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
TRestEventViewer.h
1 
19 #ifndef RestCore_TRestEventViewer
20 #define RestCore_TRestEventViewer
21 
22 #include <TGButton.h>
23 #include <TGLabel.h>
24 #include <TGTextEntry.h>
25 #include <TGeoManager.h>
26 #include <TObject.h>
27 
28 #include <iostream>
29 
30 #include "TRestEvent.h"
31 
32 class TRestBrowser;
34  protected:
35  TGeoManager* fGeometry = nullptr;
36  TRestEvent* fEvent = nullptr;
37 
38  Double_t fGeomScale = 0.1;
39 
40  TPad* fPad = nullptr;
41  TCanvas* fCanvas = nullptr;
42 
43  virtual void Initialize();
44 
45  public:
46  virtual void Embed(TBrowser* b);
47 
48  virtual void AddEvent(TRestEvent* ev);
49 
50  virtual void Plot(const char* option);
51 
52  virtual void DeleteCurrentEvent();
53  // Setters
54  virtual void SetGeometry(TGeoManager* geo) { fGeometry = geo; }
55  void SetEvent(TRestEvent* event) { fEvent = event; }
56  // Getters
57  TGeoManager* GetGeometry() { return fGeometry; }
58  TRestEvent* GetEvent() { return fEvent; }
59 
60  void SetGeomScale(Double_t scale) { fGeomScale = scale; }
61  Double_t GetGeomScale() const { return fGeomScale; }
62 
63  // Constructor
65  // Destructor
66  virtual ~TRestEventViewer();
67 
68  ClassDef(TRestEventViewer, 1); // REST event superclass
69 };
70 #endif
Event browser for different input file.
Definition: TRestBrowser.h:24
A base class for any REST event.
Definition: TRestEvent.h:38