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. ")
37 options.register (
'runkey',
39 VarParsing.VarParsing.multiplicity.singleton,
40 VarParsing.VarParsing.varType.string,
45 options.register (
'runUniqueKey',
47 VarParsing.VarParsing.multiplicity.singleton,
48 VarParsing.VarParsing.varType.string,
49 "Unique run key from RCMS for Frontier")
51 options.parseArguments()
58 if not options.runkey.strip():
59 options.runkey =
'pp_run'
61 runType.setRunType(options.runkey.strip())
64 nextLumiTimeoutMillis = 120000
69 nextLumiTimeoutMillis = 0
71 source = cms.Source(
"DQMProtobufReader",
72 runNumber = cms.untracked.uint32(options.runNumber),
73 runInputDir = cms.untracked.string(options.runInputDir),
75 streamLabel = cms.untracked.string(
'streamDQMHistograms'),
76 scanOnce = cms.untracked.bool(options.scanOnce),
78 delayMillis = cms.untracked.uint32(500),
79 nextLumiTimeoutMillis = cms.untracked.int32(nextLumiTimeoutMillis),
80 skipFirstLumis = cms.untracked.bool(options.skipFirstLumis),
81 deleteDatFiles = cms.untracked.bool(
False),
82 loadFiles = cms.untracked.bool(
True),
83 endOfRunKills = cms.untracked.bool(endOfRunKills),
86 print(
"Source:", source)