From f8bd72cddfc440e1c02219699e3d447c8b17458a Mon Sep 17 00:00:00 2001 From: Markus Frank <Markus.Frank@cern.ch> Date: Fri, 4 May 2018 18:55:49 +0200 Subject: [PATCH] Implement issues https://github.com/AIDASoft/DD4hep/issues/373, https://github.com/AIDASoft/DD4hep/issues/371 --- examples/ClientTests/scripts/MiniTel.py | 6 ++---- examples/ClientTests/scripts/MiniTelEnergyDeposits.py | 2 +- examples/ClientTests/scripts/MiniTelRegions.py | 1 + examples/ClientTests/scripts/MiniTelSetup.py | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/examples/ClientTests/scripts/MiniTel.py b/examples/ClientTests/scripts/MiniTel.py index ab2a1b336..dd43b0781 100644 --- a/examples/ClientTests/scripts/MiniTel.py +++ b/examples/ClientTests/scripts/MiniTel.py @@ -9,12 +9,10 @@ import os, sys """ def run(): - from MiniTelSetup import Setup as MiniTel - m = MiniTel() - + from MiniTelSetup import Setup + m = Setup() if len(sys.argv) >= 2 and sys.argv[1] =="batch": m.kernel.UI = '' - m.configure() m.defineOutput() m.setupGun() diff --git a/examples/ClientTests/scripts/MiniTelEnergyDeposits.py b/examples/ClientTests/scripts/MiniTelEnergyDeposits.py index 936257f14..6227ba5a9 100644 --- a/examples/ClientTests/scripts/MiniTelEnergyDeposits.py +++ b/examples/ClientTests/scripts/MiniTelEnergyDeposits.py @@ -18,7 +18,7 @@ def run(): m.setupGun() m.setupGenerator() # This is the actual test: - hit_tuple = DDG4.EventAction(kernel,'HitTupleAction/MiniTelTuple',True) + hit_tuple = DDG4.EventAction(m.kernel,'HitTupleAction/MiniTelTuple',True) hit_tuple.OutputFile = 'MiniTel_EnergyDeposits_'+time.strftime('%Y-%m-%d_%H-%M')+'.root' hit_tuple.Collections = ['*'] m.kernel.eventAction().add(hit_tuple) diff --git a/examples/ClientTests/scripts/MiniTelRegions.py b/examples/ClientTests/scripts/MiniTelRegions.py index d9857a2d5..5e19fe4d4 100644 --- a/examples/ClientTests/scripts/MiniTelRegions.py +++ b/examples/ClientTests/scripts/MiniTelRegions.py @@ -7,6 +7,7 @@ """ if __name__ == "__main__": from MiniTelSetup import Setup as MiniTel + import logging m = MiniTel() m.configure() logging.info("# Configure G4 geometry setup") diff --git a/examples/ClientTests/scripts/MiniTelSetup.py b/examples/ClientTests/scripts/MiniTelSetup.py index 192fc0390..41d9c63f2 100644 --- a/examples/ClientTests/scripts/MiniTelSetup.py +++ b/examples/ClientTests/scripts/MiniTelSetup.py @@ -29,4 +29,4 @@ class Setup(DDG4TestSetup.Setup): return self def defineOutput(self,output='MiniTel_'+time.strftime('%Y-%m-%d_%H-%M')): - return DDG4TestSetup.Setup.configure(self,output) + return DDG4TestSetup.Setup.defineOutput(self,output) -- GitLab