ATLAS Offline Software
Loading...
Searching...
No Matches
AthenaPoolTestStep2WriteDoubleSelector.py
Go to the documentation of this file.
13
14
15import AthenaCommon.AtlasUnixStandardJob
16
17
18from AthenaCommon.AlgSequence import AlgSequence
19topSequence = AlgSequence()
20
21
22from AthenaCommon.AppMgr import theApp
23
24
25from AthenaCommon.AppMgr import ServiceMgr as svcMgr
26
27# Set that we are running MC+MC overlay in MT mode
28from OverlayCommonAlgs.OverlayFlags import overlayFlags
29overlayFlags.isDataOverlay.set_Value_and_Lock(False)
30overlayFlags.isOverlayMT.set_Value_and_Lock(True)
31
32#--------------------------------------------------------------
33# Load POOL support for DoubleEventSelector
34#--------------------------------------------------------------
35import AthenaPoolCnvSvc.ReadAthenaPoolDouble
36import AthenaPoolCnvSvc.WriteAthenaPool
37
38#--------------------------------------------------------------
39# Define the input parameters
40#--------------------------------------------------------------
41
42# Add in DoubleEventSelector
43svcMgr.EventSelector.InputCollections = [ "SimplePoolFile1.root" ]
44svcMgr.SecondaryEventSelector.InputCollections = [ "SimplePoolFile2.root" ]
45
46svcMgr.EventSelector.OutputLevel = DEBUG
47svcMgr.SecondaryEventSelector.OutputLevel = DEBUG
48
49#--------------------------------------------------------------
50# Event related parameters
51#--------------------------------------------------------------
52theApp.EvtMax = 5
53
54#--------------------------------------------------------------
55# Application: AthenaPoolTest options
56#--------------------------------------------------------------
57from AthenaPoolTest.AthenaPoolTestConf import AthenaPoolTestDataWriter
58topSequence += AthenaPoolTestDataWriter( "AthenaPoolTestDataWriter" )
59AthenaPoolTestDataWriter.PartialCreate = True
60AthenaPoolTestDataWriter.ReadOtherHalf = True
61
62#--------------------------------------------------------------
63# Output options
64#--------------------------------------------------------------
65# ItemList:
66include( "EventAthenaPool/EventAthenaPoolItemList_joboptions.py" )
67include( "AthenaPoolTestAthenaPool/AthenaPoolTestAthenaPoolItemList_joboptions.py" )
68
69print(fullItemList)
70
71from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
72Stream3 = AthenaPoolOutputStream( "Stream3", noTag=True )
73
74# Run OutputStream as an algorithm
75topSequence += Stream3
76# Must make sure that no OutStream's have been declared
77theApp.OutStream = [];
78# Stream's output file
79Stream3.WritingTool = "AthenaOutputStreamTool"
80Stream3.OutputFile = "SimplePoolFile3.root"
81# List of DO's to write out
82#Stream1.ItemList += fullItemList
83Stream3.ItemList += ["EventInfo#*"]
84# Write out only a new set of cols 1,2,3, and matrix
85Stream3.ItemList += ["IAthenaPoolTestCollection#AthenaPoolTestCollection_1"]
86Stream3.ItemList += ["IAthenaPoolTestCollection#AthenaPoolTestCollection_2"]
87Stream3.ItemList += ["IAthenaPoolTestCollection#AthenaPoolTestCollection_3"]
88Stream3.ItemList += ["AthenaPoolTestMatrix#*"]
89
90print(Stream3.ItemList)
91
92# Set file catalogs to avoid collisions.
93from PoolSvc import PoolSvcConf
94PoolSvc = PoolSvcConf.PoolSvc()
95PoolSvc.ReadCatalog = ['file:AthenaPoolTestWriteDoubleSelector_catalog.xml']
96PoolSvc.WriteCatalog = 'file:AthenaPoolTestStep2WriteDoubleSelector_catalog.xml'
97
98
99#--------------------------------------------------------------
100# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
101#--------------------------------------------------------------
102svcMgr.MessageSvc.OutputLevel = WARNING
103svcMgr.MessageSvc.debugLimit = 100000
104AthenaPoolTestDataWriter.OutputLevel = DEBUG
105
106from AthenaServices import AthenaServicesConf
107AthenaEventLoopMgr = AthenaServicesConf.AthenaEventLoopMgr()
108AthenaEventLoopMgr.OutputLevel = INFO
109AthenaEventLoopMgr.UseSecondaryEventNumber = True
110svcMgr += AthenaEventLoopMgr
111
112# No stats printout
113include( "AthenaPoolTest/NoStats_jobOptions.py" )
114
115#==============================================================
116#
117# End of job options file
118#
119
void print(char *figname, TCanvas *c1)
Test Algorithm POOL I/O tests, writes AthenaPoolData objects to the transient store.