1 from __future__
import print_function
18 import FWCore.ParameterSet.Config
as cms
19 import FWCore.ParameterSet.VarParsing
as VarParsing
25 options.register (
'ntuple',
"", VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.string,
"The output ntuple file name")
26 options.register (
'menu',
"", VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.string,
"Override the L1 menu with specified XML file")
27 options.register (
'skip',
"", VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.int,
"The number of events to skip initially")
33 options.parseArguments()
35 if (
not options.menu ==
""):
36 print(
"L1T INFO: menu override in command line not yet implemented...")
38 if (
not options.ntuple ==
""):
39 print(
"L1T INFO: using command line option ntuple: ", options.ntuple)
40 if (hasattr(process,
"TFileService")):
41 process.TFileService.fileName = cms.string(options.ntuple)
44 if (hasattr(process,
"maxEvents")):
45 print(
"L1T INFO: using command line option maxEvents: ", options.maxEvents)
46 process.maxEvents.input = options.maxEvents
49 if (hasattr(process,
"source")):
51 print(
"L1T INFO: using command line option skip: ", options.skip)
52 process.source.skipEvents = cms.untracked.uint32(options.skip)
53 if (
not options.inputFiles == []):
54 print(
"L1T INFO: using command line option inputFiles: ", options.inputFiles)
55 process.source.fileNames = cms.untracked.vstring(options.inputFiles)
S & print(S &os, JobReport::InputFile const &f)