ATLAS Offline Software
Loading...
Searching...
No Matches
G4Utilities/G4UserActions/python/PostIncludes.py
Go to the documentation of this file.
1# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
2
3def LengthIntegrator(configFlags, name="G4UA::ISFFullUserActionSvc", **kwargs):
4
5 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
6 from AthenaConfiguration.ComponentFactory import CompFactory
7
8 result = ComponentAccumulator()
9
10 #Setting up the CA for the LengthIntegrator
11 from G4UserActions.G4UserActionsConfig import LengthIntegratorToolCfg
12 actionAcc = ComponentAccumulator()
13 actions = []
14 actions += [actionAcc.popToolsAndMerge(LengthIntegratorToolCfg(configFlags))]
15 actionAcc.setPrivateTools(actions)
16 lengthIntegratorAction = result.popToolsAndMerge(actionAcc)
17
18 actionList = lengthIntegratorAction
19 #Setting up UserActionsService
20 kwargs.setdefault("UserActionTools",actionList)
21 result.addService(CompFactory.G4UA.UserActionSvc(name, **kwargs))
22
23 return result
LengthIntegrator(configFlags, name="G4UA::ISFFullUserActionSvc", **kwargs)