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