ATLAS Offline Software
Loading...
Searching...
No Matches
DoubleEventSelectorOverlayTest.py
Go to the documentation of this file.
12
13# basic job configuration
14import AthenaCommon.AtlasUnixStandardJob
15
16# get a handle to the default top-level algorithm sequence
17from AthenaCommon.AlgSequence import AlgSequence
18topSequence = AlgSequence()
19
20# get a handle to the ServiceManager
21from AthenaCommon.AppMgr import ServiceMgr as svcMgr
22
23# get a handle to the ApplicationManager
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# Set flags and load det descr
38#--------------------------------------------------------------
39from RecExConfig.RecFlags import rec
40from OverlayCommonAlgs.OverlayFlags import overlayFlags
41
42overlayFlags.isOverlayMT.set_Value_and_Lock(True)
43
44# For general flags
45rec.doAOD = False
46rec.doTrigger = False
47rec.doWriteTAG = False
48DetDescrVersion = "ATLAS-R2-2016-01-00-01"
49
50#--------------------------------------------------------------
51# Input options
52#--------------------------------------------------------------
53import os
54data_dir = os.environ.get ('ATLAS_REFERENCE_DATA', '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art')
55svcMgr.EventSelector.InputCollections = [ data_dir + "/OverlayTests/PresampledPileUp/22.0/RDO.merged-pileup-MT.unittest.pool.root" ]
56svcMgr.EventSelector.OutputLevel = DEBUG
57svcMgr.SecondaryEventSelector.InputCollections = [ data_dir + "/Tier0ChainTests/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s3091/HITS.10504490._000425.pool.root.1" ]
58svcMgr.SecondaryEventSelector.OutputLevel = DEBUG
59
60#--------------------------------------------------------------
61# Remapping Service
62#--------------------------------------------------------------
63from SGComps import AddressRemappingSvc
64AddressRemappingSvc.addInputRename("EventInfo","McEventInfo" ,"Sig_McEventInfo")
65AddressRemappingSvc.addInputRename("McEventCollection","TruthEvent" ,"Sig_TruthEvent")
66svcMgr.AddressRemappingSvc.OutputLevel = DEBUG
67
68#--------------------------------------------------------------
69# Event related parameters
70#--------------------------------------------------------------
71theApp.EvtMax = 10
72
73#--------------------------------------------------------------
74# Algorithms
75#--------------------------------------------------------------
76from AthenaCommon import CfgGetter
77topSequence += CfgGetter.getAlgorithm("CopyMcEventCollection")
78
79#--------------------------------------------------------------
80# Athena EventLoop Manager
81#--------------------------------------------------------------
82from AthenaCommon.ConcurrencyFlags import jobproperties as jp
83nThreads = jp.ConcurrencyFlags.NumThreads()
84from AthenaServices import AthenaServicesConf
85if nThreads > 0:
86 EventLoop = AthenaServicesConf.AthenaHiveEventLoopMgr()
87else:
88 EventLoop = AthenaServicesConf.AthenaEventLoopMgr()
89EventLoop.RequireInputAttributeList = True
90EventLoop.UseSecondaryEventNumber = True
91EventLoop.OutputLevel = INFO
92svcMgr += EventLoop
93
94#--------------------------------------------------------------
95# DEBUG messaging
96#--------------------------------------------------------------
97svcMgr.ProxyProviderSvc.OutputLevel = DEBUG
98svcMgr.AthenaPoolAddressProviderSvcPrimary.OutputLevel = DEBUG
99svcMgr.AthenaPoolAddressProviderSvcSecondary.OutputLevel = DEBUG
100svcMgr.EventSelector.OutputLevel = DEBUG
101
102#--------------------------------------------------------------
103# Output options
104#--------------------------------------------------------------
105from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
106# TODO: noTag=True to avoid warning, needs EventInfo overlay implemented
107Stream1 = AthenaPoolOutputStream( "Stream1", asAlg=True, noTag=True )
108Stream1.OutputLevel = INFO
109
110Stream1.OutputFile = locals().get("outputFile", "OverlayRDO.root")
111# List of DO's to write out
112Stream1.ItemList = []
113Stream1.ItemList += ["McEventCollection#TruthEvent"]
114
115#--------------------------------------------------------------
116# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
117#--------------------------------------------------------------
118svcMgr.MessageSvc.debugLimit = 100000
119
120# No stats printout
121include( "AthenaPoolTest/NoStats_jobOptions.py" )
122
123#==============================================================
124#
125# End of job options file
126#
127
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition hcg.cxx:130