1 import FWCore.ParameterSet.Config
as cms
2 import FWCore.ParameterSet.VarParsing
as VarParsing
6 options.register(
'runNumber',
8 VarParsing.VarParsing.multiplicity.singleton,
9 VarParsing.VarParsing.varType.int,
12 options.register(
'datafnPosition',
14 VarParsing.VarParsing.multiplicity.singleton,
15 VarParsing.VarParsing.varType.int,
16 "Data filename position in the positional arguments array 'data' in json file.")
18 options.register(
'runInputDir',
19 '/build1/micius/OnlineDQM_sample/',
20 VarParsing.VarParsing.multiplicity.singleton,
21 VarParsing.VarParsing.varType.string,
22 "Directory where the DQM files will appear.")
24 options.register(
'streamLabel',
26 VarParsing.VarParsing.multiplicity.singleton,
27 VarParsing.VarParsing.varType.string,
28 "Stream label used in json discovery.")
30 options.register(
'scanOnce',
32 VarParsing.VarParsing.multiplicity.singleton,
33 VarParsing.VarParsing.varType.bool,
34 "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'.")
36 options.register(
'minEventsPerLumi',
38 VarParsing.VarParsing.multiplicity.singleton,
39 VarParsing.VarParsing.varType.int,
40 "Minimum number of events to process per lumisection.")
42 options.register(
'delayMillis',
44 VarParsing.VarParsing.multiplicity.singleton,
45 VarParsing.VarParsing.varType.int,
46 "Number of milliseconds to wait between file checks.")
48 options.register(
'nextLumiTimeoutMillis',
50 VarParsing.VarParsing.multiplicity.singleton,
51 VarParsing.VarParsing.varType.int,
52 "Number of milliseconds to wait before switching to the next lumi section if the current is missing, -1 to disable.")
54 options.register(
'skipFirstLumis',
56 VarParsing.VarParsing.multiplicity.singleton,
57 VarParsing.VarParsing.varType.bool,
58 "Skip (and ignore the minEventsPerLumi parameter) for the files which have been available at the begining of the processing. ")
60 options.register(
'deleteDatFiles',
62 VarParsing.VarParsing.multiplicity.singleton,
63 VarParsing.VarParsing.varType.bool,
64 "Delete data files after they have been closed, in order to save disk space.")
66 options.register(
'endOfRunKills',
68 VarParsing.VarParsing.multiplicity.singleton,
69 VarParsing.VarParsing.varType.bool,
70 "Kill the processing as soon as the end-of-run file appears, even if there are/will be unprocessed lumisections.")
72 options.register(
'endOfRunKills',
74 VarParsing.VarParsing.multiplicity.singleton,
75 VarParsing.VarParsing.varType.bool,
76 "Kill the processing as soon as the end-of-run file appears, even if there are/will be unprocessed lumisections.")
80 options.parseArguments()
83 DQMStreamerReader = cms.Source(
"DQMStreamerReader",
85 runNumber = cms.untracked.uint32(options.runNumber),
86 runInputDir = cms.untracked.string(options.runInputDir),
87 streamLabel = cms.untracked.string(options.streamLabel),
88 scanOnce = cms.untracked.bool(options.scanOnce),
89 datafnPosition = cms.untracked.uint32(options.datafnPosition),
90 delayMillis = cms.untracked.uint32(options.delayMillis),
91 nextLumiTimeoutMillis = cms.untracked.int32(options.nextLumiTimeoutMillis),
93 SelectEvents = cms.untracked.vstring(
"*"),
94 minEventsPerLumi = cms.untracked.int32(options.minEventsPerLumi),
95 skipFirstLumis = cms.untracked.bool(options.skipFirstLumis),
96 deleteDatFiles = cms.untracked.bool(options.deleteDatFiles),
97 endOfRunKills = cms.untracked.bool(options.endOfRunKills),