Skip to content

Commit

Permalink
Print deprecation warning if anybody calls phase1TkCustoms.customise(…
Browse files Browse the repository at this point in the history
…) without phase1Pixel era set
  • Loading branch information
makortel committed Feb 26, 2016
1 parent e898baf commit 1dcbe2a
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions SLHCUpgradeSimulations/Configuration/python/phase1TkCustoms.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,28 @@
from Configuration.StandardSequences.Eras import eras

def customise(process):
if not eras.phase1Pixel.isChosen():
import sys
sys.stderr.write("""
########################################
#
# -- Warning! You are using a deprecated customisation function. --
#
# It will probably run fine (for now), but the customisations you are getting may be out of date
# (and will be removed after a short while)
# You should update your configuration file by
# If using cmsDriver:
# 1) add the option "--era Run2_2017"
# If using a pre-made configuration file:
# 1) add "from Configuration.StandardSequences.Eras import eras" to the TOP of the config file (above
# the process declaration).
# 2) add "eras.Run2_2017" as a parameter to the process object, e.g. "process = cms.Process('HLT',eras.Run2_2017)"
#
# There is more information at https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideCmsDriverEras
#
########################################
""")

if hasattr(process,'DigiToRaw'):
process=customise_DigiToRaw(process)
if hasattr(process,'RawToDigi'):
Expand Down

0 comments on commit 1dcbe2a

Please sign in to comment.