Skip to content

Commit

Permalink
Merge pull request #13503 from makortel/addDeprecationWarning2017
Browse files Browse the repository at this point in the history
Print deprecation warning if anybody uses phase1TkCustoms without phase1Pixel era
  • Loading branch information
cmsbuild committed Mar 2, 2016
2 parents 8fdef4a + 1dcbe2a commit a1a67c6
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 a1a67c6

Please sign in to comment.