Skip to content

Commit

Permalink
Merge pull request #34253 from slava77/patch-98
Browse files Browse the repository at this point in the history
"is not" -> "!=" in PatAlgos trigTools.py
  • Loading branch information
cmsbuild authored Jun 27, 2021
2 parents bd756f1 + 31f276e commit 487c26b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions PhysicsTools/PatAlgos/python/tools/trigTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def toolCode( self, process ):
trigEvtProdMod = getattr( process, triggerEventProducer )
trigEvtProdMod.processName = hltProcess
trigEvtProdMod.patTriggerProducer = cms.InputTag( triggerProducer )
if not path is '':
if path != '':
if not hasattr( process, path ):
prodPath = cms.Path( trigProdMod + trigEvtProdMod )
setattr( process, path, prodPath )
Expand All @@ -171,7 +171,7 @@ def toolCode( self, process ):
prodPath += trigEvtProdMod

# Add event content
if outputModule is not '':
if outputModule != '':
patTriggerEventContent = [ 'keep patTriggerObjects_%s_*_%s'%( triggerProducer, process.name_() )
, 'keep patTriggerFilters_%s_*_%s'%( triggerProducer, process.name_() )
, 'keep patTriggerPaths_%s_*_%s'%( triggerProducer, process.name_() )
Expand Down Expand Up @@ -260,7 +260,7 @@ def toolCode( self, process ):
# Maintain configuration
trigProdMod = getattr( process, triggerProducer )
trigProdMod.processName = hltProcess
if not path is '':
if path != '':
if not hasattr( process, path ):
prodPath = cms.Path( trigProdMod )
setattr( process, path, prodPath )
Expand All @@ -273,7 +273,7 @@ def toolCode( self, process ):
prodPath += trigProdMod

# Add event content
if outputModule is not '':
if outputModule != '':
patTriggerEventContent = [ 'keep patTriggerObjectStandAlones_%s_*_%s'%( triggerProducer, process.name_() )
]
if ( hasattr( trigProdMod, 'saveL1Refs' ) and trigProdMod.saveL1Refs.value() is True ):
Expand Down Expand Up @@ -411,7 +411,7 @@ def toolCode( self, process ):
trigEvtProdMod.patTriggerMatches.append( cms.InputTag( matcher ) )

# Add event content
if outputModule is not '':
if outputModule != '':
patTriggerEventContent = []
for matcher in triggerMatchersKnown:
patTriggerEventContent += [ 'keep patTriggerObjectsedmAssociation_%s_%s_%s'%( triggerEventProducer, matcher, process.name_() )
Expand Down Expand Up @@ -527,7 +527,7 @@ def toolCode( self, process ):
trigMchMod.matched = triggerProducer

# Add event content
if outputModule is not '':
if outputModule != '':
patTriggerEventContent = []
for matcher in triggerMatchersKnown:
patTriggerEventContent += [ 'keep patTriggerObjectStandAlonesedmAssociation_%s_*_%s'%( matcher, process.name_() )
Expand Down Expand Up @@ -739,7 +739,7 @@ def toolCode( self, process ):
print(' Invalid input source for trigger match embedding')
print(' ==> %s with matchers \'%s\' is skipped'%( patObjProdType, dictConfig[ patObjProdType ] ))
print(_longLine)
if outputModule is not '':
if outputModule != '':
getattr( process, outputModule ).outputCommands = _addEventContent( getattr( process, outputModule ).outputCommands, patTriggerEventContent )

switchOnTriggerMatchEmbedding = SwitchOnTriggerMatchEmbedding()

0 comments on commit 487c26b

Please sign in to comment.