Skip to content

Commit

Permalink
Merge pull request #23879 from davidlange6/printMig_180718T4_SLHCUpgr…
Browse files Browse the repository at this point in the history
…adeSimulations_Configuration

Print function migration for SLHCUpgradeSimulations_Configuration
  • Loading branch information
cmsbuild committed Jul 21, 2018
2 parents d968a39 + ced539d commit 17e33e9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
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

0 comments on commit 17e33e9

Please sign in to comment.