17 import FWCore.ParameterSet.Config
as cms
18 import FWCore.ParameterSet.VarParsing
as VarParsing
24 options.register (
'ntuple',
"", VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.string,
"The output ntuple file name")
25 options.register (
'menu',
"", VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.string,
"Override the L1 menu with specified XML file")
26 options.register (
'skip',
"", VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.int,
"The number of events to skip initially")
32 options.parseArguments()
34 if (
not options.menu ==
""):
35 print "L1T INFO: menu override in command line not yet implemented..." 37 if (
not options.ntuple ==
""):
38 print "L1T INFO: using command line option ntuple: ", options.ntuple
39 if (hasattr(process,
"TFileService")):
40 process.TFileService.fileName = cms.string(options.ntuple)
43 if (hasattr(process,
"maxEvents")):
44 print "L1T INFO: using command line option maxEvents: ", options.maxEvents
45 process.maxEvents.input = options.maxEvents
48 if (hasattr(process,
"source")):
50 print "L1T INFO: using command line option skip: ", options.skip
51 process.source.skipEvents = cms.untracked.uint32(options.skip)
52 if (
not options.inputFiles == []):
53 print "L1T INFO: using command line option inputFiles: ", options.inputFiles
54 process.source.fileNames = cms.untracked.vstring(options.inputFiles)