ATLAS Offline Software
AthenaPoolTestWriteDoubleSelector.py
Go to the documentation of this file.
1 
14 import AthenaCommon.AtlasUnixGeneratorJob
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 #--------------------------------------------------------------
27 # Load POOL support
28 #--------------------------------------------------------------
29 import AthenaPoolCnvSvc.WriteAthenaPool
30 
31 #--------------------------------------------------------------
32 # Event related parameters
33 #--------------------------------------------------------------
34 theApp.EvtMax = 5
35 
36 #--------------------------------------------------------------
37 # Event related parameters
38 #--------------------------------------------------------------
39 # Set the following when reading back to adjust the run/event numbers
40 # (don't forget ApplicationMgr.EvtMax)
41 svcMgr.EventSelector.RunNumber = 1
42 svcMgr.EventSelector.EventsPerRun = 0x10000000000
43 svcMgr.EventSelector.FirstEvent = 0x100000000
44 svcMgr.EventSelector.EventsPerLB = 1
45 svcMgr.EventSelector.FirstLB = 1
46 svcMgr.EventSelector.InitialTimeStamp = 0
47 svcMgr.EventSelector.TimeStampInterval = 5
48 theApp.EvtMax = 2
49 
50 svcMgr.EventSelector.OutputLevel = DEBUG
51 
52 #--------------------------------------------------------------
53 # Application: AthenaPoolTest options
54 #--------------------------------------------------------------
55 
56 # Load "user algorithm" top algorithms to be run, and the libraries that house them
57 from AthenaPoolTest.AthenaPoolTestConf import AthenaPoolTestDataWriter
58 topSequence += AthenaPoolTestDataWriter( "AthenaPoolTestDataWriter" )
59 AthenaPoolTestDataWriter.OutputLevel = DEBUG
60 
61 #--------------------------------------------------------------
62 # Output options
63 #--------------------------------------------------------------
64 # ItemList:
65 include( "EventAthenaPool/EventAthenaPoolItemList_joboptions.py" )
66 include( "AthenaPoolTestAthenaPool/AthenaPoolTestAthenaPoolItemList_joboptions.py" )
67 
68 # Stream's output file
69 from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
70 
71 # Stream1
72 Stream1 = AthenaPoolOutputStream( "Stream1", noTag=True )
73 Stream1.OutputFile = "SimplePoolFile1.root"
74 # List of DO's to write out
75 Stream1.ItemList += fullItemList
76 
77 # Stream2
78 Stream2 = AthenaPoolOutputStream( "Stream2", noTag=True )
79 Stream2.OutputFile = "SimplePoolFile2.root"
80 # List of DO's to write out
81 Stream2.ItemList += fullItemList
82 
83 # Remove dumm_A from Stream1
84 Stream1.ItemList = [ o for o in Stream1.ItemList if not o in 'dummy_A#*' ]
85 Stream1.ItemList = [ o for o in Stream1.ItemList if not o in 'IAthenaPoolTestCollection#*' ]
86 
87 # Remove dumm_E from Stream2
88 Stream2.ItemList = [ o for o in Stream2.ItemList if not o in 'dummy_E#*' ]
89 Stream2.ItemList = [ o for o in Stream2.ItemList if not o in 'AthenaPoolTestMatrix#*' ]
90 
91 printfunc ("Stream1.ItemList ",Stream1.ItemList)
92 printfunc ("Stream2.ItemList ",Stream2.ItemList)
93 
94 # Change output file catalog to avoid collisions.
95 from PoolSvc import PoolSvcConf
96 PoolSvc = PoolSvcConf.PoolSvc()
97 PoolSvc.WriteCatalog = 'file:AthenaPoolTestWriteDoubleSelector_catalog.xml'
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 
105 from AthenaServices import AthenaServicesConf
106 AthenaEventLoopMgr = AthenaServicesConf.AthenaEventLoopMgr()
107 AthenaEventLoopMgr.OutputLevel = INFO
108 
109 # No stats printout
110 include( "AthenaPoolTest/NoStats_jobOptions.py" )
111 
112 #==============================================================
113 #
114 # End of job options file
115 #
116 
python.AlgSequence.AlgSequence
AlgSequence
Definition: PhysicsAnalysis/D3PDTools/AnaAlgorithm/python/AlgSequence.py:7
python.Include.include
include
Definition: Include.py:318
python.CreateOutputStreams.AthenaPoolOutputStream
def AthenaPoolOutputStream
backward compat
Definition: CreateOutputStreams.py:144