ATLAS Offline Software
TrigMuonRoIToolsConfig.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.ComponentFactory import CompFactory
4 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
5 
6 def TrigMuonRoIToolCfg(flags):
7  tool = CompFactory.TrigMuonRoITool('TrigMuonRoITool')
8  tool.DaqMuCTPiROBid = 0x760000
9  tool.DecodeMuCTPiFromROB = False
10  tool.MUCTPILocation = 'MUCTPI_RDO'
11  acc = ComponentAccumulator()
12  # TODO: Relying on a Converter to provide MUCTPI_RDO may be not thread safe.
13  # Run-3 MUCTPI should provide a decoder algorithm which should be scheduled before any alg using this tool.
14  # For now, still using the Run-2 Converter-based solution:
15  if tool.MUCTPILocation and not tool.DecodeMuCTPiFromROB:
16  rdoType = 'MuCTPI_RDO'
17 
18  # Tell SGInputLoader to load MUCTPI_RDO from the input
19  loadFromSG = [( rdoType, 'StoreGateSvc+%s' % tool.MUCTPILocation )]
20  from SGComps.SGInputLoaderConfig import SGInputLoaderCfg
21  acc.merge(SGInputLoaderCfg(flags, Load=loadFromSG))
22 
23 
24  # Enable using the Converter to load MUCTPI_RDO from ByteStream
25  if not flags.Input.isMC:
26  type_names = [ '%s/%s' % (rdoType, tool.MUCTPILocation) ]
27  address_provider = CompFactory.ByteStreamAddressProviderSvc(
28  TypeNames=type_names)
29  acc.addService(address_provider)
30 
31  acc.setPrivateTools(tool)
32 
33  return acc
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
SGInputLoaderConfig.SGInputLoaderCfg
def SGInputLoaderCfg(flags, Load=None, **kwargs)
Definition: SGInputLoaderConfig.py:7
TrigMuonRoIToolsConfig.TrigMuonRoIToolCfg
def TrigMuonRoIToolCfg(flags)
Definition: TrigMuonRoIToolsConfig.py:6