"""
Example configuration for online reconstruction meant for visualization clients.
"""


from DQM.Integration.test.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'}


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
Exemple #2
0
import FWCore.ParameterSet.Config as cms
from Configuration.DataProcessing.GetScenario import getScenario
"""
Example configuration for online reconstruction meant for visualization clients.
"""
from DQM.Integration.test.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': 'ppRun2B0T','cosmic_run':'cosmicsRun2','hi_run':'HeavyIons'}
scenarios = {
    'pp_run': 'ppRun2',
    'cosmic_run': '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