-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathcmsRunWrapper.py
More file actions
24 lines (19 loc) · 1012 Bytes
/
cmsRunWrapper.py
File metadata and controls
24 lines (19 loc) · 1012 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Crab wrapper.
from wrapperBase import defineCommonArguments, setCommonParametersFromOptions, checkOutputs, createProcess, writePSet
import FWCore.ParameterSet.Config as cms
from FWCore.ParameterSet.VarParsing import VarParsing
options = defineCommonArguments()
options.register('cmsRunCfg', '', VarParsing.multiplicity.singleton, VarParsing.varType.string,
"Path to the cmsRun python configuration file.")
options.register('cmsRunOptions', '', VarParsing.multiplicity.singleton, VarParsing.varType.string,
"Comma separated list of options that should be passed to cmsRun.")
options.parseArguments()
checkOutputs(options.output)
process = createProcess('cmsRun', options)
process.exParams = cms.untracked.PSet(
cmsRunCfg = cms.untracked.string(options.cmsRunCfg),
cmsRunOptions = cms.untracked.string(options.cmsRunOptions),
jobModule = cms.untracked.string('crabJob_cmsRun.py'),
)
setCommonParametersFromOptions(process.exParams, options)
writePSet(process, options)