1 from __future__
import print_function
3 import FWCore.ParameterSet.Config
as cms
4 from Configuration.DataProcessing.GetScenario
import getScenario
7 Example configuration for online reconstruction meant for visualization clients.
11 if 'unitTest=True' in sys.argv:
15 from DQM.Integration.config.unittestinputsource_cfi
import options, runType, source
17 from DQM.Integration.config.inputsource_cfi
import options, runType, source
22 scenarios = {
'pp_run':
'ppEra_Run3',
'cosmic_run':
'cosmicsEra_Run3',
'hi_run':
'ppEra_Run2_2016_pA'}
24 if not runType.getRunTypeName()
in scenarios.keys():
25 msg =
"Error getting the scenario out of the 'runkey', no mapping for: %s\n"%runType.getRunTypeName()
26 raise RuntimeError(msg)
28 scenarioName = scenarios[runType.getRunTypeName()]
30 print(
"Using scenario:",scenarioName)
34 except Exception
as ex:
35 msg =
"Error getting Scenario implementation for %s\n" % (
38 raise RuntimeError(msg)
42 from DQM.Integration.config.FrontierCondition_GT_autoExpress_cfi
import GlobalTag
44 'globalTag': GlobalTag.globaltag.value(),
45 'globalTagConnect': GlobalTag.connect.value()
49 from EventFilter.RawDataCollector.rawDataMapperByLabel_cfi
import rawDataMapperByLabel
50 rawDataMapperByLabel.rawCollectionList = [cms.InputTag(
"rawDataRepacker")]
56 process = scenario.visualizationProcessing(writeTiers=[
'FEVT'], **kwds)
59 process.__dict__[
'_Process__name'] =
"RECONEW"
61 process.source = source
64 process.source.inputFileTransitionsEachEvent = cms.untracked.bool(
True)
65 process.source.skipFirstLumis = cms.untracked.bool(
True)
66 process.source.minEventsPerLumi = cms.untracked.int32(0)
67 process.source.nextLumiTimeoutMillis = cms.untracked.int32(10000)
68 process.source.streamLabel = cms.untracked.string(
'streamDQM')
70 m = re.search(
r"\((\w+)\)",
str(source.runNumber))
71 runno =
str(m.group(1))
72 outDir=
'/fff/BU0/output/EvD/run'+runno+
'/streamEvDOutput'
74 runno = options.runNumber
83 process.options = cms.untracked.PSet(
84 Rethrow = cms.untracked.vstring(
'ProductNotFound'),
85 wantSummary = cms.untracked.bool(
True),
86 numberOfThreads = cms.untracked.uint32(8),
87 numberOfStreams = cms.untracked.uint32(8)
90 process.maxEvents = cms.untracked.PSet(
91 input = cms.untracked.int32(-1)
93 oldo = process._Process__outputmodules[
"FEVToutput"]
94 del process._Process__outputmodules[
"FEVToutput"]
96 process.FEVToutput = cms.OutputModule(
"JsonWritingTimeoutPoolOutputModule",
97 splitLevel = oldo.splitLevel,
98 outputCommands = oldo.outputCommands,
99 fileName = oldo.fileName,
100 dataset = oldo.dataset,
101 runNumber = cms.untracked.uint32(
int(runno)),
102 streamLabel = cms.untracked.string(
"streamEvDOutput_dqmcluster"),
104 outputPath = cms.untracked.string(outDir),
107 process.DQMMonitoringService = cms.Service(
"DQMMonitoringService")
111 psetFile = open(
"RunVisualizationProcessingCfg.py",
"w")
112 psetFile.write(process.dumpPython())
114 cmsRun =
"cmsRun -e RunVisualizationProcessingCfg.py"
115 print(
"Now do:\n%s" % cmsRun)