From d1e35ba7438beab57bb45237cb77a206c9361610 Mon Sep 17 00:00:00 2001 From: Nicholas Styles <nicholas.styles@desy.de> Date: Wed, 2 Sep 2020 11:17:46 +0000 Subject: [PATCH] Add config for LengthIntegrator UserAction --- .../G4UserActions/python/G4UserActionsConfigNew.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Simulation/G4Utilities/G4UserActions/python/G4UserActionsConfigNew.py b/Simulation/G4Utilities/G4UserActions/python/G4UserActionsConfigNew.py index 3a1e7d7576d3..3ca986248903 100644 --- a/Simulation/G4Utilities/G4UserActions/python/G4UserActionsConfigNew.py +++ b/Simulation/G4Utilities/G4UserActions/python/G4UserActionsConfigNew.py @@ -87,3 +87,14 @@ def HitWrapperToolCfg(ConfigFlags, name="G4UA::HitWrapperTool", **kwargs): # kwargs.setdefault(prop,value) result.setPrivateTools(CompFactory.G4UA.HitWrapperTool(name, **kwargs)) return result + +def LengthIntegratorToolCfg(ConfigFlags, name="G4UA::UserActionSvc.LengthIntegratorTool", **kwargs): + THistSvc= CompFactory.THistSvc + result = ComponentAccumulator() + histsvc = THistSvc(name="THistSvc") + histsvc.Output = ["lengths DATAFILE='LengthIntegrator.root' OPT='RECREATE'"] + result.addService(histsvc) + kwargs.setdefault("HistoSvc", "THistSvc") + result.setPrivateTools(CompFactory.G4UA.LengthIntegratorTool(name, **kwargs)) + return result + -- GitLab