1 from __future__
import print_function
2 import FWCore.ParameterSet.Config
as cms
3 import FWCore.ParameterSet.VarParsing
as VarParsing
6 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())
55 if not options.inputFiles:
57 nextLumiTimeoutMillis = 240000
62 nextLumiTimeoutMillis = 0
64 source = cms.Source(
"DQMStreamerReader",
65 runNumber = cms.untracked.uint32(options.runNumber),
66 runInputDir = cms.untracked.string(options.runInputDir),
67 SelectEvents = cms.untracked.vstring(
'*'),
68 streamLabel = cms.untracked.string(
'streamDQM'),
69 scanOnce = cms.untracked.bool(options.scanOnce),
70 minEventsPerLumi = cms.untracked.int32(1),
71 delayMillis = cms.untracked.uint32(500),
72 nextLumiTimeoutMillis = cms.untracked.int32(nextLumiTimeoutMillis),
73 skipFirstLumis = cms.untracked.bool(options.skipFirstLumis),
74 deleteDatFiles = cms.untracked.bool(
False),
75 endOfRunKills = cms.untracked.bool(endOfRunKills),
78 print(
"The list of input files is provided. Disabling discovery and running on everything.")
79 files =
map(
lambda x:
"file://" + x, options.inputFiles)
80 source = cms.Source(
"PoolSource",
81 fileNames = cms.untracked.vstring(files),
82 secondaryFileNames = cms.untracked.vstring()
92 print(
"Source:", source)
S & print(S &os, JobReport::InputFile const &f)