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
12 scenarios = {
'pp_run':
'ppRun2',
'pp_run_stage1':
'ppRun2',
'cosmic_run':
'cosmicsRun2',
'cosmic_run_stage1':
'cosmicsRun2',
'hi_run':
'HeavyIons'}
14 if not runType.getRunTypeName()
in scenarios.keys():
15 msg =
"Error getting the scenario out of the 'runkey', no mapping for: %s\n"%runType.getRunTypeName()
16 raise RuntimeError, msg
18 scenarioName = scenarios[runType.getRunTypeName()]
20 print "Using scenario:",scenarioName
26 msg =
"Error getting Scenario implementation for %s\n" % (
29 raise RuntimeError, msg
36 process = scenario.visualizationProcessing(globalTag=
'DUMMY', writeTiers=[
'FEVT'], **kwds)
38 process.source = source
39 process.source.inputFileTransitionsEachEvent = cms.untracked.bool(
True)
40 process.source.skipFirstLumis = cms.untracked.bool(
True)
41 process.source.minEventsPerLumi = cms.untracked.int32(0)
42 process.source.nextLumiTimeoutMillis = cms.untracked.int32(10000)
43 process.source.streamLabel = cms.untracked.string(
'streamDQMEventDisplay')
45 m = re.search(
r"\((\w+)\)", str(source.runNumber))
46 runno = str(m.group(1))
47 outDir=
'/fff/BU0/output/EvD/run'+runno
55 process.load(
"DQM.Integration.config.FrontierCondition_GT_autoExpress_cfi")
57 process.options = cms.untracked.PSet(
58 Rethrow = cms.untracked.vstring(
'ProductNotFound'),
59 wantSummary = cms.untracked.bool(
True)
62 process.maxEvents = cms.untracked.PSet(
63 input = cms.untracked.int32(-1)
65 oldo = process._Process__outputmodules[
"FEVToutput"]
66 del process._Process__outputmodules[
"FEVToutput"]
68 process.FEVToutput = cms.OutputModule(
"JsonWritingTimeoutPoolOutputModule",
69 splitLevel = oldo.splitLevel,
70 eventAutoFlushCompressedSize = oldo.eventAutoFlushCompressedSize,
71 outputCommands = oldo.outputCommands,
72 fileName = oldo.fileName,
73 dataset = oldo.dataset,
74 runNumber = cms.untracked.uint32(int(runno)),
75 streamLabel = cms.untracked.string(
"streamEvDOutput2_dqmcluster"),
77 outputPath = cms.untracked.string(outDir),
80 process.DQMMonitoringService = cms.Service(
"DQMMonitoringService")
84 psetFile = open(
"RunVisualizationProcessingCfg.py",
"w")
85 psetFile.write(process.dumpPython())
87 cmsRun =
"cmsRun -e RunVisualizationProcessingCfg.py"
88 print "Now do:\n%s" % cmsRun