1 from __future__
import print_function
2 from __future__
import absolute_import
3 import FWCore.ParameterSet.Config
as cms
4 import FWCore.ParameterSet.VarParsing
as VarParsing
7 from .dqmPythonTypes
import *
11 options.register(
'runNumber',
13 VarParsing.VarParsing.multiplicity.singleton,
14 VarParsing.VarParsing.varType.int,
17 options.register(
'datafnPosition',
19 VarParsing.VarParsing.multiplicity.singleton,
20 VarParsing.VarParsing.varType.int,
21 "Data filename position in the positional arguments array 'data' in json file.")
23 options.register(
'runInputDir',
25 VarParsing.VarParsing.multiplicity.singleton,
26 VarParsing.VarParsing.varType.string,
27 "Directory where the DQM files will appear.")
29 options.register(
'scanOnce',
31 VarParsing.VarParsing.multiplicity.singleton,
32 VarParsing.VarParsing.varType.bool,
33 "Don't repeat file scans: use what was found during the initial scan. EOR file is ignored and the state is set to 'past end of run'.")
35 options.register(
'skipFirstLumis',
37 VarParsing.VarParsing.multiplicity.singleton,
38 VarParsing.VarParsing.varType.bool,
39 "Skip (and ignore the minEventsPerLumi parameter) for the files which have been available at the beginning of the processing.")
41 options.register(
'BeamSplashRun',
43 VarParsing.VarParsing.multiplicity.singleton,
44 VarParsing.VarParsing.varType.bool,
45 "Set client source settings for beam SPLASH run")
49 options.register(
'runkey',
51 VarParsing.VarParsing.multiplicity.singleton,
52 VarParsing.VarParsing.varType.string,
57 options.register(
'runUniqueKey',
59 VarParsing.VarParsing.multiplicity.singleton,
60 VarParsing.VarParsing.varType.string,
61 "Unique run key from RCMS for Frontier")
69 options.register(
'outputBaseDir',
71 VarParsing.VarParsing.multiplicity.singleton,
72 VarParsing.VarParsing.varType.string,
73 "Directory where the visualization output files will appear.")
76 options.parseArguments()
83 if not options.runkey.strip():
84 options.runkey =
'pp_run' 86 runType.setRunType(options.runkey.strip())
89 nextLumiTimeoutMillis = 120000
94 nextLumiTimeoutMillis = 0
96 source = cms.Source(
"DQMProtobufReader",
97 runNumber = cms.untracked.uint32(options.runNumber),
98 runInputDir = cms.untracked.string(options.runInputDir),
99 streamLabel = cms.untracked.string(
'streamDQMHistograms'),
100 scanOnce = cms.untracked.bool(options.scanOnce),
101 datafnPosition = cms.untracked.uint32(options.datafnPosition),
102 delayMillis = cms.untracked.uint32(500),
103 nextLumiTimeoutMillis = cms.untracked.int32(nextLumiTimeoutMillis),
104 skipFirstLumis = cms.untracked.bool(options.skipFirstLumis),
105 deleteDatFiles = cms.untracked.bool(
False),
106 loadFiles = cms.untracked.bool(
True),
107 endOfRunKills = cms.untracked.bool(endOfRunKills),
113 source.nextLumiTimeoutMillis = 15000
117 print(
"Initial Source settings:", source)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
def set_BeamSplashRun_settings(source)