19 #include "TRestEventViewer.h"
21 #include "TRestBrowser.h"
27 TRestEventViewer::TRestEventViewer() {
34 TRestEventViewer::~TRestEventViewer() {
39 void TRestEventViewer::Initialize() {
42 if (fCanvas !=
nullptr)
delete fCanvas;
43 fCanvas =
new TCanvas(
"Event Viewer",
"Event Viewer");
45 fCanvas->SetWindowPosition(350, 10);
48 void TRestEventViewer::Embed(TBrowser* b) {
49 if (b !=
nullptr) b->StartEmbedding(1, -1);
53 if (b !=
nullptr) b->StopEmbedding();
56 void TRestEventViewer::AddEvent(
TRestEvent* ev) { fEvent = ev; }
58 void TRestEventViewer::Plot(
const char* option) {
59 if (fPad ==
nullptr) fPad =
new TPad();
60 if (fEvent !=
nullptr) {
61 fPad = fEvent->DrawEvent(option);
74 void TRestEventViewer::DeleteCurrentEvent() {
delete fEvent; }
A base class for any REST event.