/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
FWCore/ParameterSet/scripts/edmConfigDump
29 строк
1 KB
Andrea Bocci
Make processFromFile behave like cmsRun
26 фев 2026, 16:55
Не верифицирован
26 фев 2026, 16:55
4e9e13a
Код
Авторство
О чём код?
#! /usr/bin/env python3 import sys import argparse from FWCore.ParameterSet.processFromFile import processFromFile parser = argparse.ArgumentParser(description="Expand python configuration") parser.add_argument("filename", help="Python configuration file") parser.add_argument("--prune", action="store_true", help="Prune the configuration before printing it") parser.add_argument("--pruneVerbose", action="store_true", help="With --prune, be verbose on what is pruned") parser.add_argument("-o", "--output", type=str, default=None, help="Save the configuration dump into this file. In this case any printouts from the configuration continue to be printed to stdout. Default is to print the configuration dump to stdout.") parser.add_argument("configArgs", nargs=argparse.REMAINDER, help="arguments that will be passed to Python configuration file") options = parser.parse_args() cmsProcess = processFromFile(options.filename, options.configArgs) if options.prune: cmsProcess.prune(options.pruneVerbose) if options.output is not None: with open(options.output, "w") as f: f.write(cmsProcess.dumpPython()) else: print(cmsProcess.dumpPython())