ATLAS Offline Software
FPGATrackSimMapMakerConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 
6 
9  from FPGATrackSimConfTools.FPGATrackSimDataPrepConfig import FPGATrackSimReadInputCfg
10  alg = CompFactory.FPGATrackSimMapMakerAlg(
11  GeometryVersion=flags.GeoModel.AtlasVersion,
12  OutFileName=flags.OutFileName,
13  KeyString=flags.KeyString,
14  nSlices=flags.nSlices,
15  region=flags.Trigger.FPGATrackSim.region,
16  trim=flags.trim,
17  globalTrim=flags.globalTrim,
18  doSpacePoints=flags.Trigger.FPGATrackSim.spacePoints,
19  doInsideOut=flags.doInsideOut,
20  InputTool = acc.getPrimaryAndMerge(FPGATrackSimReadInputCfg(flags))
21  )
22 
23  acc.addEventAlgo(alg)
24  return acc
25 
26 
27 if __name__ == "__main__":
28  from AthenaConfiguration.AllConfigFlags import initConfigFlags
29  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
30  flags = initConfigFlags()
31  flags.addFlag("OutFileName", "MMTest")
32  flags.addFlag("KeyString", "strip,barrel,0")
33  flags.addFlag("nSlices", 6)
34  flags.addFlag("trim", 0.1)
35  flags.addFlag("globalTrim", 0)
36  flags.addFlag('doInsideOut', False)
37 
38  from AthenaCommon.Logging import logging
39  log = logging.getLogger(__name__)
40 
41  flags.fillFromArgs()
42  if not flags.Trigger.FPGATrackSim.wrapperFileName and flags.Input.Files:
43  flags.Trigger.FPGATrackSim.wrapperFileName = flags.Input.Files
44  log.info("Taken wrapper input files from Input.Files(set via cmd line --filesInput option) property: %s", str(flags.Trigger.FPGATrackSim.wrapperFileName))
45  flags.lock()
46 
47  acc=MainServicesCfg(flags)
48  acc.store(open('FPGATrackSimMapMakerConfig.pkl','wb'))
49  acc.merge(FPGATrackSimMapMakerCfg(flags))
50 
51  from AthenaConfiguration.Utils import setupLoggingLevels
52  setupLoggingLevels(flags, acc)
53 
54  statusCode = acc.run()
55  assert statusCode.isSuccess() is True, "Application execution did not succeed"
56 
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.FPGATrackSimMapMakerConfig.FPGATrackSimMapMakerCfg
def FPGATrackSimMapMakerCfg(flags)
Definition: FPGATrackSimMapMakerConfig.py:7
python.Utils.setupLoggingLevels
def setupLoggingLevels(flags, ca)
Definition: Control/AthenaConfiguration/python/Utils.py:46
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:260
python.FPGATrackSimDataPrepConfig.FPGATrackSimReadInputCfg
def FPGATrackSimReadInputCfg(flags)
Definition: FPGATrackSimDataPrepConfig.py:174
Trk::open
@ open
Definition: BinningType.h:40
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
str
Definition: BTagTrackIpAccessor.cxx:11