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
f59ab15d
Commit
f59ab15d
authored
2 years ago
by
Andre Sailer
Browse files
Options
Downloads
Patches
Plain Diff
DDSim.Output: simplify CHOICES config
parent
4a9f6999
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/Helper/Output.py
+7
-16
7 additions, 16 deletions
DDG4/python/DDSim/Helper/Output.py
with
7 additions
and
16 deletions
DDG4/python/DDSim/Helper/Output.py
+
7
−
16
View file @
f59ab15d
...
...
@@ -3,6 +3,9 @@
from
__future__
import
absolute_import
,
unicode_literals
from
DDSim.Helper.ConfigHelper
import
ConfigHelper
OUTPUT_CHOICES
=
(
1
,
2
,
3
,
4
,
5
,
6
,
7
,
'
VERBOSE
'
,
'
DEBUG
'
,
'
INFO
'
,
'
WARNING
'
,
'
ERROR
'
,
'
FATAL
'
,
'
ALWAYS
'
)
def
outputLevelType
(
level
):
"""
Return verbosity level as integer if possible.
...
...
@@ -36,28 +39,16 @@ class Output(ConfigHelper):
def
__init__
(
self
):
super
(
Output
,
self
).
__init__
()
self
.
_kernel_EXTRA
=
{
'
choices
'
:
(
1
,
2
,
3
,
4
,
5
,
6
,
7
,
'
VERBOSE
'
,
'
DEBUG
'
,
'
INFO
'
,
'
WARNING
'
,
'
ERROR
'
,
'
FATAL
'
,
'
ALWAYS
'
),
'
type
'
:
outputLevelType
,
}
self
.
_kernel_EXTRA
=
{
'
choices
'
:
OUTPUT_CHOICES
,
'
type
'
:
outputLevelType
}
self
.
_kernel
=
outputLevel
(
'
INFO
'
)
self
.
_part_EXTRA
=
{
'
choices
'
:
(
1
,
2
,
3
,
4
,
5
,
6
,
7
,
'
VERBOSE
'
,
'
DEBUG
'
,
'
INFO
'
,
'
WARNING
'
,
'
ERROR
'
,
'
FATAL
'
,
'
ALWAYS
'
),
'
type
'
:
outputLevelType
,
}
self
.
_part_EXTRA
=
{
'
choices
'
:
OUTPUT_CHOICES
,
'
type
'
:
outputLevelType
}
self
.
_part
=
outputLevel
(
'
INFO
'
)
self
.
_inputStage_EXTRA
=
{
'
choices
'
:
(
1
,
2
,
3
,
4
,
5
,
6
,
7
,
'
VERBOSE
'
,
'
DEBUG
'
,
'
INFO
'
,
'
WARNING
'
,
'
ERROR
'
,
'
FATAL
'
,
'
ALWAYS
'
),
'
type
'
:
outputLevelType
,
}
self
.
_inputStage_EXTRA
=
{
'
choices
'
:
OUTPUT_CHOICES
,
'
type
'
:
outputLevelType
}
self
.
_inputStage
=
outputLevel
(
'
INFO
'
)
self
.
_random_EXTRA
=
{
'
choices
'
:
(
1
,
2
,
3
,
4
,
5
,
6
,
7
,
'
VERBOSE
'
,
'
DEBUG
'
,
'
INFO
'
,
'
WARNING
'
,
'
ERROR
'
,
'
FATAL
'
,
'
ALWAYS
'
),
'
type
'
:
outputLevelType
,
}
self
.
_random_EXTRA
=
{
'
choices
'
:
OUTPUT_CHOICES
,
'
type
'
:
outputLevelType
}
self
.
_random
=
outputLevel
(
'
FATAL
'
)
@property
...
...
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