ATLAS Offline Software
Loading...
Searching...
No Matches
AthenaPoolExample_ReadMeta.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
15from AthenaConfiguration.AllConfigFlags import initConfigFlags
16from AthenaConfiguration.ComponentFactory import CompFactory
17from AthenaCommon.Constants import DEBUG
18
19# Setup flags
20flags = initConfigFlags()
21flags.Input.Files = ["SimplePoolFile5.root"]
22flags.Common.MsgSuppression = False
23flags.Exec.DebugMessageComponents = ["EventSelector",
24 "PoolSvc", "AthenaPoolCnvSvc","AthenaPoolAddressProviderSvc", "MetaDataSvc"]
25flags.lock()
26
27# Main services
28from AthenaConfiguration.MainServicesConfig import MainServicesCfg
29acc = MainServicesCfg( flags )
30
31# Configure AthenaPool reading
32from AthenaPoolExampleAlgorithms.AthenaPoolExampleConfig import AthenaPoolExampleReadCfg
33acc.merge( AthenaPoolExampleReadCfg(flags, readCatalogs = ["file:Catalog2.xml"]) )
34
35acc.getService("MetaDataSvc").MetaDataTools += ["AthPoolEx::ReadMeta"]
36
37# Creata and attach the algorithm
38acc.addEventAlgo( CompFactory.AthPoolEx.ReadData("ReadData", OutputLevel = DEBUG) )
39
40# Run
41import sys
42sc = acc.run( flags.Exec.MaxEvents )
43sys.exit( sc.isFailure() )
44
45
46
47
48
49