ATLAS Offline Software
Loading...
Searching...
No Matches
testTrigR2ToR3NavGraphConversionV2.py
Go to the documentation of this file.
1#!/usr/bin/env python
2#
3# Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
4
5import sys
6
7# Set the Athena configuration flags
8from AthenaConfiguration.AllConfigFlags import initConfigFlags
9flags = initConfigFlags()
10
11flags.Input.Files=["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data18_13TeV.00357772.physics_Main.recon.AOD.r13286/AOD.27654050._000557.pool.root.1"]
12# BELOW: alternative test AOD file
13# flags.Input.Files=["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DerivationFrameworkART/mc20_13TeV.410470.PhPy8EG_A14_ttbar_hdamp258p75_nonallhad.recon.AOD.e6337_s3681_r13167/AOD.27162646._000001.pool.root.1"]
14# can browse config for this file here:
15flags.Detector.GeometryLAr=True
16flags.Detector.GeometryTile=True
17flags.Exec.MaxEvents = 20
18flags.Exec.SkipEvents = 0
19flags.Trigger.doEDMVersionConversion=True
20flags.fillFromArgs()
21flags.Concurrency.NumThreads=1
22flags.lock()
23
24# Initialize configuration object, add accumulator, merge, and run.
25from AthenaConfiguration.MainServicesConfig import MainServicesCfg
26from AthenaConfiguration.ComponentFactory import CompFactory
27
28from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
29cfg = MainServicesCfg(flags)
30cfg.merge(PoolReadCfg(flags))
31
32from AthenaServices.MetaDataSvcConfig import MetaDataSvcCfg
33cfg.merge(MetaDataSvcCfg(flags))
34
35confSvc = CompFactory.TrigConf.xAODConfigSvc("xAODConfigSvc")
36cfg.addService(confSvc)
37
38from DerivationFrameworkPhys.TriggerListsHelper import TriggerListsHelper
39triggerListsHelper = TriggerListsHelper(flags)
40chains = triggerListsHelper.Run2TriggerNamesNoTau + triggerListsHelper.Run2TriggerNamesTau
41
42from TrigNavTools.NavConverterConfig import NavConverterCfg
43cfg.merge(NavConverterCfg(flags, chainsList=chains, runTheChecker=True))
44
45# input EDM needs calo det descrition for conversion (uff)
46from LArGeoAlgsNV.LArGMConfig import LArGMCfg
47from TileGeoModel.TileGMConfig import TileGMCfg
48cfg.merge(LArGMCfg(flags))
49cfg.merge(TileGMCfg(flags))
50
51# enable to get the navigation graphs *.dot files
52# from TrigValAlgs.TrigValAlgsConfig import TrigEDMCheckerCfg
53# cfg.merge(TrigEDMCheckerCfg(flags, doDumpAll=False))
54# cfg.getEventAlgo("TrigEDMChecker").doDumpTrigCompsiteNavigation=True
55
56msg = cfg.getService('MessageSvc')
57msg.verboseLimit=0 # this is option for verbose log
58msg.debugLimit=0
59msg.infoLimit=0
60msg.warningLimit=0
61msg.Format='% F%35W%C% F%9W%e%7W%R%T %0W%M'
62cfg.printConfig(withDetails=True, summariseProps=False) # set True for exhaustive info
63sc = cfg.run()
64sys.exit(0 if sc.isSuccess() else 1)