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
b8bc4ae9
Commit
b8bc4ae9
authored
2 years ago
by
Andre Sailer
Browse files
Options
Downloads
Patches
Plain Diff
DDSim: add traceback output for ddsim config ERRORS when DEBUG or VERBOSE
parent
b211790e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
DDG4/python/DDSim/DD4hepSimulation.py
+8
-2
8 additions, 2 deletions
DDG4/python/DDSim/DD4hepSimulation.py
with
8 additions
and
2 deletions
DDG4/python/DDSim/DD4hepSimulation.py
+
8
−
2
View file @
b8bc4ae9
...
@@ -7,9 +7,10 @@ Based on M. Frank and F. Gaede runSim.py
...
@@ -7,9 +7,10 @@ Based on M. Frank and F. Gaede runSim.py
"""
"""
from
__future__
import
absolute_import
,
unicode_literals
,
division
,
print_function
from
__future__
import
absolute_import
,
unicode_literals
,
division
,
print_function
__RCSID__
=
"
$Id$
"
import
sys
import
os
import
os
import
sys
import
traceback
from
DDSim.Helper.Meta
import
Meta
from
DDSim.Helper.Meta
import
Meta
from
DDSim.Helper.LCIO
import
LCIO
from
DDSim.Helper.LCIO
import
LCIO
from
DDSim.Helper.HepMC3
import
HepMC3
from
DDSim.Helper.HepMC3
import
HepMC3
...
@@ -250,6 +251,9 @@ class DD4hepSimulation(object):
...
@@ -250,6 +251,9 @@ class DD4hepSimulation(object):
self
.
_consistencyChecks
()
self
.
_consistencyChecks
()
if
self
.
printLevel
<=
2
:
# VERBOSE or DEBUG
logger
.
setLevel
(
logging
.
DEBUG
)
# self.__treatUnknownArgs( parsed, unknown )
# self.__treatUnknownArgs( parsed, unknown )
self
.
__parseAllHelper
(
parsed
)
self
.
__parseAllHelper
(
parsed
)
if
self
.
_errorMessages
and
not
(
self
.
_dumpParameter
or
self
.
_dumpSteeringFile
):
if
self
.
_errorMessages
and
not
(
self
.
_dumpParameter
or
self
.
_dumpSteeringFile
):
...
@@ -570,6 +574,8 @@ class DD4hepSimulation(object):
...
@@ -570,6 +574,8 @@ class DD4hepSimulation(object):
obj
.
setOption
(
var
,
parsedDict
[
key
])
obj
.
setOption
(
var
,
parsedDict
[
key
])
except
RuntimeError
as
e
:
except
RuntimeError
as
e
:
self
.
_errorMessages
.
append
(
"
ERROR: %s
"
%
e
)
self
.
_errorMessages
.
append
(
"
ERROR: %s
"
%
e
)
if
logger
.
level
<=
logging
.
DEBUG
:
self
.
_errorMessages
.
append
(
traceback
.
format_exc
())
def
__checkOutputLevel
(
self
,
level
):
def
__checkOutputLevel
(
self
,
level
):
"""
return outputlevel as int so we don
'
t have to import anything for faster startup
"""
"""
return outputlevel as int so we don
'
t have to import anything for faster startup
"""
...
...
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