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,
43 options.parseArguments()
50 if not options.runkey.strip():
51 options.runkey =
'pp_run' 53 runType.setRunType(options.runkey.strip())
56 nextLumiTimeoutMillis = 120000
61 nextLumiTimeoutMillis = 0
63 source = cms.Source(
"DQMProtobufReader",
64 runNumber = cms.untracked.uint32(options.runNumber),
65 runInputDir = cms.untracked.string(options.runInputDir),
67 streamLabel = cms.untracked.string(
'streamDQMHistograms'),
68 scanOnce = cms.untracked.bool(options.scanOnce),
70 delayMillis = cms.untracked.uint32(500),
71 nextLumiTimeoutMillis = cms.untracked.int32(nextLumiTimeoutMillis),
72 skipFirstLumis = cms.untracked.bool(options.skipFirstLumis),
73 deleteDatFiles = cms.untracked.bool(
False),
74 loadFiles = cms.untracked.bool(
True),
75 endOfRunKills = cms.untracked.bool(endOfRunKills),
78 print(
"Source:", source)
S & print(S &os, JobReport::InputFile const &f)