ATLAS Offline Software
Loading...
Searching...
No Matches
AthenaPoolExample_ReadCond.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
17
18from AthenaConfiguration.AllConfigFlags import initConfigFlags
19from AthenaConfiguration.ComponentFactory import CompFactory
20from AthenaCommon.Constants import DEBUG
21
22# Setup flags
23flags = initConfigFlags()
24flags.Input.Files = ["SimplePoolFile1.root"]
25flags.Exec.MaxEvents = -1
26flags.Common.MsgSuppression = False
27flags.Exec.DebugMessageComponents = ["EventSelector", "CondProxyProvider",
28 "PoolSvc", "AthenaPoolAddressProviderSvc", "MetaDataSvc"]
29flags.lock()
30
31# Main services
32from AthenaConfiguration.MainServicesConfig import MainServicesCfg
33acc = MainServicesCfg( flags )
34
35from AthenaPoolExampleAlgorithms.AthenaPoolExampleConfig import AthenaPoolExampleReadCfg
36acc.merge( AthenaPoolExampleReadCfg( flags, readCatalogs = [ "file:Catalog1.xml" ] ) )
37
38acc.addService( CompFactory.CondProxyProvider( "CondProxyProvider",
39 InputCollections = ["SimplePoolFile4.root"]
40 ) )
41acc.getService("ProxyProviderSvc").ProviderNames += ["CondProxyProvider"]
42
43# Creata and attach the algorithms
44acc.addEventAlgo( CompFactory.AthPoolEx.ReadData("ReadData", OutputLevel = DEBUG) )
45acc.addEventAlgo( CompFactory.AthPoolEx.ReadCond("ReadCond", OutputLevel = DEBUG) )
46
47# Run
48import sys
49sc = acc.run(flags.Exec.MaxEvents)
50sys.exit(sc.isFailure())
51
52
53
54
55
56