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_2018',
'cosmic_run':
'cosmicsEra_Run2_2018',
'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)
34 from DQM.Integration.config.FrontierCondition_GT_autoExpress_cfi
import GlobalTag
36 'globalTag': GlobalTag.globaltag.value(),
37 'globalTagConnect': GlobalTag.connect.value()
43 process = scenario.visualizationProcessing(writeTiers=[
'FEVT'], **kwds)
45 process.source = source
46 process.source.inputFileTransitionsEachEvent = cms.untracked.bool(
True)
47 process.source.skipFirstLumis = cms.untracked.bool(
True)
48 process.source.minEventsPerLumi = cms.untracked.int32(0)
49 process.source.nextLumiTimeoutMillis = cms.untracked.int32(10000)
50 process.source.streamLabel = cms.untracked.string(
'streamDQMEventDisplay')
52 m = re.search(
r"\((\w+)\)",
str(source.runNumber))
53 runno =
str(m.group(1))
54 outDir=
'/fff/BU0/output/EvD/run'+runno+
'/streamEvDOutput2' 62 process.options = cms.untracked.PSet(
63 Rethrow = cms.untracked.vstring(
'ProductNotFound'),
64 wantSummary = cms.untracked.bool(
True),
65 numberOfThreads = cms.untracked.uint32(8),
66 numberOfStreams = cms.untracked.uint32(8)
69 process.maxEvents = cms.untracked.PSet(
70 input = cms.untracked.int32(-1)
72 oldo = process._Process__outputmodules[
"FEVToutput"]
73 del process._Process__outputmodules[
"FEVToutput"]
75 process.FEVToutput = cms.OutputModule(
"JsonWritingTimeoutPoolOutputModule",
76 splitLevel = oldo.splitLevel,
77 eventAutoFlushCompressedSize = oldo.eventAutoFlushCompressedSize,
78 outputCommands = oldo.outputCommands,
79 fileName = oldo.fileName,
80 dataset = oldo.dataset,
81 runNumber = cms.untracked.uint32(
int(runno)),
82 streamLabel = cms.untracked.string(
"streamEvDOutput2_dqmcluster"),
84 outputPath = cms.untracked.string(outDir),
87 process.DQMMonitoringService = cms.Service(
"DQMMonitoringService")
91 psetFile = open(
"RunVisualizationProcessingCfg.py",
"w")
92 psetFile.write(process.dumpPython())
94 cmsRun =
"cmsRun -e RunVisualizationProcessingCfg.py" 95 print "Now do:\n%s" % cmsRun
def getScenario(scenarioName)