From 1c1cc16c033bb57fcd36a4a8a3903259c4b3b91c Mon Sep 17 00:00:00 2001 From: Markus Frank <Markus.Frank@cern.ch> Date: Thu, 5 Apr 2018 23:27:27 +0200 Subject: [PATCH] Fix dd4hep units as discussed in the meeting. If I only could get it right... --- DDCore/python/dd4hep.py | 3 +-- DDCore/python/dd4hep_base.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/DDCore/python/dd4hep.py b/DDCore/python/dd4hep.py index e8fd67cc7..d2626136a 100644 --- a/DDCore/python/dd4hep.py +++ b/DDCore/python/dd4hep.py @@ -9,5 +9,4 @@ # #========================================================================== from dd4hep_base import * -self = __import__(__name__) -import_units(self) +import_units(__import__(__name__)) diff --git a/DDCore/python/dd4hep_base.py b/DDCore/python/dd4hep_base.py index 995610fb0..5a82370b6 100644 --- a/DDCore/python/dd4hep_base.py +++ b/DDCore/python/dd4hep_base.py @@ -241,7 +241,7 @@ import_geometry() # try: from ROOT import TGeoUnit as TGeoUnits - def import_units(ns): + def import_units(ns=None): def import_unit(ns,nam): setattr(ns,nam,getattr(TGeoUnits,nam)) items = dir(TGeoUnits) -- GitLab