/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
SimTracker/TrackerMaterialAnalysis/python/trackingMaterialVarParsing.py
21 строка
788 B
Shahzad Malik Muzaffar
[SIMULATION] py2/3 compatibility:drop use of __future__
22 ноя 2024, 20:17
22 ноя 2024, 20:17
5564683
Код
Авторство
О чём код?
from FWCore.ParameterSet.VarParsing import VarParsing import sys options = VarParsing('analysis') ALLOWED_GEOMETRIES = ['run2', 'Phase1', 'Phase2'] options.register('geometry', 'run2', VarParsing.multiplicity.singleton, VarParsing.varType.string, """ Specify which geometry scenario to use. The different geometry will automatically load also the correct XML grouping files for the material description. Currently supported values are %s""" % " ".join(ALLOWED_GEOMETRIES) ) options.parseArguments() if not options.geometry in ALLOWED_GEOMETRIES: print("\n**** ERROR ****\nUnknown geometry %s. Quitting.\n**** ERROR ****\n" % options.geometry) sys.exit(1)