Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Javier Galan
rest-framework
Commits
5f152739
Commit
5f152739
authored
Nov 23, 2020
by
nkx Nicholas
Browse files
TRestEventViewer: added method Embed()
parent
fac40c85
Changes
3
Hide whitespace changes
Inline
Side-by-side
source/restcore/inc/TRestEventViewer.h
View file @
5f152739
...
...
@@ -33,14 +33,16 @@ class TRestBrowser;
class
TRestEventViewer
{
protected:
TGeoManager
*
fGeometry
=
0
;
//!
TRestEvent
*
fEvent
=
0
;
//!
TRestEvent
*
fEvent
=
0
;
//!
TPad
*
fPad
=
0
;
TCanvas
*
fCanvas
=
0
;
public:
virtual
void
Initialize
();
public:
virtual
void
Embed
(
TBrowser
*
b
);
virtual
void
AddEvent
(
TRestEvent
*
ev
);
virtual
void
Plot
(
const
char
*
option
);
...
...
source/restcore/src/TRestBrowser.cxx
View file @
5f152739
...
...
@@ -82,9 +82,9 @@ void TRestBrowser::SetViewer(TRestEventViewer* eV) {
}
if
(
eV
!=
NULL
)
{
fEventViewer
=
eV
;
b
->
StartEmbedding
(
1
,
-
1
);
eV
->
Initialize
(
);
b
->
StopEmbedding
();
//
b->StartEmbedding(1, -1);
eV
->
Embed
(
b
);
//
b->StopEmbedding();
}
}
...
...
source/restcore/src/TRestEventViewer.cxx
View file @
5f152739
...
...
@@ -23,7 +23,9 @@ ClassImp(TRestEventViewer)
//______________________________________________________________________________
TRestEventViewer
::
TRestEventViewer
()
{
// TRestEventViewer default constructor
Initialize
();
//Initialize();
fPad
=
NULL
;
fCanvas
=
NULL
;
}
//______________________________________________________________________________
...
...
@@ -34,17 +36,23 @@ TRestEventViewer::~TRestEventViewer() {
void
TRestEventViewer
::
Initialize
()
{
fPad
=
NULL
;
if
(
fCanvas
!=
NULL
)
delete
fCanvas
;
fCanvas
=
new
TCanvas
(
"Event Viewer"
,
"Event Viewer"
);
fCanvas
->
SetWindowPosition
(
350
,
10
);
}
void
TRestEventViewer
::
AddEvent
(
TRestEvent
*
ev
)
{
fEvent
=
ev
;
void
TRestEventViewer
::
Embed
(
TBrowser
*
b
)
{
if
(
b
!=
NULL
)
b
->
StartEmbedding
(
1
,
-
1
);
Initialize
();
if
(
b
!=
NULL
)
b
->
StopEmbedding
();
}
void
TRestEventViewer
::
AddEvent
(
TRestEvent
*
ev
)
{
fEvent
=
ev
;
}
void
TRestEventViewer
::
Plot
(
const
char
*
option
)
{
if
(
fPad
==
NULL
)
fPad
=
new
TPad
();
if
(
fEvent
!=
NULL
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment