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
44402604
"git@code.ihep.ac.cn:yudian2002/cepcsw-ote-development.git" did not exist on "c20de884cbe7b3941aefca5c9e6377b51de7cdb0"
Commit
44402604
authored
2 years ago
by
Markus Frank
Committed by
MarkusFrankATcernch
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix python style errors
parent
8c99b07c
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
DDDigi/python/dddigi.py
+9
-6
9 additions, 6 deletions
DDDigi/python/dddigi.py
examples/DDDigi/scripts/DigiTest.py
+1
-1
1 addition, 1 deletion
examples/DDDigi/scripts/DigiTest.py
examples/DDDigi/scripts/TestSpillover.py
+1
-0
1 addition, 0 deletions
examples/DDDigi/scripts/TestSpillover.py
with
11 additions
and
7 deletions
DDDigi/python/dddigi.py
+
9
−
6
View file @
44402604
...
...
@@ -10,15 +10,18 @@
# ==========================================================================
from
__future__
import
absolute_import
,
unicode_literals
from
dd4hep_base
import
*
# noqa: F403
import
dd4hep_base
logger
=
dd4hep_base
.
dd4hep_logger
(
'
dddigi
'
)
logger
=
None
def
loadDDDigi
():
global
logger
import
ROOT
import
dd4hep_base
from
ROOT
import
gSystem
logger
=
dd4hep_base
.
dd4hep_logger
(
'
dddigi
'
)
# Try to load libglapi to avoid issues with TLS Static
# Turn off all errors from ROOT about the library missing
if
(
'
libglapi
'
not
in
gSystem
.
GetLibraries
()):
...
...
@@ -80,10 +83,10 @@ Detector.globalVal = _constant
# ---------------------------------------------------------------------------
"""
Import the Detector constants into the dddigi namespace
"""
def
importConstants
(
description
,
namespace
=
None
,
debug
=
False
):
"""
Import the Detector constants into the dddigi namespace
"""
ns
=
current
if
namespace
is
not
None
and
not
hasattr
(
current
,
namespace
):
import
imp
...
...
@@ -282,4 +285,4 @@ try:
import
digitize
Digitize
=
digitize
.
Digitize
except
Exception
as
X
:
pass
logger
.
error
(
'
Failed to import digitize:
'
+
str
(
X
))
This diff is collapsed.
Click to expand it.
examples/DDDigi/scripts/DigiTest.py
+
1
−
1
View file @
44402604
...
...
@@ -91,5 +91,5 @@ class Test(dddigi.Digitize):
evt_done
=
self
.
run
(
num_events
=
num_events
,
num_threads
=
num_threads
,
parallel
=
parallel
)
if
evt_done
==
num_events
:
result
=
"
PASSED
"
self
.
always
(
'
%s Test finished after processing %d events.
'
%
(
result
,
evt_done
,))
self
.
always
(
'
%s Test finished after processing %d events.
'
%
(
result
,
evt_done
,))
self
.
always
(
'
Test done. Exiting
'
)
This diff is collapsed.
Click to expand it.
examples/DDDigi/scripts/TestSpillover.py
+
1
−
0
View file @
44402604
...
...
@@ -11,6 +11,7 @@
from
__future__
import
absolute_import
from
g4units
import
ns
def
run
():
import
DigiTest
digi
=
DigiTest
.
Test
(
geometry
=
None
)
...
...
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