""" Example configuration for online reconstruction meant for visualization clients. """ from DQM.Integration.config.inputsource_cfi import options, runType, source # this is needed to map the names of the run-types chosen by DQM to the scenarios, ideally we could converge to the same names #scenarios = {'pp_run': 'ppRun2','cosmic_run':'cosmicsRun2','hi_run':'HeavyIons'} scenarios = { 'pp_run': 'ppRun2', 'pp_run_stage1': 'ppRun2', 'cosmic_run': 'cosmicsRun2', 'cosmic_run_stage1': 'cosmicsRun2', 'hi_run': 'HeavyIons' } if not runType.getRunTypeName() in scenarios.keys(): msg = "Error getting the scenario out of the 'runkey', no mapping for: %s\n" % runType.getRunTypeName( ) raise RuntimeError, msg scenarioName = scenarios[runType.getRunTypeName()] print "Using scenario:", scenarioName try: scenario = getScenario(scenarioName) except Exception, ex: msg = "Error getting Scenario implementation for %s\n" % (scenarioName, ) msg += str(ex) raise RuntimeError, msg
import re,os import FWCore.ParameterSet.Config as cms from Configuration.DataProcessing.GetScenario import getScenario """ Example configuration for online reconstruction meant for visualization clients. """ from DQM.Integration.config.inputsource_cfi import options,runType,source # this is needed to map the names of the run-types chosen by DQM to the scenarios, ideally we could converge to the same names #scenarios = {'pp_run': 'ppEra_Run2_2016','cosmic_run':'cosmicsEra_Run2_2016','hi_run':'HeavyIons'} #scenarios = {'pp_run': 'ppEra_Run2_2016','pp_run_stage1': 'ppEra_Run2_2016','cosmic_run':'cosmicsEra_Run2_2016','cosmic_run_stage1':'cosmicsEra_Run2_2016','hi_run':'HeavyIonsEra_Run2_HI'} scenarios = {'pp_run': 'ppEra_Run2_2018','cosmic_run':'cosmicsEra_Run2_2018','hi_run':'HeavyIonsEra_Run2_HI'} if not runType.getRunTypeName() in scenarios.keys(): msg = "Error getting the scenario out of the 'runkey', no mapping for: %s\n"%runType.getRunTypeName() raise RuntimeError(msg) scenarioName = scenarios[runType.getRunTypeName()] print "Using scenario:",scenarioName try: scenario = getScenario(scenarioName) except Exception as ex: msg = "Error getting Scenario implementation for %s\n" % ( scenarioName,) msg += str(ex) raise RuntimeError(msg)