ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Database
AthenaPOOL
AthenaPoolExample
AthenaPoolExampleAlgorithms
python
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
27
#Run3 for now
28
from
AthenaConfiguration.TestDefaults
import
defaultGeometryTags
29
flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN3
30
31
flags.lock()
32
33
# Main services
34
from
AthenaConfiguration.MainServicesConfig
import
MainServicesCfg
35
acc = MainServicesCfg( flags )
36
37
# Configure AthenaPool reading
38
from
AthenaPoolExampleAlgorithms.AthenaPoolExampleConfig
import
AthenaPoolExampleReadCfg
39
acc.merge( AthenaPoolExampleReadCfg(flags, readCatalogs = [
"file:Catalog1.xml"
]) )
40
41
# Create and attach the reading algorithm for the ExampleElectron and its decorations
42
acc.addEventAlgo( CompFactory.AthPoolEx.ReadExampleElectron(
"ReadExampleElectron"
, OutputLevel = DEBUG) )
43
44
# Run
45
import
sys
46
sc = acc.run(flags.Exec.MaxEvents)
47
sys.exit(sc.isFailure())
Constants
Generated on
for ATLAS Offline Software by
1.17.0