Skip to content
Snippets Groups Projects
Commit 44402604 authored by Markus Frank's avatar Markus Frank Committed by MarkusFrankATcernch
Browse files

Fix python style errors

parent 8c99b07c
No related branches found
No related tags found
No related merge requests found
......@@ -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))
......@@ -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')
......@@ -11,6 +11,7 @@
from __future__ import absolute_import
from g4units import ns
def run():
import DigiTest
digi = DigiTest.Test(geometry=None)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment