ATLAS Offline Software
FPGADataFormatter.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentFactory import CompFactory
4 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
5 from AthenaCommon.Constants import DEBUG
6 
7 def FPGADataFormatToolCfg(flags, name = 'FPGADataFormatTool', **kwarg):
8 
10 
11  kwarg.setdefault('name', name)
12  acc.setPrivateTools(CompFactory.FPGADataFormatTool(**kwarg))
13 
14  return acc
15 
16 def FPGAFormatterPrepCfg(flags, name = "FPGAFormatterPrep", **kwarg):
17 
18  acc = ComponentAccumulator()
19 
20  tool = acc.popToolsAndMerge(FPGADataFormatToolCfg(flags))
21 
22  kwarg.setdefault('name', name)
23  kwarg.setdefault('FPGADataFormatTool', tool)
24 
25  acc.addEventAlgo(CompFactory.FPGADataFormatAlg(**kwarg))
26  return acc
27 
28 if __name__=="__main__":
29  from AthenaConfiguration.AllConfigFlags import initConfigFlags
30  from InDetConfig.ITkTrackRecoConfig import ITkTrackRecoCfg
31 
32  flags = initConfigFlags()
33  flags.Concurrency.NumThreads = 1
34  # Use a dummy input file for the EventInfo
35  flags.Input.Files = ["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/PhaseIIUpgrade/RDO/ATLAS-P2-RUN4-03-00-00/mc21_14TeV.900498.PG_single_muonpm_Pt100_etaFlatnp0_43.recon.RDO.e8481_s4149_r14697/RDO.33675668._000016.pool.root.1"]
36 
37  # Disable calo for this test
38  flags.Detector.EnableCalo = False
39 
40  # ensure that the xAOD SP and cluster containers are available
41  flags.Tracking.ITkMainPass.doAthenaToActsSpacePoint=True
42  flags.Tracking.ITkMainPass.doAthenaToActsCluster=True
43 
44  flags.Acts.doRotCorrection = False
45 
46  flags.Debug.DumpEvtStore = True
47  flags.lock()
48  flags = flags.cloneAndReplace("Tracking.ActiveConfig","Tracking.MainPass")
49 
50  # Main services
51  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
52  top_acc = MainServicesCfg(flags)
53 
54  from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
55  top_acc.merge(PoolReadCfg(flags))
56 
57  #Truth
58  if flags.Input.isMC:
59  from xAODTruthCnv.xAODTruthCnvConfig import GEN_AOD2xAODCfg
60  top_acc.merge(GEN_AOD2xAODCfg(flags))
61 
62  # Standard reco
63  top_acc.merge(ITkTrackRecoCfg(flags))
64 
65  kwarg = {}
66  kwarg["OutputLevel"] = DEBUG
67 
68  acc = FPGAFormatterPrepCfg(flags, **kwarg)
69  top_acc.merge(acc)
70 
71  top_acc.run(1)
python.ITkTrackRecoConfig.ITkTrackRecoCfg
ComponentAccumulator ITkTrackRecoCfg(flags)
Main ITk tracking config #####################.
Definition: ITkTrackRecoConfig.py:488
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
xAODTruthCnvConfig.GEN_AOD2xAODCfg
def GEN_AOD2xAODCfg(flags, name="GEN_AOD2xAOD", **kwargs)
Definition: xAODTruthCnvConfig.py:20
FPGADataFormatter.FPGAFormatterPrepCfg
def FPGAFormatterPrepCfg(flags, name="FPGAFormatterPrep", **kwarg)
Definition: FPGADataFormatter.py:16
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:260
Constants
some useful constants -------------------------------------------------—
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
FPGADataFormatter.FPGADataFormatToolCfg
def FPGADataFormatToolCfg(flags, name='FPGADataFormatTool', **kwarg)
Definition: FPGADataFormatter.py:7
python.PoolReadConfig.PoolReadCfg
def PoolReadCfg(flags)
Definition: PoolReadConfig.py:69