/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Alignment/MillePedeAlignmentAlgorithm/python/alignmentsetup/SetCondition.py
26 строк
947 B
David
python 2to3 tool lib2to3.fixes.fix_filter
03 июн 2018, 21:12
03 июн 2018, 21:12
e04c485
Код
Авторство
О чём код?
import FWCore.ParameterSet.Config as cms def setCondition(process, connect = "frontier://FrontierProd/CMS_CONDITIONS", record = None, tag = None, label = None): """ Overrides a condition in startgeometry from globaltag. """ if record is None or tag is None: raise ValueError("A 'record' and a 'tag' have to be provided to 'setCondition'.") if not hasattr(process, "GlobalTag"): process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") args = {"connect": cms.string(connect), "record": cms.string(record), "tag": cms.string(tag)} if label is not None: args["label"] = cms.untracked.string(label) process.GlobalTag.toGet \ = cms.VPSet([x for x in process.GlobalTag.toGet.value() if x.record.value() != record]) process.GlobalTag.toGet.append(cms.PSet(**args))