ATLAS Offline Software
Database
AthenaPOOL
AthenaPoolExample
AthenaPoolExampleAlgorithms
python
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
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 = [
"SimplePoolFile5.root"
]
22
flags.Common.MsgSuppression =
False
23
flags.Exec.DebugMessageComponents = [
"EventSelector"
,
24
"PoolSvc"
,
"AthenaPoolCnvSvc"
,
"AthenaPoolAddressProviderSvc"
,
"MetaDataSvc"
]
25
flags.lock()
26
27
# Main services
28
from
AthenaConfiguration.MainServicesConfig
import
MainServicesCfg
29
acc =
MainServicesCfg
( flags )
30
31
# Configure AthenaPool reading
32
from
AthenaPoolExampleAlgorithms.AthenaPoolExampleConfig
import
AthenaPoolExampleReadCfg
33
acc.merge(
AthenaPoolExampleReadCfg
(flags, readCatalogs = [
"file:Catalog2.xml"
]) )
34
35
acc.getService(
"MetaDataSvc"
).MetaDataTools += [
"AthPoolEx::ReadMeta"
]
36
37
# Creata and attach the algorithm
38
acc.addEventAlgo( CompFactory.AthPoolEx.ReadData(
"ReadData"
, OutputLevel = DEBUG) )
39
40
# Run
41
import
sys
42
sc = acc.run( flags.Exec.MaxEvents )
43
sys.exit( sc.isFailure() )
44
45
46
47
48
49
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
Generated on Thu Nov 7 2024 21:10:23 for ATLAS Offline Software by
1.8.18