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