ATLAS Offline Software
TrkExUnitTestsConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
2 
3 """Define methods to configure TrkExUnitTest"""
4 
5 def PositionMomentumWriterCfg(configFlags, name="PositionMomentumWriter", **kwargs) :
6  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
7  from AthenaConfiguration.ComponentFactory import CompFactory
8 
9  result = ComponentAccumulator()
10 
11  Trk__PositionMomentumWriter = CompFactory.Trk.PositionMomentumWriter
12  posMomWriter = Trk__PositionMomentumWriter(name, **kwargs)
13  result.addPublicTool(posMomWriter)
14  #result.setPrivateTools(posMomWriter)
15  return result, posMomWriter
16 
17 def ExtrapolationEngineTestCfg(configFlags, name = "ExtrapolationEngineTest", **kwargs ) :
18  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
19  from AthenaConfiguration.ComponentFactory import CompFactory
20 
21  result=ComponentAccumulator()
22 
23 
24  histSvc = CompFactory.THistSvc(Output = ["val DATAFILE='ExtrapolationEngineTest.root' TYPE='ROOT' OPT='RECREATE'"])
25  result.addService( histSvc )
26 
27  from TrkConfig.AtlasExtrapolationEngineConfig import AtlasExtrapolationEngineCfg
28  extrapAcc = AtlasExtrapolationEngineCfg(configFlags)
29  extrapolationEngine = extrapAcc.getPrimary()
30  result.merge(extrapAcc)
31  kwargs["ExtrapolationEngine"] = extrapolationEngine
32 
33  posMomAcc, posMomWriter = PositionMomentumWriterCfg(configFlags)
34  result.merge(posMomAcc)
35  kwargs.setdefault('PositionMomentumWriter', posMomWriter)
36 
37  Trk__ExtrapolationEngineTest = CompFactory.Trk.ExtrapolationEngineTest
38  extrapolationTest = Trk__ExtrapolationEngineTest(name, **kwargs)
39  result.addEventAlgo(extrapolationTest)
40 
41  return result
python.AtlasExtrapolationEngineConfig.AtlasExtrapolationEngineCfg
def AtlasExtrapolationEngineCfg(flags, name='Extrapolation', nameprefix='Atlas')
Definition: AtlasExtrapolationEngineConfig.py:14
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
TrkExUnitTestsConfig.PositionMomentumWriterCfg
def PositionMomentumWriterCfg(configFlags, name="PositionMomentumWriter", **kwargs)
Definition: TrkExUnitTestsConfig.py:5
TrkExUnitTestsConfig.ExtrapolationEngineTestCfg
def ExtrapolationEngineTestCfg(configFlags, name="ExtrapolationEngineTest", **kwargs)
Definition: TrkExUnitTestsConfig.py:17