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
39c7b933
Commit
39c7b933
authored
10 years ago
by
Markus Frank
Browse files
Options
Downloads
Patches
Plain Diff
Improve output
parent
1200d4fb
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
DDG4/scripts/dumpDDG4.C
+14
-0
14 additions, 0 deletions
DDG4/scripts/dumpDDG4.C
with
14 additions
and
0 deletions
DDG4/scripts/dumpDDG4.C
+
14
−
0
View file @
39c7b933
...
...
@@ -17,6 +17,7 @@
#include
<vector>
#include
<cstdio>
#include
<memory>
#include
<cerrno>
#include
"TFile.h"
#include
"TTree.h"
...
...
@@ -35,6 +36,15 @@ namespace {
static
const
char
*
line
=
"+-------------------------------------------------------------+"
;
static
bool
have_geometry
=
false
;
int
usage
()
{
printf
(
"
\n
dumpDDG4 -opt [-opt]
\n
"
" -compact <compact-geometry> Supply geometry file to check hits with volume manager.
\n
"
" -input <root-file> File generated with DDG4
\n
"
" -event <event-number> Specify event to be dumped. Default: ALL.
\n
"
"
\n\n
"
);
return
EINVAL
;
}
int
printHits
(
const
string
&
container
,
vector
<
Geant4Tracker
::
Hit
*>*
hits
)
{
typedef
vector
<
Geant4Tracker
::
Hit
*>
_H
;
if
(
!
hits
)
{
...
...
@@ -155,6 +165,7 @@ int dumpDDG4(const char* fname, int event_num) {
TFile
*
data
=
TFile
::
Open
(
fname
);
if
(
!
data
||
data
->
IsZombie
()
)
{
printf
(
"+ File seems to not exist. Exiting
\n
"
);
usage
();
return
-
1
;
}
TTree
*
tree
=
(
TTree
*
)
data
->
Get
(
"EVENT"
);
...
...
@@ -220,6 +231,9 @@ int main(int argc, char** argv) { // Main program if
event_num
=
::
atol
(
argv
[
++
i
]);
}
}
if
(
!
fname
)
{
return
usage
();
}
return
dumpDDG4
(
fname
,
event_num
);
}
#endif
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