1 import FWCore.ParameterSet.Config
as cms
2 import FWCore.ParameterSet.VarParsing
as VarParsing
5 from dqmPythonTypes
import *
10 options.register(
'runNumber',
12 VarParsing.VarParsing.multiplicity.singleton,
13 VarParsing.VarParsing.varType.int,
16 options.register(
'runInputDir',
18 VarParsing.VarParsing.multiplicity.singleton,
19 VarParsing.VarParsing.varType.string,
20 "Directory where the DQM files will appear.")
22 options.register(
'scanOnce',
24 VarParsing.VarParsing.multiplicity.singleton,
25 VarParsing.VarParsing.varType.bool,
26 "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'.")
28 options.register(
'skipFirstLumis',
30 VarParsing.VarParsing.multiplicity.singleton,
31 VarParsing.VarParsing.varType.bool,
32 "Skip (and ignore the minEventsPerLumi parameter) for the files which have been available at the begining of the processing. ")
36 options.register (
'runkey',
38 VarParsing.VarParsing.multiplicity.singleton,
39 VarParsing.VarParsing.varType.string,
42 options.parseArguments()
49 if not options.runkey.strip():
50 options.runkey =
'pp_run' 52 runType.setRunType(options.runkey.strip())
54 if not options.inputFiles:
56 nextLumiTimeoutMillis = 240000
61 nextLumiTimeoutMillis = 0
63 source = cms.Source(
"DQMStreamerReader",
64 runNumber = cms.untracked.uint32(options.runNumber),
65 runInputDir = cms.untracked.string(options.runInputDir),
66 SelectEvents = cms.untracked.vstring(
'*'),
67 streamLabel = cms.untracked.string(
'streamDQM'),
68 scanOnce = cms.untracked.bool(options.scanOnce),
69 minEventsPerLumi = cms.untracked.int32(1),
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 endOfRunKills = cms.untracked.bool(endOfRunKills),
77 print "The list of input files is provided. Disabling discovery and running on everything." 78 files =
map(
lambda x:
"file://" + x, options.inputFiles)
79 source = cms.Source(
"PoolSource",
80 fileNames = cms.untracked.vstring(files),
81 secondaryFileNames = cms.untracked.vstring()
91 print "Source:", source