9 import Configuration.Applications
10 from Configuration.Applications.ConfigBuilder
import ConfigBuilder, defaultOptions
14 """%prog <TYPE> [options].
17 %prog reco -s RAW2DIGI,RECO --conditions STARTUP_V4::All --eventcontent RECOSIM
19 parser = optparse.OptionParser(usage)
21 expertSettings = optparse.OptionGroup(parser,
'===============\n Expert Options',
'Caution: please use only if you know what you are doing.')
22 famosSettings = optparse.OptionGroup(parser,
'===============\n FastSimulation options',
'')
23 parser.add_option_group(expertSettings)
26 parser.add_option(
"-s",
"--step",
27 help=
"The desired step. The possible values are: "+\
28 "GEN,SIM,DIGI,L1,DIGI2RAW,HLT,RAW2DIGI,RECO,POSTRECO,DQM,ALCA,VALIDATION,HARVESTING, NONE or ALL.",
32 parser.add_option(
"--conditions",
33 help=
"What conditions to use. This has to be specified",
37 parser.add_option(
"--useCondDBv1",
38 help=
"use conditions DB V1",
43 parser.add_option(
"--eventcontent",
44 help=
"What event content to write out. Default=FEVTDEBUG, or FEVT (for cosmics)",
48 parser.add_option(
"--filein",
49 help=
"The infile name.",
53 parser.add_option(
"--fileout",
54 help=
"The outfile name. If absent a default value is assigned",
58 parser.add_option(
"--filetype",
59 help=
"The type of the infile (EDM, LHE or MCDB).",
60 default=defaultOptions.filetype,
62 choices=[
'EDM',
'DAT',
'LHE',
'MDCB',
'DQM',
'DQMDAQ']
65 parser.add_option(
"-n",
"--number",
66 help=
"The number of events. The default is 1.",
69 parser.add_option(
"-o",
"--number_out",
70 help=
"The number of events in output. The default is not set",
74 parser.add_option(
"--mc",
75 help=
"Specify that simulation is to be processed (default = guess based on options",
80 parser.add_option(
"--data",
81 help=
"Specify that data is to be processed (default = guess based on options",
87 parser.add_option(
"--no_exec",
88 help=
"Do not exec cmsRun. Just prepare the python config file.",
92 parser.add_option(
"--fast",
93 help=
"Specify that the configuration is for FASTSIM",
97 parser.add_option(
"--runsAndWeightsForMC",
98 help=
"Assign run numbers to MC source according to relatieve weights. [(run1,weight1),...,(runN,weightN)])",
100 dest=
"runsAndWeightsForMC")
102 parser.add_option(
"--runsScenarioForMC",
103 help=
"Load a scenario to set run numbers in MC.)",
105 dest=
"runsScenarioForMC")
107 parser.add_option(
"--runUnscheduled",
108 help=
"Enable unscheduled mode",
111 dest=
"runUnscheduled")
114 expertSettings.add_option(
"--beamspot",
115 help=
"What beam spot to use (from Configuration/StandardSequences). Default depends on scenario",
119 expertSettings.add_option(
"--customise",
120 help=
"Specify the file where the code to modify the process object is stored.",
123 dest=
"customisation_file")
124 expertSettings.add_option(
"--customise_unsch",
125 help=
"Specify the file where the code to modify the process object is stored.",
128 dest=
"customisation_file_unsch")
129 expertSettings.add_option(
"--customise_commands",
130 help=
"Specify a string of commands",
132 dest=
"customise_commands")
134 expertSettings.add_option(
"--inline_custom",
135 help=
"inline the customisation file",
138 dest=
"inline_custom")
140 expertSettings.add_option(
"--datatier",
141 help=
"What data tier to use.",
145 expertSettings.add_option(
"--dirin",
146 help=
"The infile directory.",
150 expertSettings.add_option(
"--dirout",
151 help=
"The outfile directory.",
155 expertSettings.add_option(
"--filtername",
156 help=
"What filter name to specify in output module",
160 expertSettings.add_option(
"--geometry",
161 help=
"What simulation geometry to use. Default="+defaultOptions.geometry+
". Coma separated SimGeometry,RecoGeometry is supported.",
162 default=defaultOptions.geometry,
165 expertSettings.add_option(
"--magField",
166 help=
"What magnetic field to use (from Configuration/StandardSequences).",
167 default=defaultOptions.magField,
170 expertSettings.add_option(
"--no_output",
171 help=
"Do not write anything to disk. This is for "+\
172 "benchmarking purposes.",
175 dest=
"no_output_flag")
177 expertSettings.add_option(
"--prefix",
178 help=
"Specify a prefix to the cmsRun command.",
182 expertSettings.add_option(
"--suffix",
183 help=
"Specify a suffix to the cmsRun command.",
187 expertSettings.add_option(
"--relval",
188 help=
"Set total number of events and events per job.",
192 expertSettings.add_option(
"--dump_python",
193 help=
"Dump the config file in python "+\
194 "and do a full expansion of imports.",
199 expertSettings.add_option(
"--pileup",
200 help=
"What pileup config to use. Default="+defaultOptions.pileup,
201 default=defaultOptions.pileup,
204 expertSettings.add_option(
"--pileup_input",
205 help=
"define the pile up files to mix with",
209 expertSettings.add_option(
"--pileup_dasoption",
210 help=
"Additional option for DAS query of pile up",
212 dest=
"pileup_dasoption")
214 expertSettings.add_option(
"--datamix",
215 help=
"What datamix config to use. Default=DataOnSim.",
216 default=defaultOptions.datamix,
219 expertSettings.add_option(
"--gflash",
220 help=
"Run the FULL SIM using the GFlash parameterization.",
222 default=defaultOptions.gflash,
225 expertSettings.add_option(
"--python_filename",
226 help=
"Change the name of the created config file ",
228 dest=
"python_filename")
230 expertSettings.add_option(
"--secondfilein",
231 help=
"The secondary infile name."+\
232 "for the two-file solution. Default is no file",
236 expertSettings.add_option(
"--processName",
237 help=
"set process name explicitly",
242 expertSettings.add_option(
"--triggerResultsProcess",
243 help=
"for splitting jobs specify from which process to take edm::TriggerResults",
245 dest=
"triggerResultsProcess"
248 expertSettings.add_option(
"--hltProcess",
249 help=
"modify the DQM sequence to look for HLT trigger results with the specified process name",
254 expertSettings.add_option(
"--scenario",
255 help=
"Select scenario overriding standard settings (available:"+str(defaultOptions.scenarioOptions)+
")",
258 choices=defaultOptions.scenarioOptions)
260 expertSettings.add_option(
"--harvesting",
261 help=
"What harvesting to use (from Configuration/StandardSequences). Default=AtRunEnd",
262 default=defaultOptions.harvesting,
265 expertSettings.add_option(
"--particle_table",
266 help=
"Which particle properties table is loaded. Default=pythia",
267 default=defaultOptions.particleTable,
268 dest=
"particleTable")
270 expertSettings.add_option(
"--dasquery",
271 help=
"Allow to define the source.fileNames from the das search command",
275 expertSettings.add_option(
"--dasoption",
276 help=
"Additional option for DAS query",
280 expertSettings.add_option(
"--dbsquery",
281 help=
"Deprecated. Please use dasquery option. Functions for backward compatibility",
285 expertSettings.add_option(
"--lazy_download",
286 help=
"Enable lazy downloading of input files",
289 dest=
"lazy_download")
291 expertSettings.add_option(
"--repacked",
292 help=
"When the input file is a file with repacked raw data with label rawDataRepacker",
298 expertSettings.add_option(
"--custom_conditions",
299 help=
"Allow to give a few overriding tags for the GT",
301 dest=
'custom_conditions')
303 expertSettings.add_option(
"--inline_eventcontent",
304 help=
"expand event content definitions",
307 dest=
"inlineEventContent")
310 expertSettings.add_option(
"--inline_object",
311 help=
"expand explicitely the definition of a list of objects",
315 expertSettings.add_option(
"--hideGen",
316 help=
"do not inline the generator information, just load it",
319 expertSettings.add_option(
"--output",
320 help=
"specify the list of output modules using dict",
322 dest=
"outputDefinition")
324 expertSettings.add_option(
"--inputCommands",
325 help=
"specify the input commands; i.e dropping products",
327 dest=
"inputCommands")
328 expertSettings.add_option(
"--outputCommands",
329 help=
"specify the extra output commands;",
331 dest=
"outputCommands")
333 expertSettings.add_option(
"--inputEventContent",
334 help=
"specify the input event content",
335 default=defaultOptions.inputEventContent,
336 dest=
"inputEventContent")
338 expertSettings.add_option(
"--dropDescendant",
339 help=
"allow to drop descendant on input",
340 default=defaultOptions.dropDescendant,
343 expertSettings.add_option(
"--donotDropOnInput",
344 help=
"when using reSTEP, prevent the automatic product dropping on input",
345 default=defaultOptions.donotDropOnInput
348 expertSettings.add_option(
"--restoreRNDSeeds",
349 help=
"restore the random number engine state",
352 threeValued.append( (
'--restoreRNDSeeds',
True) )
354 expertSettings.add_option(
"--slhc",
355 help=
"Specify the SLHC scenario version",
359 expertSettings.add_option(
"--era",
360 help=
"Specify which era to use (e.g. \"run2\")",
364 expertSettings.add_option(
"--evt_type",
365 help=
"specify the gen fragment",
369 expertSettings.add_option(
"--profile",
370 help=
"add the IgprofService with the parameter provided PROFILER:START:STEP:PEREVENOUTPUTFORMAT:ENDOFJOBOUTPUTFORMAT",
374 expertSettings.add_option(
"--io",
375 help=
"Create a json file with io informations",
379 expertSettings.add_option(
"--lumiToProcess",
380 help=
"specify a certification json file in input to run on certified data",
385 expertSettings.add_option(
"--timeoutOutput",
386 help=
"use a TimeoutPoolOutputModule instead of a PoolOutputModule (needed for evt. display)",
391 expertSettings.add_option(
"--nThreads",
392 help=
"How many threads should CMSSW use (default is 1)",