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. 9 from DQM.Integration.config.inputsource_cfi
import options,runType,source
14 scenarios = {
'pp_run':
'ppEra_Run2_2018',
'cosmic_run':
'cosmicsEra_Run2_2018',
'hi_run':
'ppEra_Run2_2018_pp_on_AA'}
16 if not runType.getRunTypeName()
in scenarios.keys():
17 msg =
"Error getting the scenario out of the 'runkey', no mapping for: %s\n"%runType.getRunTypeName()
18 raise RuntimeError(msg)
20 scenarioName = scenarios[runType.getRunTypeName()]
22 print(
"Using scenario:",scenarioName)
26 except Exception
as ex:
27 msg =
"Error getting Scenario implementation for %s\n" % (
30 raise RuntimeError(msg)
35 from DQM.Integration.config.FrontierCondition_GT_autoExpress_cfi
import GlobalTag
37 'globalTag': GlobalTag.globaltag.value(),
38 'globalTagConnect': GlobalTag.connect.value()
42 from EventFilter.RawDataCollector.rawDataMapperByLabel_cfi
import rawDataMapperByLabel
43 rawDataMapperByLabel.rawCollectionList = [cms.InputTag(
"rawDataRepacker")]
49 process = scenario.visualizationProcessing(writeTiers=[
'FEVT'], **kwds)
51 process.source = source
52 process.source.inputFileTransitionsEachEvent = cms.untracked.bool(
True)
53 process.source.skipFirstLumis = cms.untracked.bool(
True)
54 process.source.minEventsPerLumi = cms.untracked.int32(0)
55 process.source.nextLumiTimeoutMillis = cms.untracked.int32(10000)
56 process.source.streamLabel = cms.untracked.string(
'streamDQM')
58 m = re.search(
r"\((\w+)\)",
str(source.runNumber))
59 runno =
str(m.group(1))
60 outDir=
'/fff/BU0/output/EvD/run'+runno+
'/streamEvDOutput' 68 process.options = cms.untracked.PSet(
69 Rethrow = cms.untracked.vstring(
'ProductNotFound'),
70 wantSummary = cms.untracked.bool(
True),
71 numberOfThreads = cms.untracked.uint32(8),
72 numberOfStreams = cms.untracked.uint32(8)
75 process.maxEvents = cms.untracked.PSet(
76 input = cms.untracked.int32(-1)
78 oldo = process._Process__outputmodules[
"FEVToutput"]
79 del process._Process__outputmodules[
"FEVToutput"]
81 process.FEVToutput = cms.OutputModule(
"JsonWritingTimeoutPoolOutputModule",
82 splitLevel = oldo.splitLevel,
83 outputCommands = oldo.outputCommands,
84 fileName = oldo.fileName,
85 dataset = oldo.dataset,
86 runNumber = cms.untracked.uint32(
int(runno)),
87 streamLabel = cms.untracked.string(
"streamEvDOutput_dqmcluster"),
89 outputPath = cms.untracked.string(outDir),
92 process.DQMMonitoringService = cms.Service(
"DQMMonitoringService")
96 psetFile = open(
"RunVisualizationProcessingCfg.py",
"w")
97 psetFile.write(process.dumpPython())
99 cmsRun =
"cmsRun -e RunVisualizationProcessingCfg.py" 100 print(
"Now do:\n%s" % cmsRun)
S & print(S &os, JobReport::InputFile const &f)
def getScenario(scenarioName)