ATLAS Offline Software
Loading...
Searching...
No Matches
AthenaPoolTestReadDoubleSelector.py
Go to the documentation of this file.
12
13
14import AthenaCommon.AtlasUnixStandardJob
15
16
17from AthenaCommon.AlgSequence import AlgSequence
18topSequence = AlgSequence()
19
20
21from AthenaCommon.AppMgr import ServiceMgr as svcMgr
22
23
24from AthenaCommon.AppMgr import theApp
25
26# Set that we are running MC+MC overlay in MT mode
27from OverlayCommonAlgs.OverlayFlags import overlayFlags
28overlayFlags.isDataOverlay.set_Value_and_Lock(False)
29overlayFlags.isOverlayMT.set_Value_and_Lock(True)
30
31#--------------------------------------------------------------
32# Load POOL support for DoubleEventSelector
33#--------------------------------------------------------------
34import AthenaPoolCnvSvc.ReadAthenaPoolDouble
35
36#--------------------------------------------------------------
37# Input options for DoubleEventSelector
38#--------------------------------------------------------------
39
40# Add in DoubleEventSelector
41svcMgr.EventSelector.InputCollections = [ "SimplePoolFile1.root" ]
42svcMgr.SecondaryEventSelector.InputCollections = [ "SimplePoolFile2.root" ]
43
44svcMgr.EventSelector.OutputLevel = DEBUG
45svcMgr.SecondaryEventSelector.OutputLevel = DEBUG
46
47#--------------------------------------------------------------
48# Event related parameters
49#--------------------------------------------------------------
50theApp.EvtMax = 5
51
52#--------------------------------------------------------------
53# Application: AthenaPoolTest options
54#--------------------------------------------------------------
55# Load "user algorithm" top algorithms to be run, and the libraries that house them
56from AthenaPoolTest.AthenaPoolTestConf import AthenaPoolTestDataReader
57topSequence += AthenaPoolTestDataReader( "AthenaPoolTestDataReader" )
58
59svcMgr.PoolSvc.ReadCatalog = ['file:AthenaPoolTestWriteDoubleSelector_catalog.xml']
60
61#--------------------------------------------------------------
62# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
63#--------------------------------------------------------------
64svcMgr.MessageSvc.OutputLevel = WARNING
65svcMgr.MessageSvc.debugLimit = 100000
66AthenaPoolTestDataReader.OutputLevel = DEBUG
67
68from AthenaServices import AthenaServicesConf
69AthenaEventLoopMgr = AthenaServicesConf.AthenaEventLoopMgr()
70AthenaEventLoopMgr.UseSecondaryEventNumber = True
71svcMgr += AthenaEventLoopMgr
72
73# Turn on the tree cache for the CollectionTree - tree cache only
74# works for one tree. And set tree cache size - default is 10 MB (10 000 000)
75svcMgr.AthenaPoolCnvSvc.InputPoolAttributes += [ "DatabaseName = '*'; ContainerName = 'CollectionTree'; TREE_CACHE = '100000'" ]
76# Set number of events for learning before turning on cache - default is 5
77svcMgr.AthenaPoolCnvSvc.InputPoolAttributes += [ "DatabaseName = '*'; TREE_CACHE_LEARN_EVENTS = '6'" ]
78
79# Print out values - must have PoolSvc in info mode
80svcMgr.PoolSvc.OutputLevel = INFO
81svcMgr.AthenaPoolCnvSvc.InputPoolAttributes += [ "DatabaseName = '*'; TREE_CACHE_LEARN_EVENTS = 'int'" ]
82svcMgr.AthenaPoolCnvSvc.InputPoolAttributes += [ "DatabaseName = '*'; TREE_CACHE_SIZE = 'int'" ]
83
84# Print out for each event the number of bytes read and the number of
85# read calls. With the tree cache, one should see jumps in the bytes
86# read by the cache size, i.e. the bytes read should not change each
87# event. However, the cache only works on one tree - the main event
88# tree (CollectionTree) - and we read some things from other trees, so
89# one does see a small increase event-by-event.
90svcMgr.AthenaPoolCnvSvc.PrintInputAttrPerEvt += [ "DatabaseName = '*'; BYTES_READ = 'double'" ]
91svcMgr.AthenaPoolCnvSvc.PrintInputAttrPerEvt += [ "DatabaseName = '*'; READ_CALLS = 'int'" ]
92
93
94# No stats printout
95include( "AthenaPoolTest/NoStats_jobOptions.py" )
96
97#==============================================================
98#
99# End of job options file
100#
101