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(
'runInputDir',
19 VarParsing.VarParsing.multiplicity.singleton,
20 VarParsing.VarParsing.varType.string,
21 "Directory where the DQM files will appear.")
23 options.register(
'scanOnce',
25 VarParsing.VarParsing.multiplicity.singleton,
26 VarParsing.VarParsing.varType.bool,
27 "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'.")
29 options.register(
'skipFirstLumis',
31 VarParsing.VarParsing.multiplicity.singleton,
32 VarParsing.VarParsing.varType.bool,
33 "Skip (and ignore the minEventsPerLumi parameter) for the files which have been available at the begining of the processing. ")
35 options.register(
'BeamSplashRun',
37 VarParsing.VarParsing.multiplicity.singleton,
38 VarParsing.VarParsing.varType.bool,
39 "Set client source settings for beam SPLASH run")
43 options.register (
'runkey',
45 VarParsing.VarParsing.multiplicity.singleton,
46 VarParsing.VarParsing.varType.string,
51 options.register (
'runUniqueKey',
53 VarParsing.VarParsing.multiplicity.singleton,
54 VarParsing.VarParsing.varType.string,
55 "Unique run key from RCMS for Frontier")
57 options.parseArguments()
64 if not options.runkey.strip():
65 options.runkey =
'pp_run'
67 runType.setRunType(options.runkey.strip())
70 nextLumiTimeoutMillis = 120000
75 nextLumiTimeoutMillis = 0
77 source = cms.Source(
"DQMProtobufReader",
78 runNumber = cms.untracked.uint32(options.runNumber),
79 runInputDir = cms.untracked.string(options.runInputDir),
81 streamLabel = cms.untracked.string(
'streamDQMHistograms'),
82 scanOnce = cms.untracked.bool(options.scanOnce),
84 delayMillis = cms.untracked.uint32(500),
85 nextLumiTimeoutMillis = cms.untracked.int32(nextLumiTimeoutMillis),
86 skipFirstLumis = cms.untracked.bool(options.skipFirstLumis),
87 deleteDatFiles = cms.untracked.bool(
False),
88 loadFiles = cms.untracked.bool(
True),
89 endOfRunKills = cms.untracked.bool(endOfRunKills),
95 source.nextLumiTimeoutMillis = 15000
99 print(
"Initial Source settings:", source)