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(
'datafnPosition',
36 VarParsing.VarParsing.multiplicity.singleton,
37 VarParsing.VarParsing.varType.int,
38 "Data filename position in the positional arguments array 'data' in json file.")
40 options.register(
'streamLabel',
42 VarParsing.VarParsing.multiplicity.singleton,
43 VarParsing.VarParsing.varType.string,
46 options.register(
'noDB',
48 VarParsing.VarParsing.multiplicity.singleton,
49 VarParsing.VarParsing.varType.bool,
50 "Don't upload the BeamSpot conditions to the DB")
52 options.register(
'scanOnce',
54 VarParsing.VarParsing.multiplicity.singleton,
55 VarParsing.VarParsing.varType.bool,
56 "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'.")
58 options.register(
'skipFirstLumis',
60 VarParsing.VarParsing.multiplicity.singleton,
61 VarParsing.VarParsing.varType.bool,
62 "Skip (and ignore the minEventsPerLumi parameter) for the files which have been available at the beginning of the processing.")
64 options.register(
'BeamSplashRun',
66 VarParsing.VarParsing.multiplicity.singleton,
67 VarParsing.VarParsing.varType.bool,
68 "Set client source settings for beam SPLASH run")
72 options.register(
'unitTest',
74 VarParsing.VarParsing.multiplicity.singleton,
75 VarParsing.VarParsing.varType.bool,
76 "Required to avoid the error.")
78 options.parseArguments()
81 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]
82 print(
"Reading streamer files from:\n ", dqm_integration_data)
85 source = cms.Source(
"DQMStreamerReader",
86 runNumber = cms.untracked.uint32(options.runNumber),
87 runInputDir = cms.untracked.string(dqm_integration_data),
88 SelectEvents = cms.untracked.vstring(
'*'),
89 streamLabel = cms.untracked.string(options.streamLabel),
90 scanOnce = cms.untracked.bool(options.scanOnce),
91 datafnPosition = cms.untracked.uint32(options.datafnPosition),
92 minEventsPerLumi = cms.untracked.int32(1000),
93 delayMillis = cms.untracked.uint32(500),
94 nextLumiTimeoutMillis = cms.untracked.int32(0),
95 skipFirstLumis = cms.untracked.bool(options.skipFirstLumis),
96 deleteDatFiles = cms.untracked.bool(
False),
97 endOfRunKills = cms.untracked.bool(
False),
98 inputFileTransitionsEachEvent = cms.untracked.bool(
False)
101 maxEvents = cms.untracked.PSet(
102 input = cms.untracked.int32(-1)
106 if not options.runkey.strip():
107 options.runkey =
"pp_run" 109 runType.setRunType(options.runkey.strip())
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
def split(sequence, size)