1 from __future__
import print_function
3 import FWCore.ParameterSet.Config
as cms
4 import configparser
as ConfigParser
11 os.path.join(os.curdir,
"dqm_run_config"),
14 config = ConfigParser.ConfigParser()
15 files_read = config.read(conf_locations)
17 print(
"Loaded configuration file from:", files_read)
22 dqmRunConfigDefaults = {
24 type = cms.untracked.string(
"userarea"),
25 collectorPort = cms.untracked.int32(9190),
26 collectorHost = cms.untracked.string(
'127.0.0.1'),
29 type = cms.untracked.string(
"playback"),
30 collectorPort = cms.untracked.int32(9090),
31 collectorHost = cms.untracked.string(
'dqm-integration.cms'),
33 'production': cms.PSet(
34 type = cms.untracked.string(
"production"),
35 collectorPort = cms.untracked.int32(9090),
36 collectorHost = cms.untracked.string(
'dqm-prod-local.cms'),
42 dqmRunConfigType =
"userarea"
43 if dqmFileConfig.has_option(
"host",
"type"):
44 dqmRunConfigType = dqmFileConfig.get(
"host",
"type")
46 dqmRunConfig = dqmRunConfigDefaults[dqmRunConfigType]
49 if dqmFileConfig.has_option(
"host",
"collectorPort"):
50 dqmRunConfig.collectorPort =
int(dqmFileConfig.get(
"host",
"collectorPort"))
52 if dqmFileConfig.has_option(
"host",
"collectorHost"):
53 dqmRunConfig.collectorHost = dqmFileConfig.get(
"host",
"collectorHost")
57 print(
"dqmRunConfig:", dqmRunConfig)
61 DQM = cms.Service(
"DQM",
62 debug = cms.untracked.bool(
False),
63 publishFrequency = cms.untracked.double(5.0),
64 collectorPort = dqmRunConfig.collectorPort,
65 collectorHost = dqmRunConfig.collectorHost,
66 filter = cms.untracked.string(
''),
69 DQMMonitoringService = cms.Service(
"DQMMonitoringService")
75 dqmSaver.path =
"./upload"
76 dqmSaver.tag =
"PID%06d" % os.getpid()
77 dqmSaver.producer =
'DQM'
78 dqmSaver.backupLumiCount = 15