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
ca623061
Commit
ca623061
authored
2 months ago
by
Andre Sailer
Browse files
Options
Downloads
Patches
Plain Diff
test_EventReaders: typos, tweaks, testing EDM4hep with direct access
parent
a059934b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
DDTest/src/test_EventReaders.cc
+8
-10
8 additions, 10 deletions
DDTest/src/test_EventReaders.cc
with
8 additions
and
10 deletions
DDTest/src/test_EventReaders.cc
+
8
−
10
View file @
ca623061
...
...
@@ -64,29 +64,27 @@ int main(int argc, char** argv ){
continue
;
}
test
(
thisReader
->
currentEventNumber
()
==
0
,
readerType
+
std
::
string
(
"Initial Event Number"
)
);
thisReader
->
moveToEvent
(
1
);
test
(
thisReader
->
currentEventNumber
()
==
1
,
readerType
+
std
::
string
(
"Event Number after Skip"
)
);
if
(
!
thisReader
->
hasDirectAccess
())
{
thisReader
->
moveToEvent
(
1
);
test
(
thisReader
->
currentEventNumber
()
==
1
,
readerType
+
std
::
string
(
"Event Number after Skip"
)
);
}
std
::
vector
<
Particle
*>
particles
;
std
::
vector
<
Vertex
*>
vertices
;
dd4hep
::
sim
::
Geant4EventReader
::
EventReaderStatus
sc
=
thisReader
->
readParticles
(
3
,
vertices
,
particles
);
dd4hep
::
sim
::
Geant4EventReader
::
EventReaderStatus
sc
=
thisReader
->
readParticles
(
2
,
vertices
,
particles
);
std
::
for_each
(
particles
.
begin
(),
particles
.
end
(),
dd4hep
::
detail
::
deleteObject
<
Particle
>
);
test
(
thisReader
->
currentEventNumber
()
==
2
&&
sc
==
dd4hep
::
sim
::
Geant4EventReader
::
EVENT_READER_OK
,
readerType
+
std
::
string
(
"Event Number Read"
)
);
//Reset Reader to check what happens if moving to far in the file
//Reset Reader to check what happens if moving to
o
far in the file
if
(
not
skipEOF
)
{
thisReader
=
dd4hep
::
PluginService
::
Create
<
dd4hep
::
sim
::
Geant4EventReader
*>
(
readerType
,
std
::
move
(
inputFile
));
sc
=
thisReader
->
moveToEvent
(
1000000
);
test
(
sc
!=
dd4hep
::
sim
::
Geant4EventReader
::
EVENT_READER_OK
,
readerType
+
std
::
string
(
"EventReader False"
)
);
}
}
}
catch
(
std
::
exception
&
e
){
//} catch( ... ){
test
.
log
(
e
.
what
()
);
test
.
error
(
"exception occurred"
);
test
.
error
(
"Exception occurred:"
);
test
.
log
(
e
.
what
());
}
return
0
;
}
...
...
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