Skip to content
Snippets Groups Projects
Commit e96a4b09 authored by Edward Moyse's avatar Edward Moyse
Browse files

Merge branch 'master-lbmuwriter' into 'master'

Allow clients to explicitly set the sequnece for LumiBlockMuWriter algorithm

See merge request atlas/athena!37325
parents 51519d7d 2208da48
No related branches found
No related tags found
6 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!37325Allow clients to explicitly set the sequnece for LumiBlockMuWriter algorithm
...@@ -10,13 +10,13 @@ from AthenaConfiguration.ComponentFactory import CompFactory ...@@ -10,13 +10,13 @@ from AthenaConfiguration.ComponentFactory import CompFactory
from AthenaCommon.BeamFlags import jobproperties from AthenaCommon.BeamFlags import jobproperties
def LumiBlockMuWriterDefault (name = 'LumiBlockMuWriter'): def LumiBlockMuWriterDefault (name = 'LumiBlockMuWriter', sequence = None):
from AthenaCommon.AlgSequence import AthSequencer from AthenaCommon.AlgSequence import AthSequencer
from AthenaCommon.AlgSequence import AlgSequence from AthenaCommon.AlgSequence import AlgSequence
condSeq = AthSequencer ('AthCondSeq') condSeq = AthSequencer ('AthCondSeq')
topSequence = AlgSequence() topSequence = AlgSequence()
if hasattr (condSeq, name) or hasattr (topSequence, name): if (sequence and hasattr (sequence, name)) or hasattr (condSeq, name) or hasattr (topSequence, name):
return return
LumiBlockMuWriter = CompFactory.LumiBlockMuWriter # LumiBlockComps LumiBlockMuWriter = CompFactory.LumiBlockMuWriter # LumiBlockComps
...@@ -40,10 +40,13 @@ def LumiBlockMuWriterDefault (name = 'LumiBlockMuWriter'): ...@@ -40,10 +40,13 @@ def LumiBlockMuWriterDefault (name = 'LumiBlockMuWriter'):
# FIXME: If EventInfoCnvAlg is in topSequence, then this needs to come # FIXME: If EventInfoCnvAlg is in topSequence, then this needs to come
# after it. Otherwise, schedule to condSeq so we'll be run early. # after it. Otherwise, schedule to condSeq so we'll be run early.
if cnvalg and cnvseq is topSequence: if sequence:
topSequence += alg sequence += alg
else: else:
condSeq += alg if cnvalg and cnvseq is topSequence:
topSequence += alg
else:
condSeq += alg
from AthenaCommon.GlobalFlags import globalflags from AthenaCommon.GlobalFlags import globalflags
from RecExConfig.ObjKeyStore import objKeyStore from RecExConfig.ObjKeyStore import objKeyStore
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
from AthenaCommon.Logging import logging from AthenaCommon.Logging import logging
from AthenaCommon.AlgSequence import AthSequencer from AthenaCommon.AlgSequence import AthSequencer
from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
_isOnline = False _isOnline = False
...@@ -14,7 +15,7 @@ _isOnline = False ...@@ -14,7 +15,7 @@ _isOnline = False
def LuminosityCondAlgDefault (name = 'LuminosityCondAlg', def LuminosityCondAlgDefault (name = 'LuminosityCondAlg',
suffix = '', suffix = '',
isOnline = None): isOnline = athenaCommonFlags.isOnline()):
if name is None: if name is None:
name = 'LuminosityCondAlg' + suffix name = 'LuminosityCondAlg' + suffix
......
...@@ -172,8 +172,8 @@ def TrigEgammaFastCaloHypoToolFromDict( d ): ...@@ -172,8 +172,8 @@ def TrigEgammaFastCaloHypoToolFromDict( d ):
""" Use menu decoded chain dictionary to configure the tool """ """ Use menu decoded chain dictionary to configure the tool """
cparts = [i for i in d['chainParts'] if ((i['signature']=='Electron') or (i['signature']=='Photon'))] cparts = [i for i in d['chainParts'] if ((i['signature']=='Electron') or (i['signature']=='Photon'))]
from LumiBlockComps.LuminosityCondAlgDefault import LuminosityCondAlgOnlineDefault from LumiBlockComps.LuminosityCondAlgDefault import LuminosityCondAlgDefault
LuminosityCondAlgOnlineDefault() LuminosityCondAlgDefault()
#def __mult(cpart): #def __mult(cpart):
# return int( cpart['multiplicity'] ) # return int( cpart['multiplicity'] )
......
...@@ -182,6 +182,7 @@ if not ConfigFlags.Input.isMC: ...@@ -182,6 +182,7 @@ if not ConfigFlags.Input.isMC:
globalflags.DatabaseInstance='CONDBR2' if opt.useCONDBR2 else 'COMP200' globalflags.DatabaseInstance='CONDBR2' if opt.useCONDBR2 else 'COMP200'
ConfigFlags.IOVDb.DatabaseInstance=globalflags.DatabaseInstance() ConfigFlags.IOVDb.DatabaseInstance=globalflags.DatabaseInstance()
athenaCommonFlags.isOnline.set_Value_and_Lock(opt.isOnline) athenaCommonFlags.isOnline.set_Value_and_Lock(opt.isOnline)
ConfigFlags.Common.isOnline = athenaCommonFlags.isOnline()
log.info('Configured the following global flags:') log.info('Configured the following global flags:')
globalflags.print_JobProperties() globalflags.print_JobProperties()
...@@ -349,26 +350,6 @@ if not hasattr(topSequence,"SGInputLoader"): ...@@ -349,26 +350,6 @@ if not hasattr(topSequence,"SGInputLoader"):
theApp.exit(1) theApp.exit(1)
topSequence.SGInputLoader.FailIfNoProxy = opt.failIfNoProxy topSequence.SGInputLoader.FailIfNoProxy = opt.failIfNoProxy
#--------------------------------------------------------------
# Event Info setup
#--------------------------------------------------------------
# If no xAOD::EventInfo is found in a POOL file, schedule conversion from old EventInfo
if ConfigFlags.Input.Format == 'POOL':
from RecExConfig.ObjKeyStore import objKeyStore
from PyUtils.MetaReaderPeeker import convert_itemList
objKeyStore.addManyTypesInputFile(convert_itemList(layout='#join'))
if objKeyStore.isInInput("xAOD::EventInfo"):
topSequence.SGInputLoader.Load += [( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' )]
else:
from AthenaCommon.AlgSequence import AthSequencer
condSeq = AthSequencer("AthCondSeq")
if not hasattr(condSeq, "xAODMaker::EventInfoCnvAlg"):
from xAODEventInfoCnv.xAODEventInfoCnvAlgDefault import xAODEventInfoCnvAlgDefault
xAODEventInfoCnvAlgDefault(sequence=condSeq)
else:
topSequence.SGInputLoader.Load += [( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' )]
# ---------------------------------------------------------------- # ----------------------------------------------------------------
# Detector geometry # Detector geometry
# ---------------------------------------------------------------- # ----------------------------------------------------------------
...@@ -442,16 +423,40 @@ from TrigConfigSvc.TrigConfigSvcCfg import L1ConfigSvcCfg ...@@ -442,16 +423,40 @@ from TrigConfigSvc.TrigConfigSvcCfg import L1ConfigSvcCfg
CAtoGlobalWrapper(L1ConfigSvcCfg,ConfigFlags) CAtoGlobalWrapper(L1ConfigSvcCfg,ConfigFlags)
# --------------------------------------------------------------- # ---------------------------------------------------------------
# HLT prep: RoIBResult and L1Decoder # Create main sequences
# --------------------------------------------------------------- # ---------------------------------------------------------------
# main HLT top sequence
from AthenaCommon.CFElements import seqOR,parOR from AthenaCommon.CFElements import seqOR,parOR
hltTop = seqOR("HLTTop") hltTop = seqOR("HLTTop")
hltBeginSeq = parOR("HLTBeginSeq") hltBeginSeq = parOR("HLTBeginSeq")
hltTop += hltBeginSeq hltTop += hltBeginSeq
topSequence += hltTop topSequence += hltTop
# ---------------------------------------------------------------
# Event Info setup
# ---------------------------------------------------------------
# If no xAOD::EventInfo is found in a POOL file, schedule conversion from old EventInfo
if ConfigFlags.Input.Format == 'POOL':
from RecExConfig.ObjKeyStore import objKeyStore
from PyUtils.MetaReaderPeeker import convert_itemList
objKeyStore.addManyTypesInputFile(convert_itemList(layout='#join'))
if objKeyStore.isInInput("xAOD::EventInfo"):
topSequence.SGInputLoader.Load += [( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' )]
else:
if not hasattr(hltBeginSeq, "xAODMaker::EventInfoCnvAlg"):
from xAODEventInfoCnv.xAODEventInfoCnvAlgDefault import xAODEventInfoCnvAlgDefault
xAODEventInfoCnvAlgDefault(sequence=hltBeginSeq)
else:
topSequence.SGInputLoader.Load += [( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' )]
# ---------------------------------------------------------------
# Add LumiBlockMuWriter creating xAOD::EventInfo decorations for pileup values
# ---------------------------------------------------------------
from LumiBlockComps.LumiBlockMuWriterDefault import LumiBlockMuWriterDefault
LumiBlockMuWriterDefault(sequence=hltBeginSeq)
# ---------------------------------------------------------------
# Add L1Decoder providing inputs to HLT
# ---------------------------------------------------------------
if opt.doL1Unpacking: if opt.doL1Unpacking:
if ConfigFlags.Input.Format == 'BS' or opt.doL1Sim: if ConfigFlags.Input.Format == 'BS' or opt.doL1Sim:
ConfigFlags.Trigger.L1Decoder.forceEnableAllChains = opt.forceEnableAllChains ConfigFlags.Trigger.L1Decoder.forceEnableAllChains = opt.forceEnableAllChains
...@@ -628,11 +633,6 @@ include("TriggerTest/disableChronoStatSvcPrintout.py") ...@@ -628,11 +633,6 @@ include("TriggerTest/disableChronoStatSvcPrintout.py")
if ConfigFlags.Input.isMC: if ConfigFlags.Input.isMC:
svcMgr.MessageSvc.setError += ['HepMcParticleLink'] svcMgr.MessageSvc.setError += ['HepMcParticleLink']
#-------------------------------------------------------------
# Enable xAOD::EventInfo decorations for pileup values
#-------------------------------------------------------------
include ("LumiBlockComps/LumiBlockMuWriter_jobOptions.py")
#------------------------------------------------------------- #-------------------------------------------------------------
# Apply modifiers # Apply modifiers
#------------------------------------------------------------- #-------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment