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 isDqmPlayback = cms.PSet( value = cms.untracked.bool( dqmRunConfigType ==
"playback" ) )
47 isDqmProduction = cms.PSet( value = cms.untracked.bool( dqmRunConfigType ==
"production" ) )
49 dqmRunConfig = dqmRunConfigDefaults[dqmRunConfigType]
52 if dqmFileConfig.has_option(
"host",
"collectorPort"):
53 dqmRunConfig.collectorPort =
int(dqmFileConfig.get(
"host",
"collectorPort"))
55 if dqmFileConfig.has_option(
"host",
"collectorHost"):
56 dqmRunConfig.collectorHost = dqmFileConfig.get(
"host",
"collectorHost")
59 print(
"dqmRunConfig:", dqmRunConfig)
63 DQM = cms.Service(
"DQM",
64 debug = cms.untracked.bool(
False),
65 publishFrequency = cms.untracked.double(5.0),
66 collectorPort = dqmRunConfig.collectorPort,
67 collectorHost = dqmRunConfig.collectorHost,
68 filter = cms.untracked.string(
''),
71 DQMMonitoringService = cms.Service(
"DQMMonitoringService")
77 dqmSaver.path =
"./upload" 78 dqmSaver.tag =
"PID%06d" % os.getpid()
79 dqmSaver.producer =
'DQM' 80 dqmSaver.backupLumiCount = 15
83 from DQMServices.FileIO.DQMFileSaverPB_cfi
import dqmSaver
as dqmSaverPB
85 dqmSaverPB.path =
'./upload/pb' 86 dqmSaverPB.tag =
'PID%06d' % os.getpid()
87 dqmSaverPB.producer =
'DQM' 88 dqmSaverPB.fakeFilterUnitMode =
True
def loadDQMRunConfigFromFile()
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)