ATLAS Offline Software
AthenaPoolExample_ReadxAODElectrons.py
Go to the documentation of this file.
1 #!/env/python
2 
3 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
4 
5 
14 
15 from AthenaConfiguration.AllConfigFlags import initConfigFlags
16 from AthenaConfiguration.ComponentFactory import CompFactory
17 from AthenaCommon.Constants import DEBUG
18 
19 # Setup flags
20 flags = initConfigFlags()
21 flags.Input.Files = [ "SimplePoolFile_xAOD.root" ]
22 flags.Exec.MaxEvents = -1
23 flags.Common.MsgSuppression = False
24 flags.Exec.DebugMessageComponents = [ "ReadExampleElectron", "PoolSvc", "AthenaPoolCnvSvc",
25  "AthenaPoolAddressProviderSvc", "MetaDataSvc", "EventSelector" ]
26 flags.lock()
27 
28 # Main services
29 from AthenaConfiguration.MainServicesConfig import MainServicesCfg
30 acc = MainServicesCfg( flags )
31 
32 # Configure AthenaPool reading
33 from AthenaPoolExampleAlgorithms.AthenaPoolExampleConfig import AthenaPoolExampleReadCfg
34 acc.merge( AthenaPoolExampleReadCfg(flags, readCatalogs = ["file:Catalog1.xml"]) )
35 
36 # Create and attach the reading algorithm for the ExampleElectron and its decorations
37 acc.addEventAlgo( CompFactory.AthPoolEx.ReadExampleElectron("ReadExampleElectron", OutputLevel = DEBUG) )
38 
39 # Run
40 import sys
41 sc = acc.run(flags.Exec.MaxEvents)
42 sys.exit(sc.isFailure())
AthenaPoolExampleConfig.AthenaPoolExampleReadCfg
def AthenaPoolExampleReadCfg(flags, readCatalogs=[])
Definition: AthenaPoolExampleConfig.py:6
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