2 import FWCore.ParameterSet.Config
as cms
3 from Configuration.DataProcessing.GetScenario
import getScenario
6 Example configuration for online reconstruction meant for visualization clients. 8 from DQM.Integration.config.inputsource_cfi
import options,runType,source
13 scenarios = {
'pp_run':
'ppEra_Run2_2017',
'cosmic_run':
'cosmicsEra_Run2_2017',
'hi_run':
'HeavyIonsEra_Run2_HI'}
15 if not runType.getRunTypeName()
in scenarios.keys():
16 msg =
"Error getting the scenario out of the 'runkey', no mapping for: %s\n"%runType.getRunTypeName()
17 raise RuntimeError(msg)
19 scenarioName = scenarios[runType.getRunTypeName()]
21 print "Using scenario:",scenarioName
26 except Exception
as ex:
27 msg =
"Error getting Scenario implementation for %s\n" % (
30 raise RuntimeError(msg)
37 process = scenario.visualizationProcessing(globalTag=
'DUMMY', writeTiers=[
'FEVT'], **kwds)
39 process.source = source
40 process.source.inputFileTransitionsEachEvent = cms.untracked.bool(
True)
41 process.source.skipFirstLumis = cms.untracked.bool(
True)
42 process.source.minEventsPerLumi = cms.untracked.int32(0)
43 process.source.nextLumiTimeoutMillis = cms.untracked.int32(10000)
44 process.source.streamLabel = cms.untracked.string(
'streamDQM')
46 m = re.search(
r"\((\w+)\)",
str(source.runNumber))
47 runno =
str(m.group(1))
48 outDir=
'/fff/BU0/output/EvD/run'+runno+
'/streamEvDOutput' 56 process.load(
"DQM.Integration.config.FrontierCondition_GT_autoExpress_cfi")
58 process.options = cms.untracked.PSet(
59 Rethrow = cms.untracked.vstring(
'ProductNotFound'),
60 wantSummary = cms.untracked.bool(
True),
61 numberOfThreads = cms.untracked.uint32(8),
62 numberOfStreams = cms.untracked.uint32(8)
65 process.maxEvents = cms.untracked.PSet(
66 input = cms.untracked.int32(-1)
68 oldo = process._Process__outputmodules[
"FEVToutput"]
69 del process._Process__outputmodules[
"FEVToutput"]
71 process.FEVToutput = cms.OutputModule(
"JsonWritingTimeoutPoolOutputModule",
72 splitLevel = oldo.splitLevel,
73 eventAutoFlushCompressedSize = oldo.eventAutoFlushCompressedSize,
74 outputCommands = oldo.outputCommands,
75 fileName = oldo.fileName,
76 dataset = oldo.dataset,
77 runNumber = cms.untracked.uint32(
int(runno)),
78 streamLabel = cms.untracked.string(
"streamEvDOutput_dqmcluster"),
80 outputPath = cms.untracked.string(outDir),
83 process.DQMMonitoringService = cms.Service(
"DQMMonitoringService")
87 psetFile = open(
"RunVisualizationProcessingCfg.py",
"w")
88 psetFile.write(process.dumpPython())
90 cmsRun =
"cmsRun -e RunVisualizationProcessingCfg.py" 91 print "Now do:\n%s" % cmsRun
def getScenario(scenarioName)