Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print function migration for SLHCUpgradeSimulations_Configuration #23879

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -1,11 +1,12 @@
from __future__ import print_function

import FWCore.ParameterSet.Config as cms



def usePFWithMethodOne(process):
print '-------------PF with method I -------------'
print 'Assumes that HCAL reco is tuned to method I '
print('-------------PF with method I -------------')
print('Assumes that HCAL reco is tuned to method I ')
process.particleFlowRecHitHBHE.navigator = cms.PSet(
name = cms.string("PFRecHitHCALNavigator")
)
Expand All @@ -14,8 +15,8 @@ def usePFWithMethodOne(process):


def usePFWithMethodOnePointFive(process):
print '-------------PF with method I.5-------------'
print 'Independent of which HCAL reco was used since it reads the time samples from the rechit '
print('-------------PF with method I.5-------------')
print('Independent of which HCAL reco was used since it reads the time samples from the rechit ')


from RecoParticleFlow.PFClusterProducer.particleFlowClusterHBHEMaxSampleTimeSelected_cfi import particleFlowClusterHBHETimeSelected as timeSelector
Expand Down
9 changes: 5 additions & 4 deletions SLHCUpgradeSimulations/Configuration/python/muonCustoms.py
@@ -1,3 +1,4 @@
from __future__ import print_function
import FWCore.ParameterSet.Config as cms


Expand Down Expand Up @@ -48,7 +49,7 @@ def customise_csc_cond_ungangedME11A_mc(process):

from CalibMuon.Configuration.getCSCConditions_frontier_cff import cscConditions
for (classname, tag) in myconds:
print classname, tag
print(classname, tag)
sourcename = 'unganged_' + classname
process.__setattr__(sourcename, cscConditions.clone())
process.__getattribute__(sourcename).toGet = cms.VPSet( cms.PSet( record = cms.string(classname), tag = cms.string(tag)) )
Expand Down Expand Up @@ -109,9 +110,9 @@ def csc_PathVsModule_SanityCheck(process):
# verify:
for path_name, module_name in paths_modules:
if hasattr(process, path_name) and not hasattr(process, module_name):
print "WARNING: module %s is not in %s path!!!" % (module_name, path_name)
print " This path has the following modules:"
print " ", getattr(process, path_name).moduleNames(),"\n"
print("WARNING: module %s is not in %s path!!!" % (module_name, path_name))
print(" This path has the following modules:")
print(" ", getattr(process, path_name).moduleNames(),"\n")


# ------------------------------------------------------------------
Expand Down
13 changes: 7 additions & 6 deletions SLHCUpgradeSimulations/Configuration/python/postLS1Customs.py
@@ -1,3 +1,4 @@
from __future__ import print_function
import FWCore.ParameterSet.Config as cms

def customisePostLS1_Common(process):
Expand Down Expand Up @@ -43,7 +44,7 @@ def customisePostLS1_Common(process):

def customisePostLS1(process,displayDeprecationWarning=True):
if displayDeprecationWarning :
print """
print("""
#
# -- Warning! You are using a deprecated customisation function. --
#
Expand All @@ -60,7 +61,7 @@ def customisePostLS1(process,displayDeprecationWarning=True):
#
# There is more information at https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideCmsDriverEras
#
"""
""")
# common customisation
process = customisePostLS1_Common(process)

Expand All @@ -87,7 +88,7 @@ def customisePostLS1_lowPU(process):

def customisePostLS1_50ns(process,displayDeprecationWarning=True):
if displayDeprecationWarning :
print """
print("""
#
# -- Warning! You are using a deprecated customisation function. --
#
Expand All @@ -104,7 +105,7 @@ def customisePostLS1_50ns(process,displayDeprecationWarning=True):
#
# There is more information at https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideCmsDriverEras
#
"""
""")

# common customisations
process = customisePostLS1_Common(process)
Expand All @@ -118,7 +119,7 @@ def customisePostLS1_50ns(process,displayDeprecationWarning=True):

def customisePostLS1_HI(process,displayDeprecationWarning=True):
if displayDeprecationWarning :
print """
print("""
#
# -- Warning! You are using a deprecated customisation function. --
#
Expand All @@ -135,7 +136,7 @@ def customisePostLS1_HI(process,displayDeprecationWarning=True):
#
# There is more information at https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideCmsDriverEras
#
"""
""")

# common customisation
process = customisePostLS1_Common(process)
Expand Down