1 from __future__
import print_function
2 from __future__
import absolute_import
3 from builtins
import range
5 import FWCore.ParameterSet.Config
as cms
8 import FWCore.ParameterSet.VarParsing
as VarParsing
9 from .dqmPythonTypes
import *
15 options.register (
'runkey',
17 VarParsing.VarParsing.multiplicity.singleton,
18 VarParsing.VarParsing.varType.string,
22 options.register(
'runUniqueKey',
24 VarParsing.VarParsing.multiplicity.singleton,
25 VarParsing.VarParsing.varType.string,
26 "Unique run key from RCMS for Frontier")
28 options.register(
'runNumber',
30 VarParsing.VarParsing.multiplicity.singleton,
31 VarParsing.VarParsing.varType.int,
32 "Run number. This run number has to be present in https://github.com/cms-data/DQM-Integration")
34 options.register(
'streamLabel',
36 VarParsing.VarParsing.multiplicity.singleton,
37 VarParsing.VarParsing.varType.string,
40 options.register(
'noDB',
42 VarParsing.VarParsing.multiplicity.singleton,
43 VarParsing.VarParsing.varType.bool,
44 "Don't upload the BeamSpot conditions to the DB")
46 options.register(
'scanOnce',
48 VarParsing.VarParsing.multiplicity.singleton,
49 VarParsing.VarParsing.varType.bool,
50 "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'.")
52 options.register(
'skipFirstLumis',
54 VarParsing.VarParsing.multiplicity.singleton,
55 VarParsing.VarParsing.varType.bool,
56 "Skip (and ignore the minEventsPerLumi parameter) for the files which have been available at the begining of the processing. ")
58 options.register(
'BeamSplashRun',
60 VarParsing.VarParsing.multiplicity.singleton,
61 VarParsing.VarParsing.varType.bool,
62 "Set client source settings for beam SPLASH run")
66 options.register(
'unitTest',
68 VarParsing.VarParsing.multiplicity.singleton,
69 VarParsing.VarParsing.varType.bool,
70 "Required to avoid the error.")
72 options.parseArguments()
75 dqm_integration_data = [os.path.join(dir,
'DQM/Integration/data')
for dir
in os.getenv(
'CMSSW_SEARCH_PATH',
'').
split(
":")
if os.path.exists(os.path.join(dir,
'DQM/Integration/data'))][0]
76 print(
"Reading streamer files from:\n ", dqm_integration_data)
79 source = cms.Source(
"DQMStreamerReader",
80 runNumber = cms.untracked.uint32(options.runNumber),
81 runInputDir = cms.untracked.string(dqm_integration_data),
82 SelectEvents = cms.untracked.vstring(
'*'),
83 streamLabel = cms.untracked.string(options.streamLabel),
84 scanOnce = cms.untracked.bool(options.scanOnce),
85 minEventsPerLumi = cms.untracked.int32(1000),
86 delayMillis = cms.untracked.uint32(500),
87 nextLumiTimeoutMillis = cms.untracked.int32(0),
88 skipFirstLumis = cms.untracked.bool(options.skipFirstLumis),
89 deleteDatFiles = cms.untracked.bool(
False),
90 endOfRunKills = cms.untracked.bool(
False),
91 inputFileTransitionsEachEvent = cms.untracked.bool(
False)
94 maxEvents = cms.untracked.PSet(
95 input = cms.untracked.int32(-1)
99 if not options.runkey.strip():
100 options.runkey =
"pp_run" 102 runType.setRunType(options.runkey.strip())
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
def split(sequence, size)