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