From 6c2e26003569f3f029fdc9c2d3534808f23d4e2c Mon Sep 17 00:00:00 2001 From: Marko Petric <marko.petric@cern.ch> Date: Thu, 18 Jul 2019 14:21:15 +0200 Subject: [PATCH] Add absolute import to all files --- DDCore/python/dd4hep.py | 1 + DDCore/python/dd4hepFactories.py | 1 + DDCore/python/dd4hep_base.py | 1 + DDCore/python/lcdd.py | 3 ++- DDDigi/python/DDDigi.py | 1 + DDG4/examples/CLICSidSimuLCIO.py | 1 + DDG4/examples/CLICSidSimuMarkus.py | 1 + DDG4/examples/SiDSim.py | 1 + DDG4/examples/SiDSim_MT.py | 1 + DDG4/examples/SiD_Markus.py | 1 + DDG4/examples/readHEPMC.py | 1 + DDG4/python/DDG4.py | 1 + DDG4/python/DDSim/DD4hepSimulation.py | 1 + DDG4/python/DDSim/Helper/Action.py | 1 + DDG4/python/DDSim/Helper/ConfigHelper.py | 1 + DDG4/python/DDSim/Helper/Filter.py | 1 + DDG4/python/DDSim/Helper/GuineaPig.py | 1 + DDG4/python/DDSim/Helper/Gun.py | 1 + DDG4/python/DDSim/Helper/Input.py | 1 + DDG4/python/DDSim/Helper/LCIO.py | 1 + DDG4/python/DDSim/Helper/MagneticField.py | 1 + DDG4/python/DDSim/Helper/Meta.py | 1 + DDG4/python/DDSim/Helper/Output.py | 1 + DDG4/python/DDSim/Helper/ParticleHandler.py | 1 + DDG4/python/DDSim/Helper/Physics.py | 1 + DDG4/python/DDSim/Helper/Random.py | 1 + DDG4/python/SystemOfUnits.py | 1 + DDG4/python/checkGeometry.py | 1 + DDG4/python/checkOverlaps.py | 1 + DDG4/python/g4MaterialScan.py | 1 + DDRec/python/DDRec.py | 1 + DDRec/python/dumpDetectorData.py | 1 + GaudiPluginService/python/GaudiPluginService/cpluginsvc.py | 1 + etc/CreateParsers.py | 1 + examples/CLICSiD/scripts/CLICMagField.py | 1 + examples/CLICSiD/scripts/CLICPhysics.py | 1 + examples/CLICSiD/scripts/CLICRandom.py | 1 + examples/CLICSiD/scripts/CLICSiDScan.py | 1 + examples/CLICSiD/scripts/CLICSiD_LoadROOTGeo.py | 1 + examples/CLICSiD/scripts/CLICSid.py | 1 + examples/CLICSiD/scripts/CLIC_G4Gun.py | 1 + examples/CLICSiD/scripts/CLIC_GDML.py | 1 + examples/CLICSiD/scripts/testDDPython.py | 1 + examples/ClientTests/scripts/Assemblies.py | 1 + examples/ClientTests/scripts/DDG4TestSetup.py | 1 + examples/ClientTests/scripts/FCC_Hcal.py | 1 + examples/ClientTests/scripts/LheD_tracker.py | 1 + examples/ClientTests/scripts/MiniTel.py | 1 + examples/ClientTests/scripts/MiniTelEnergyDeposits.py | 1 + examples/ClientTests/scripts/MiniTelRegions.py | 1 + examples/ClientTests/scripts/MiniTelSetup.py | 1 + examples/ClientTests/scripts/MultiCollections.py | 1 + examples/ClientTests/scripts/MultiSegmentCollections.py | 1 + examples/ClientTests/scripts/NestedDetectors.py | 1 + examples/ClientTests/scripts/SiliconBlock.py | 1 + examples/ClientTests/scripts/TrackingRegion.py | 1 + examples/DDCMS/scripts/CMSTrackerSim.py | 1 + examples/DDCodex/python/CODEX-b-alone.py | 1 + examples/DDCodex/python/GeoExtract.py | 1 + examples/DDDigi/scripts/TestFramework.py | 1 + examples/DDG4_MySensDet/scripts/MyTrackerSD_sim.py | 1 + examples/LHeD/scripts/LHeD.py | 1 + examples/LHeD/scripts/LHeDMagField.py | 1 + examples/LHeD/scripts/LHeDPhysics.py | 1 + examples/LHeD/scripts/LHeDRandom.py | 1 + examples/LHeD/scripts/LHeDScan.py | 1 + examples/LHeD/scripts/LHeD_G4Gun.py | 1 + examples/LHeD/scripts/LheSimu.py | 1 + examples/OpticalSurfaces/scripts/OpNovice.py | 1 + 69 files changed, 70 insertions(+), 1 deletion(-) diff --git a/DDCore/python/dd4hep.py b/DDCore/python/dd4hep.py index d2626136a..7528f7114 100644 --- a/DDCore/python/dd4hep.py +++ b/DDCore/python/dd4hep.py @@ -8,5 +8,6 @@ # For the list of contributors see $DD4hepINSTALL/doc/CREDITS. # #========================================================================== +from __future__ import absolute_import from dd4hep_base import * import_units(__import__(__name__)) diff --git a/DDCore/python/dd4hepFactories.py b/DDCore/python/dd4hepFactories.py index 04a413f0f..01c23b3f3 100755 --- a/DDCore/python/dd4hepFactories.py +++ b/DDCore/python/dd4hepFactories.py @@ -10,6 +10,7 @@ # #========================================================================== +from __future__ import absolute_import import os, sys, optparse, logging class ComponentDumper: diff --git a/DDCore/python/dd4hep_base.py b/DDCore/python/dd4hep_base.py index 708373be8..ca3f1a1f7 100644 --- a/DDCore/python/dd4hep_base.py +++ b/DDCore/python/dd4hep_base.py @@ -8,6 +8,7 @@ # For the list of contributors see $DD4hepINSTALL/doc/CREDITS. # #========================================================================== +from __future__ import absolute_import import imp, logging logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.DEBUG) diff --git a/DDCore/python/lcdd.py b/DDCore/python/lcdd.py index 74282ca69..918dbed06 100644 --- a/DDCore/python/lcdd.py +++ b/DDCore/python/lcdd.py @@ -8,7 +8,8 @@ # For the list of contributors see $DD4hepINSTALL/doc/CREDITS. # #========================================================================== - +from __future__ import absolute_import + from math import cos, sin, pi, tan from os import path, listdir from functools import partial diff --git a/DDDigi/python/DDDigi.py b/DDDigi/python/DDDigi.py index 8f4879de9..02e1a12e4 100644 --- a/DDDigi/python/DDDigi.py +++ b/DDDigi/python/DDDigi.py @@ -8,6 +8,7 @@ # For the list of contributors see $DD4hepINSTALL/doc/CREDITS. # #========================================================================== +from __future__ import absolute_import import logging from dd4hep_base import * diff --git a/DDG4/examples/CLICSidSimuLCIO.py b/DDG4/examples/CLICSidSimuLCIO.py index 80e060dc5..d9707de06 100644 --- a/DDG4/examples/CLICSidSimuLCIO.py +++ b/DDG4/examples/CLICSidSimuLCIO.py @@ -1,5 +1,6 @@ # # +from __future__ import absolute_import import os, time, DDG4 from DDG4 import OutputLevel as Output from SystemOfUnits import * diff --git a/DDG4/examples/CLICSidSimuMarkus.py b/DDG4/examples/CLICSidSimuMarkus.py index e7a0e9de2..042c91109 100644 --- a/DDG4/examples/CLICSidSimuMarkus.py +++ b/DDG4/examples/CLICSidSimuMarkus.py @@ -1,5 +1,6 @@ # # +from __future__ import absolute_import import os, time, logging, DDG4 from DDG4 import OutputLevel as Output from SystemOfUnits import * diff --git a/DDG4/examples/SiDSim.py b/DDG4/examples/SiDSim.py index 8c8d8fbf8..74b606c42 100644 --- a/DDG4/examples/SiDSim.py +++ b/DDG4/examples/SiDSim.py @@ -1,5 +1,6 @@ # # +from __future__ import absolute_import import os, time, logging, DDG4 from DDG4 import OutputLevel as Output from SystemOfUnits import * diff --git a/DDG4/examples/SiDSim_MT.py b/DDG4/examples/SiDSim_MT.py index d6251ce30..5b67aa233 100644 --- a/DDG4/examples/SiDSim_MT.py +++ b/DDG4/examples/SiDSim_MT.py @@ -1,5 +1,6 @@ # # +from __future__ import absolute_import import os, time, logging, DDG4 from DDG4 import OutputLevel as Output from SystemOfUnits import * diff --git a/DDG4/examples/SiD_Markus.py b/DDG4/examples/SiD_Markus.py index 48a242afb..50c5d664c 100644 --- a/DDG4/examples/SiD_Markus.py +++ b/DDG4/examples/SiD_Markus.py @@ -1,5 +1,6 @@ # # +from __future__ import absolute_import import os, time, logging, DDG4 from DDG4 import OutputLevel as Output from SystemOfUnits import * diff --git a/DDG4/examples/readHEPMC.py b/DDG4/examples/readHEPMC.py index 98728e9f0..be03ebc45 100644 --- a/DDG4/examples/readHEPMC.py +++ b/DDG4/examples/readHEPMC.py @@ -6,6 +6,7 @@ dd4hep simulation example setup using the python configuration @version 1.0 """ +from __future__ import absolute_import import logging logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.DEBUG) diff --git a/DDG4/python/DDG4.py b/DDG4/python/DDG4.py index 00f37b3f2..c835398ee 100644 --- a/DDG4/python/DDG4.py +++ b/DDG4/python/DDG4.py @@ -8,6 +8,7 @@ # For the list of contributors see $DD4hepINSTALL/doc/CREDITS. # #========================================================================== +from __future__ import absolute_import import logging from dd4hep_base import * diff --git a/DDG4/python/DDSim/DD4hepSimulation.py b/DDG4/python/DDSim/DD4hepSimulation.py index 133bde70a..8960bc3a6 100644 --- a/DDG4/python/DDSim/DD4hepSimulation.py +++ b/DDG4/python/DDSim/DD4hepSimulation.py @@ -6,6 +6,7 @@ Based on M. Frank and F. Gaede runSim.py @version 0.1 """ +from __future__ import absolute_import __RCSID__ = "$Id$" from g4units import * import argparse diff --git a/DDG4/python/DDSim/Helper/Action.py b/DDG4/python/DDSim/Helper/Action.py index 2252840e0..e8b471e8f 100644 --- a/DDG4/python/DDSim/Helper/Action.py +++ b/DDG4/python/DDSim/Helper/Action.py @@ -1,6 +1,7 @@ """Helper object for SD Actions """ +from __future__ import absolute_import from DDSim.Helper.ConfigHelper import ConfigHelper class Action( ConfigHelper ): diff --git a/DDG4/python/DDSim/Helper/ConfigHelper.py b/DDG4/python/DDSim/Helper/ConfigHelper.py index 89f5c3e39..172ec52d5 100644 --- a/DDG4/python/DDSim/Helper/ConfigHelper.py +++ b/DDG4/python/DDSim/Helper/ConfigHelper.py @@ -12,6 +12,7 @@ call for the parser object create an additional member:: """ +from __future__ import absolute_import from pprint import pprint class ConfigHelper( object ): diff --git a/DDG4/python/DDSim/Helper/Filter.py b/DDG4/python/DDSim/Helper/Filter.py index fe724f7c0..0b87a087a 100644 --- a/DDG4/python/DDSim/Helper/Filter.py +++ b/DDG4/python/DDSim/Helper/Filter.py @@ -5,6 +5,7 @@ The default filters are a GeantinoRejector and a 1keV minimum energy cut """ +from __future__ import absolute_import from DDSim.Helper.ConfigHelper import ConfigHelper from g4units import keV diff --git a/DDG4/python/DDSim/Helper/GuineaPig.py b/DDG4/python/DDSim/Helper/GuineaPig.py index 89864d8ff..146ebec21 100644 --- a/DDG4/python/DDSim/Helper/GuineaPig.py +++ b/DDG4/python/DDSim/Helper/GuineaPig.py @@ -1,5 +1,6 @@ """Helper object for GuineaPig InputFile Parameters""" +from __future__ import absolute_import from DDSim.Helper.Input import Input class GuineaPig( Input ): diff --git a/DDG4/python/DDSim/Helper/Gun.py b/DDG4/python/DDSim/Helper/Gun.py index d5af78bd9..ccba67ede 100644 --- a/DDG4/python/DDSim/Helper/Gun.py +++ b/DDG4/python/DDSim/Helper/Gun.py @@ -1,5 +1,6 @@ """Helper object for particle gun properties""" +from __future__ import absolute_import from DDSim.Helper.ConfigHelper import ConfigHelper from g4units import GeV diff --git a/DDG4/python/DDSim/Helper/Input.py b/DDG4/python/DDSim/Helper/Input.py index d36512d6e..68f8351a5 100644 --- a/DDG4/python/DDSim/Helper/Input.py +++ b/DDG4/python/DDSim/Helper/Input.py @@ -1,5 +1,6 @@ """Base class for inputfile parameters""" +from __future__ import absolute_import from DDSim.Helper.ConfigHelper import ConfigHelper class Input( ConfigHelper ): diff --git a/DDG4/python/DDSim/Helper/LCIO.py b/DDG4/python/DDSim/Helper/LCIO.py index fa66d9329..3cfc4b2f8 100644 --- a/DDG4/python/DDSim/Helper/LCIO.py +++ b/DDG4/python/DDSim/Helper/LCIO.py @@ -1,5 +1,6 @@ """Helper object for files containing one or more MCParticle collections""" +from __future__ import absolute_import from DDSim.Helper.Input import Input class LCIO( Input ): diff --git a/DDG4/python/DDSim/Helper/MagneticField.py b/DDG4/python/DDSim/Helper/MagneticField.py index ebe5aeabe..9c6f13a78 100644 --- a/DDG4/python/DDSim/Helper/MagneticField.py +++ b/DDG4/python/DDSim/Helper/MagneticField.py @@ -1,4 +1,5 @@ """Helper object for Magnetic Field properties""" +from __future__ import absolute_import from g4units import mm, m from DDSim.Helper.ConfigHelper import ConfigHelper diff --git a/DDG4/python/DDSim/Helper/Meta.py b/DDG4/python/DDSim/Helper/Meta.py index 600e80ab4..0e4370659 100644 --- a/DDG4/python/DDSim/Helper/Meta.py +++ b/DDG4/python/DDSim/Helper/Meta.py @@ -1,5 +1,6 @@ """Helper object for configuring the LCIO output file (meta)""" +from __future__ import absolute_import import datetime import os diff --git a/DDG4/python/DDSim/Helper/Output.py b/DDG4/python/DDSim/Helper/Output.py index 63e42895e..58b422221 100644 --- a/DDG4/python/DDSim/Helper/Output.py +++ b/DDG4/python/DDSim/Helper/Output.py @@ -1,5 +1,6 @@ """Dummy helper object for particle gun properties""" +from __future__ import absolute_import from DDSim.Helper.ConfigHelper import ConfigHelper from DDSim.DD4hepSimulation import outputLevel diff --git a/DDG4/python/DDSim/Helper/ParticleHandler.py b/DDG4/python/DDSim/Helper/ParticleHandler.py index ad7711cee..d9a527883 100644 --- a/DDG4/python/DDSim/Helper/ParticleHandler.py +++ b/DDG4/python/DDSim/Helper/ParticleHandler.py @@ -1,4 +1,5 @@ """Configuration Helper for ParticleHandler""" +from __future__ import absolute_import from g4units import MeV, mm from DDSim.Helper.ConfigHelper import ConfigHelper diff --git a/DDG4/python/DDSim/Helper/Physics.py b/DDG4/python/DDSim/Helper/Physics.py index c6943132b..11cd2e844 100644 --- a/DDG4/python/DDSim/Helper/Physics.py +++ b/DDG4/python/DDSim/Helper/Physics.py @@ -1,5 +1,6 @@ """Helper object for physicslist properties""" +from __future__ import absolute_import import os from DDSim.Helper.ConfigHelper import ConfigHelper diff --git a/DDG4/python/DDSim/Helper/Random.py b/DDG4/python/DDSim/Helper/Random.py index ec6a67a7a..d66d8d618 100644 --- a/DDG4/python/DDSim/Helper/Random.py +++ b/DDG4/python/DDSim/Helper/Random.py @@ -1,5 +1,6 @@ """Helper object for random number generator objects""" +from __future__ import absolute_import import random from DDSim.Helper.ConfigHelper import ConfigHelper diff --git a/DDG4/python/SystemOfUnits.py b/DDG4/python/SystemOfUnits.py index 9ebf1a3ac..895234067 100644 --- a/DDG4/python/SystemOfUnits.py +++ b/DDG4/python/SystemOfUnits.py @@ -13,5 +13,6 @@ # The namespace "DD4hep" is deprecated. Please use "dd4hep" instead. # #========================================================================== +from __future__ import absolute_import from g4units import * print 'DEPRECATION WARNING The namespace "SystemOfUnits" is deprecated. Please use "g4units" instead.' diff --git a/DDG4/python/checkGeometry.py b/DDG4/python/checkGeometry.py index c296c012d..f8d6e8370 100755 --- a/DDG4/python/checkGeometry.py +++ b/DDG4/python/checkGeometry.py @@ -10,6 +10,7 @@ # #========================================================================== +from __future__ import absolute_import import sys, errno, optparse, logging logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.DEBUG) diff --git a/DDG4/python/checkOverlaps.py b/DDG4/python/checkOverlaps.py index a6a745839..f9d105b7d 100755 --- a/DDG4/python/checkOverlaps.py +++ b/DDG4/python/checkOverlaps.py @@ -10,6 +10,7 @@ # #========================================================================== +from __future__ import absolute_import import sys, errno, optparse, logging logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.DEBUG) diff --git a/DDG4/python/g4MaterialScan.py b/DDG4/python/g4MaterialScan.py index cfee0995e..85f7c83e4 100644 --- a/DDG4/python/g4MaterialScan.py +++ b/DDG4/python/g4MaterialScan.py @@ -10,6 +10,7 @@ # #========================================================================== +from __future__ import absolute_import import os, sys, errno, optparse, logging logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.DEBUG) diff --git a/DDRec/python/DDRec.py b/DDRec/python/DDRec.py index 1496145cd..9d99e5e2e 100644 --- a/DDRec/python/DDRec.py +++ b/DDRec/python/DDRec.py @@ -8,6 +8,7 @@ # For the list of contributors see $DD4hepINSTALL/doc/CREDITS. # #========================================================================== +from __future__ import absolute_import import logging import dd4hep as core diff --git a/DDRec/python/dumpDetectorData.py b/DDRec/python/dumpDetectorData.py index 443a18931..ee10b41f8 100644 --- a/DDRec/python/dumpDetectorData.py +++ b/DDRec/python/dumpDetectorData.py @@ -10,6 +10,7 @@ # #========================================================================== +from __future__ import absolute_import import sys, errno, optparse, logging diff --git a/GaudiPluginService/python/GaudiPluginService/cpluginsvc.py b/GaudiPluginService/python/GaudiPluginService/cpluginsvc.py index 3b838fe9c..b8cde1c66 100644 --- a/GaudiPluginService/python/GaudiPluginService/cpluginsvc.py +++ b/GaudiPluginService/python/GaudiPluginService/cpluginsvc.py @@ -1,4 +1,5 @@ # cpluginsvc is a ctypes-based wrapper for the C-exposed API of GaudiPluginService +from __future__ import absolute_import __doc__ = ''' cpluginsvc is a ctypes-based wrapper for the C-API of the GaudiPluginService. diff --git a/etc/CreateParsers.py b/etc/CreateParsers.py index f51aa68c6..52ce96561 100644 --- a/etc/CreateParsers.py +++ b/etc/CreateParsers.py @@ -10,6 +10,7 @@ python CreateParsers.py """ +from __future__ import absolute_import import os LICENSE ="""// $Id$ diff --git a/examples/CLICSiD/scripts/CLICMagField.py b/examples/CLICSiD/scripts/CLICMagField.py index 0798b26c1..3d1f221e5 100644 --- a/examples/CLICSiD/scripts/CLICMagField.py +++ b/examples/CLICSiD/scripts/CLICMagField.py @@ -5,6 +5,7 @@ @version 1.0 """ +from __future__ import absolute_import if __name__ == "__main__": import CLICSid sid = CLICSid.CLICSid().loadGeometry() diff --git a/examples/CLICSiD/scripts/CLICPhysics.py b/examples/CLICSiD/scripts/CLICPhysics.py index 43e2d1d2c..87d4d8910 100644 --- a/examples/CLICSiD/scripts/CLICPhysics.py +++ b/examples/CLICSiD/scripts/CLICPhysics.py @@ -5,6 +5,7 @@ @version 1.0 """ +from __future__ import absolute_import if __name__ == "__main__": import CLICSid sid = CLICSid.CLICSid().loadGeometry() diff --git a/examples/CLICSiD/scripts/CLICRandom.py b/examples/CLICSiD/scripts/CLICRandom.py index 8d04b5b43..d25129e59 100644 --- a/examples/CLICSiD/scripts/CLICRandom.py +++ b/examples/CLICSiD/scripts/CLICRandom.py @@ -5,6 +5,7 @@ @version 1.0 """ +from __future__ import absolute_import from ROOT import TRandom from ROOT import gRandom diff --git a/examples/CLICSiD/scripts/CLICSiDScan.py b/examples/CLICSiD/scripts/CLICSiDScan.py index c19bb384b..90115d1a3 100644 --- a/examples/CLICSiD/scripts/CLICSiDScan.py +++ b/examples/CLICSiD/scripts/CLICSiDScan.py @@ -6,6 +6,7 @@ @version 1.0 """ +from __future__ import absolute_import def run(): import os, sys, logging, DDG4, CLICSid, g4units diff --git a/examples/CLICSiD/scripts/CLICSiD_LoadROOTGeo.py b/examples/CLICSiD/scripts/CLICSiD_LoadROOTGeo.py index 5b3fa6649..ff23c8b49 100644 --- a/examples/CLICSiD/scripts/CLICSiD_LoadROOTGeo.py +++ b/examples/CLICSiD/scripts/CLICSiD_LoadROOTGeo.py @@ -7,6 +7,7 @@ @version 1.0 """ +from __future__ import absolute_import def run(): import sys, logging, CLICSid, DDG4 from DDG4 import OutputLevel as Output diff --git a/examples/CLICSiD/scripts/CLICSid.py b/examples/CLICSiD/scripts/CLICSid.py index 9c4de587a..ab900e28d 100644 --- a/examples/CLICSiD/scripts/CLICSid.py +++ b/examples/CLICSiD/scripts/CLICSid.py @@ -1,3 +1,4 @@ +from __future__ import absolute_import import sys, logging, DDG4 from g4units import * diff --git a/examples/CLICSiD/scripts/CLIC_G4Gun.py b/examples/CLICSiD/scripts/CLIC_G4Gun.py index 6964c4174..bc13b1952 100644 --- a/examples/CLICSiD/scripts/CLIC_G4Gun.py +++ b/examples/CLICSiD/scripts/CLIC_G4Gun.py @@ -7,6 +7,7 @@ @version 1.0 """ +from __future__ import absolute_import def run(): import logging, CLICSid, DDG4 from DDG4 import OutputLevel as Output diff --git a/examples/CLICSiD/scripts/CLIC_GDML.py b/examples/CLICSiD/scripts/CLIC_GDML.py index d6b8209ac..0f3777d74 100644 --- a/examples/CLICSiD/scripts/CLIC_GDML.py +++ b/examples/CLICSiD/scripts/CLIC_GDML.py @@ -6,6 +6,7 @@ @version 1.0 """ +from __future__ import absolute_import def run(): from g4units import * import logging, CLICSid, DDG4 diff --git a/examples/CLICSiD/scripts/testDDPython.py b/examples/CLICSiD/scripts/testDDPython.py index b162a7d02..dcd6f2736 100644 --- a/examples/CLICSiD/scripts/testDDPython.py +++ b/examples/CLICSiD/scripts/testDDPython.py @@ -1,3 +1,4 @@ +from __future__ import absolute_import from ROOT import gSystem import os, logging, platform diff --git a/examples/ClientTests/scripts/Assemblies.py b/examples/ClientTests/scripts/Assemblies.py index ccc6050c2..a916590d7 100644 --- a/examples/ClientTests/scripts/Assemblies.py +++ b/examples/ClientTests/scripts/Assemblies.py @@ -1,3 +1,4 @@ +from __future__ import absolute_import import os, sys, time, DDG4 from SystemOfUnits import * # diff --git a/examples/ClientTests/scripts/DDG4TestSetup.py b/examples/ClientTests/scripts/DDG4TestSetup.py index 0efbc62d4..35a5a3310 100644 --- a/examples/ClientTests/scripts/DDG4TestSetup.py +++ b/examples/ClientTests/scripts/DDG4TestSetup.py @@ -1,3 +1,4 @@ +from __future__ import absolute_import import os, sys, time, logging, DDG4 from DDG4 import OutputLevel as Output from SystemOfUnits import * diff --git a/examples/ClientTests/scripts/FCC_Hcal.py b/examples/ClientTests/scripts/FCC_Hcal.py index 6ce04c323..886467bb7 100644 --- a/examples/ClientTests/scripts/FCC_Hcal.py +++ b/examples/ClientTests/scripts/FCC_Hcal.py @@ -1,3 +1,4 @@ +from __future__ import absolute_import import os, time, DDG4 from DDG4 import OutputLevel as Output from SystemOfUnits import * diff --git a/examples/ClientTests/scripts/LheD_tracker.py b/examples/ClientTests/scripts/LheD_tracker.py index 85f7026d6..afe3a1282 100644 --- a/examples/ClientTests/scripts/LheD_tracker.py +++ b/examples/ClientTests/scripts/LheD_tracker.py @@ -1,5 +1,6 @@ # # +from __future__ import absolute_import import os, sys, time, DDG4 from DDG4 import OutputLevel as Output from SystemOfUnits import * diff --git a/examples/ClientTests/scripts/MiniTel.py b/examples/ClientTests/scripts/MiniTel.py index 9a5ee8261..48b45399d 100644 --- a/examples/ClientTests/scripts/MiniTel.py +++ b/examples/ClientTests/scripts/MiniTel.py @@ -1,3 +1,4 @@ +from __future__ import absolute_import import os, sys, DDG4 # """ diff --git a/examples/ClientTests/scripts/MiniTelEnergyDeposits.py b/examples/ClientTests/scripts/MiniTelEnergyDeposits.py index b1fea4119..cbe975d2e 100644 --- a/examples/ClientTests/scripts/MiniTelEnergyDeposits.py +++ b/examples/ClientTests/scripts/MiniTelEnergyDeposits.py @@ -1,3 +1,4 @@ +from __future__ import absolute_import import sys, time, DDG4, MiniTelSetup from DDG4 import OutputLevel as Output # diff --git a/examples/ClientTests/scripts/MiniTelRegions.py b/examples/ClientTests/scripts/MiniTelRegions.py index 5e19fe4d4..5bc15ec85 100644 --- a/examples/ClientTests/scripts/MiniTelRegions.py +++ b/examples/ClientTests/scripts/MiniTelRegions.py @@ -5,6 +5,7 @@ @version 1.0 """ +from __future__ import absolute_import if __name__ == "__main__": from MiniTelSetup import Setup as MiniTel import logging diff --git a/examples/ClientTests/scripts/MiniTelSetup.py b/examples/ClientTests/scripts/MiniTelSetup.py index c78613e2b..b986563de 100644 --- a/examples/ClientTests/scripts/MiniTelSetup.py +++ b/examples/ClientTests/scripts/MiniTelSetup.py @@ -1,3 +1,4 @@ +from __future__ import absolute_import import os, time, DDG4TestSetup """ diff --git a/examples/ClientTests/scripts/MultiCollections.py b/examples/ClientTests/scripts/MultiCollections.py index c6fd05f83..732317e25 100644 --- a/examples/ClientTests/scripts/MultiCollections.py +++ b/examples/ClientTests/scripts/MultiCollections.py @@ -1,3 +1,4 @@ +from __future__ import absolute_import import os, sys, time, DDG4 from DDG4 import OutputLevel as Output from SystemOfUnits import * diff --git a/examples/ClientTests/scripts/MultiSegmentCollections.py b/examples/ClientTests/scripts/MultiSegmentCollections.py index ceb86b584..3b5c1a798 100644 --- a/examples/ClientTests/scripts/MultiSegmentCollections.py +++ b/examples/ClientTests/scripts/MultiSegmentCollections.py @@ -1,3 +1,4 @@ +from __future__ import absolute_import import os, sys, time, DDG4 from DDG4 import OutputLevel as Output from SystemOfUnits import * diff --git a/examples/ClientTests/scripts/NestedDetectors.py b/examples/ClientTests/scripts/NestedDetectors.py index c2a3f66b0..234a4dd7d 100644 --- a/examples/ClientTests/scripts/NestedDetectors.py +++ b/examples/ClientTests/scripts/NestedDetectors.py @@ -1,3 +1,4 @@ +from __future__ import absolute_import import os, sys, time, DDG4 from DDG4 import OutputLevel as Output from SystemOfUnits import * diff --git a/examples/ClientTests/scripts/SiliconBlock.py b/examples/ClientTests/scripts/SiliconBlock.py index 19eeb9885..96269fdd4 100644 --- a/examples/ClientTests/scripts/SiliconBlock.py +++ b/examples/ClientTests/scripts/SiliconBlock.py @@ -1,5 +1,6 @@ # # +from __future__ import absolute_import import os, sys, time, DDG4 from DDG4 import OutputLevel as Output from SystemOfUnits import * diff --git a/examples/ClientTests/scripts/TrackingRegion.py b/examples/ClientTests/scripts/TrackingRegion.py index 304f8ff49..8b4c808e5 100644 --- a/examples/ClientTests/scripts/TrackingRegion.py +++ b/examples/ClientTests/scripts/TrackingRegion.py @@ -1,5 +1,6 @@ # # +from __future__ import absolute_import import os, sys, time, DDG4 # """ diff --git a/examples/DDCMS/scripts/CMSTrackerSim.py b/examples/DDCMS/scripts/CMSTrackerSim.py index caea821ea..40c03f748 100644 --- a/examples/DDCMS/scripts/CMSTrackerSim.py +++ b/examples/DDCMS/scripts/CMSTrackerSim.py @@ -1,3 +1,4 @@ +from __future__ import absolute_import import os, sys, time, DDG4 from DDG4 import OutputLevel as Output from SystemOfUnits import * diff --git a/examples/DDCodex/python/CODEX-b-alone.py b/examples/DDCodex/python/CODEX-b-alone.py index 9b45611de..7c8b824a1 100755 --- a/examples/DDCodex/python/CODEX-b-alone.py +++ b/examples/DDCodex/python/CODEX-b-alone.py @@ -1,5 +1,6 @@ # # +from __future__ import absolute_import import os, sys, time, DDG4 from DDG4 import OutputLevel as Output from SystemOfUnits import * diff --git a/examples/DDCodex/python/GeoExtract.py b/examples/DDCodex/python/GeoExtract.py index 76a586bea..675cdf5a1 100755 --- a/examples/DDCodex/python/GeoExtract.py +++ b/examples/DDCodex/python/GeoExtract.py @@ -4,6 +4,7 @@ # Syntax is: # gaudirun.py Brunel-Default.py <someDataFiles>.py ############################################################################### +from __future__ import absolute_import from Gaudi.Configuration import * from Configurables import LHCbConfigurableUser, LHCbApp, CondDB, ToolSvc, EventSelector from Configurables import LoadDD4hepDet, LbDD4hepExample diff --git a/examples/DDDigi/scripts/TestFramework.py b/examples/DDDigi/scripts/TestFramework.py index 8eda36d57..b4a6a012b 100644 --- a/examples/DDDigi/scripts/TestFramework.py +++ b/examples/DDDigi/scripts/TestFramework.py @@ -1,5 +1,6 @@ +from __future__ import absolute_import import os, sys, logging, DDDigi DDDigi.setPrintFormat('%-32s %5s %s') diff --git a/examples/DDG4_MySensDet/scripts/MyTrackerSD_sim.py b/examples/DDG4_MySensDet/scripts/MyTrackerSD_sim.py index 366a62279..c83f35691 100644 --- a/examples/DDG4_MySensDet/scripts/MyTrackerSD_sim.py +++ b/examples/DDG4_MySensDet/scripts/MyTrackerSD_sim.py @@ -1,5 +1,6 @@ # # +from __future__ import absolute_import import os, sys, time, DDG4, dd4hep from DDG4 import OutputLevel as Output from SystemOfUnits import * diff --git a/examples/LHeD/scripts/LHeD.py b/examples/LHeD/scripts/LHeD.py index d2bd658ed..2c57089b5 100644 --- a/examples/LHeD/scripts/LHeD.py +++ b/examples/LHeD/scripts/LHeD.py @@ -1,3 +1,4 @@ +from __future__ import absolute_import import sys, logging, DDG4 from SystemOfUnits import * diff --git a/examples/LHeD/scripts/LHeDMagField.py b/examples/LHeD/scripts/LHeDMagField.py index 553d0bad7..e8aec7405 100644 --- a/examples/LHeD/scripts/LHeDMagField.py +++ b/examples/LHeD/scripts/LHeDMagField.py @@ -5,6 +5,7 @@ @version 1.0 """ +from __future__ import absolute_import if __name__ == "__main__": import LHeD lhed = LHeD.LHeD().loadGeometry() diff --git a/examples/LHeD/scripts/LHeDPhysics.py b/examples/LHeD/scripts/LHeDPhysics.py index a617a2ef9..d568ef0ca 100644 --- a/examples/LHeD/scripts/LHeDPhysics.py +++ b/examples/LHeD/scripts/LHeDPhysics.py @@ -5,6 +5,7 @@ @version 1.0 """ +from __future__ import absolute_import if __name__ == "__main__": import LHeD lhed = LHeD.LHeD().loadGeometry() diff --git a/examples/LHeD/scripts/LHeDRandom.py b/examples/LHeD/scripts/LHeDRandom.py index 60d565a98..c34e09843 100644 --- a/examples/LHeD/scripts/LHeDRandom.py +++ b/examples/LHeD/scripts/LHeDRandom.py @@ -5,6 +5,7 @@ @version 1.0 """ +from __future__ import absolute_import from ROOT import TRandom from ROOT import gRandom diff --git a/examples/LHeD/scripts/LHeDScan.py b/examples/LHeD/scripts/LHeDScan.py index 7b50c7dbd..af9033553 100644 --- a/examples/LHeD/scripts/LHeDScan.py +++ b/examples/LHeD/scripts/LHeDScan.py @@ -6,6 +6,7 @@ @version 1.0 """ +from __future__ import absolute_import def run(): import os, sys, logging, DDG4, SystemOfUnits diff --git a/examples/LHeD/scripts/LHeD_G4Gun.py b/examples/LHeD/scripts/LHeD_G4Gun.py index a8ab48726..33ca186a4 100644 --- a/examples/LHeD/scripts/LHeD_G4Gun.py +++ b/examples/LHeD/scripts/LHeD_G4Gun.py @@ -7,6 +7,7 @@ @version 1.0 """ +from __future__ import absolute_import def run(): import logging, LHeD, DDG4 from DDG4 import OutputLevel as Output diff --git a/examples/LHeD/scripts/LheSimu.py b/examples/LHeD/scripts/LheSimu.py index 4c9cab54d..4897482f8 100644 --- a/examples/LHeD/scripts/LheSimu.py +++ b/examples/LHeD/scripts/LheSimu.py @@ -7,6 +7,7 @@ modified for LHeC """ +from __future__ import absolute_import def run(): import LHeD, DDG4, os, SystemOfUnits from DDG4 import OutputLevel as Output diff --git a/examples/OpticalSurfaces/scripts/OpNovice.py b/examples/OpticalSurfaces/scripts/OpNovice.py index e65147be1..0928f2d1e 100644 --- a/examples/OpticalSurfaces/scripts/OpNovice.py +++ b/examples/OpticalSurfaces/scripts/OpNovice.py @@ -1,5 +1,6 @@ # # +from __future__ import absolute_import import os, sys, time, DDG4 from DDG4 import OutputLevel as Output from SystemOfUnits import * -- GitLab