Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DD4hep
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cepc
externals
mirroring
DD4hep
Commits
85d5b1ae
Commit
85d5b1ae
authored
10 years ago
by
Frank Gaede
Browse files
Options
Downloads
Patches
Plain Diff
- fixed logic for displaying multiple events...
parent
6ef494a4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
UtilityApps/src/next_event_lcio.cpp
+17
-18
17 additions, 18 deletions
UtilityApps/src/next_event_lcio.cpp
with
17 additions
and
18 deletions
UtilityApps/src/next_event_lcio.cpp
+
17
−
18
View file @
85d5b1ae
...
@@ -42,40 +42,38 @@ public:
...
@@ -42,40 +42,38 @@ public:
void
next_event
(){
void
next_event
(){
static
int
count
=
1
;
static
int
count
=
1
;
static
LCReader
*
rdr
=
0
;
static
LCReader
*
rdr
=
0
;
std
::
string
lcioFileName
=
"teve_infile.slcio"
;
std
::
string
lcioFileName
=
"teve_infile.slcio"
;
std
::
cout
<<
" next_event_lcio called ..."
<<
std
::
endl
;
std
::
cout
<<
" next_event_lcio called ..."
<<
std
::
endl
;
if
(
rdr
==
0
&&
count
==
1
){
if
(
count
==
1
){
rdr
=
LCFactory
::
getInstance
()
->
createLCReader
()
;
rdr
=
LCFactory
::
getInstance
()
->
createLCReader
()
;
try
{
try
{
rdr
->
open
(
lcioFileName
)
;
rdr
->
open
(
lcioFileName
)
;
}
catch
(
lcio
::
IOException
&
e
)
{
}
catch
(
lcio
::
IOException
&
e
)
{
std
::
cout
<<
" ------------------------------------------------------------------------------------------------ "
<<
std
::
endl
std
::
cout
<<
" ------------------------------------------------------------------------------------------------ "
<<
std
::
endl
<<
"*** file "
<<
lcioFileName
<<
" does not exist - can't read LCIO events ! "
<<
std
::
endl
<<
"*** file "
<<
lcioFileName
<<
" does not exist - can't read LCIO events ! "
<<
std
::
endl
<<
" will display detector geometry only. Link LCIO file to "
<<
lcioFileName
<<
" to display events ! "
<<
std
::
endl
<<
" will display detector geometry only. Link LCIO file to "
<<
lcioFileName
<<
" to display events ! "
<<
std
::
endl
<<
" -------------------------------------------------------------------------------------------------"
<<
" -------------------------------------------------------------------------------------------------"
<<
std
::
endl
;
<<
std
::
endl
;
++
count
;
return
;
return
;
}
}
}
else
{
// nothing to do as inoutfile does not exist:
return
;
}
}
if
(
rdr
==
0
)
// nothing to do as inputfile does not exist:
return
;
TEveElementList
*
tevent
=
(
TEveElementList
*
)
gEve
->
GetCurrentEvent
()
;
TEveElementList
*
tevent
=
(
TEveElementList
*
)
gEve
->
GetCurrentEvent
()
;
if
(
tevent
)
if
(
tevent
)
...
@@ -121,7 +119,8 @@ void next_event(){
...
@@ -121,7 +119,8 @@ void next_event(){
gEve
->
Redraw3D
();
gEve
->
Redraw3D
();
count
+=
3
;
++
count
;
//count += 3 ;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment