ATLAS Offline Software
G4DebuggingToolsConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 
6 #Based on G4UserActionsConfig.py
7 
8 def VerboseSelectorToolCfg(flags, name="G4UA::VerboseSelectorTool", **kwargs):
9  result = ComponentAccumulator()
10  # example custom configuration - not enabled in this initial version
11  #if name in flags.Sim.UserActionConfig.keys():
12  # for prop,value in flags.Sim.UserActionConfig[name].items():
13  # kwargs.setdefault(prop,value)
14  result.setPrivateTools(CompFactory.G4UA.VerboseSelectorTool(name, **kwargs))
15  return result
16 
17 
18 def VolumeDebuggerToolCfg(flags, name='G4UA::VolumeDebuggerTool', **kwargs):
19  result = ComponentAccumulator()
20  result.setPrivateTools(CompFactory.G4UA.VolumeDebuggerTool(name,**kwargs))
21  return result
22 
23 
24 def VolumeDebugger(configFlags, name="G4UA::ISFFullUserActionSvc", **kwargs):
25 
26  kwargs.setdefault("RunGeoTest",True)
27  kwargs.setdefault("Verbose",False)
28 
29  result = ComponentAccumulator()
30  #Setting up the CA for the LengthIntegrator
31  from G4DebuggingTools.G4DebuggingToolsConfig import VolumeDebuggerToolCfg
32  actionAcc = ComponentAccumulator()
33  actions = []
34  actions += [actionAcc.popToolsAndMerge(VolumeDebuggerToolCfg(configFlags,**kwargs))]
35  actionAcc.setPrivateTools(actions)
36  volumeDebuggerAction = result.popToolsAndMerge(actionAcc)
37 
38  actionList = volumeDebuggerAction
39  #We clear it here because UserActionsTools also wants kwargs, different
40  #from the tool above - probably this can be improved...
41  kwargs_UATools = {}
42  kwargs_UATools.setdefault("UserActionTools",actionList)
43  result.addService(CompFactory.G4UA.UserActionSvc(name,**kwargs_UATools))
44 
45  return result
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.G4DebuggingToolsConfig.VerboseSelectorToolCfg
def VerboseSelectorToolCfg(flags, name="G4UA::VerboseSelectorTool", **kwargs)
Definition: G4DebuggingToolsConfig.py:8
python.G4DebuggingToolsConfig.VolumeDebugger
def VolumeDebugger(configFlags, name="G4UA::ISFFullUserActionSvc", **kwargs)
Definition: G4DebuggingToolsConfig.py:24
python.G4DebuggingToolsConfig.VolumeDebuggerToolCfg
def VolumeDebuggerToolCfg(flags, name='G4UA::VolumeDebuggerTool', **kwargs)
Definition: G4DebuggingToolsConfig.py:18