2 from FWCore.ParameterSet.VarParsing
import VarParsing
4 options = VarParsing (
'analysis')
7 options.register (
'eventsToProcess',
9 VarParsing.multiplicity.list,
10 VarParsing.varType.string,
12 options.register (
'maxSize',
14 VarParsing.multiplicity.singleton,
15 VarParsing.varType.int,
16 "Maximum (suggested) file size (in Kb)")
17 options.parseArguments()
19 process = cms.Process(
"PickEvent")
20 process.source = cms.Source (
"PoolSource",
21 fileNames = cms.untracked.vstring (options.inputFiles),
24 if options.eventsToProcess:
25 process.source.eventsToProcess = \
26 cms.untracked.VEventRange (options.eventsToProcess)
29 process.maxEvents = cms.untracked.PSet(
30 input = cms.untracked.int32 (options.maxEvents)
34 process.Out = cms.OutputModule(
"PoolOutputModule",
35 fileName = cms.untracked.string (options.outputFile)
39 process.Out.maxSize = cms.untracked.int32 (options.maxSize)
41 process.end = cms.EndPath(process.Out)