ATLAS Offline Software
AthenaPoolTestReadDoubleSelector.py
Go to the documentation of this file.
1 
12 
13 
14 import AthenaCommon.AtlasUnixStandardJob
15 
16 
17 from AthenaCommon.AlgSequence import AlgSequence
18 topSequence = AlgSequence()
19 
20 
21 from AthenaCommon.AppMgr import ServiceMgr as svcMgr
22 
23 
24 from AthenaCommon.AppMgr import theApp
25 
26 # Set that we are running MC+MC overlay in MT mode
27 from OverlayCommonAlgs.OverlayFlags import overlayFlags
28 overlayFlags.isDataOverlay.set_Value_and_Lock(False)
29 overlayFlags.isOverlayMT.set_Value_and_Lock(True)
30 
31 #--------------------------------------------------------------
32 # Load POOL support for DoubleEventSelector
33 #--------------------------------------------------------------
34 import AthenaPoolCnvSvc.ReadAthenaPoolDouble
35 
36 #--------------------------------------------------------------
37 # Input options for DoubleEventSelector
38 #--------------------------------------------------------------
39 
40 # Add in DoubleEventSelector
41 svcMgr.EventSelector.InputCollections = [ "SimplePoolFile1.root" ]
42 svcMgr.SecondaryEventSelector.InputCollections = [ "SimplePoolFile2.root" ]
43 
44 svcMgr.EventSelector.OutputLevel = DEBUG
45 svcMgr.SecondaryEventSelector.OutputLevel = DEBUG
46 
47 #--------------------------------------------------------------
48 # Event related parameters
49 #--------------------------------------------------------------
50 theApp.EvtMax = 5
51 
52 #--------------------------------------------------------------
53 # Application: AthenaPoolTest options
54 #--------------------------------------------------------------
55 # Load "user algorithm" top algorithms to be run, and the libraries that house them
56 from AthenaPoolTest.AthenaPoolTestConf import AthenaPoolTestDataReader
57 topSequence += AthenaPoolTestDataReader( "AthenaPoolTestDataReader" )
58 
59 svcMgr.PoolSvc.ReadCatalog = ['file:AthenaPoolTestWriteDoubleSelector_catalog.xml']
60 
61 #--------------------------------------------------------------
62 # Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
63 #--------------------------------------------------------------
64 svcMgr.MessageSvc.OutputLevel = WARNING
65 svcMgr.MessageSvc.debugLimit = 100000
66 AthenaPoolTestDataReader.OutputLevel = DEBUG
67 
68 from AthenaServices import AthenaServicesConf
69 AthenaEventLoopMgr = AthenaServicesConf.AthenaEventLoopMgr()
70 AthenaEventLoopMgr.UseSecondaryEventNumber = True
71 svcMgr += 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)
75 svcMgr.AthenaPoolCnvSvc.InputPoolAttributes += [ "DatabaseName = '*'; ContainerName = 'CollectionTree'; TREE_CACHE = '100000'" ]
76 # Set number of events for learning before turning on cache - default is 5
77 svcMgr.AthenaPoolCnvSvc.InputPoolAttributes += [ "DatabaseName = '*'; TREE_CACHE_LEARN_EVENTS = '6'" ]
78 
79 # Print out values - must have PoolSvc in info mode
80 svcMgr.PoolSvc.OutputLevel = INFO
81 svcMgr.AthenaPoolCnvSvc.InputPoolAttributes += [ "DatabaseName = '*'; TREE_CACHE_LEARN_EVENTS = 'int'" ]
82 svcMgr.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.
90 svcMgr.AthenaPoolCnvSvc.PrintInputAttrPerEvt += [ "DatabaseName = '*'; BYTES_READ = 'double'" ]
91 svcMgr.AthenaPoolCnvSvc.PrintInputAttrPerEvt += [ "DatabaseName = '*'; READ_CALLS = 'int'" ]
92 
93 
94 # No stats printout
95 include( "AthenaPoolTest/NoStats_jobOptions.py" )
96 
97 #==============================================================
98 #
99 # End of job options file
100 #
101 
python.AlgSequence.AlgSequence
AlgSequence
Definition: PhysicsAnalysis/D3PDTools/AnaAlgorithm/python/AlgSequence.py:7
python.Include.include
include
Definition: Include.py:319