5 from Configuration.PyReleaseValidation.MatrixReader
import MatrixReader
6 from Configuration.PyReleaseValidation.MatrixRunner
import MatrixRunner
7 from Configuration.PyReleaseValidation.MatrixInjector
import MatrixInjector,performInjectionOptionTest
14 mrd.showRaw(opt.useInput, opt.refRel, opt.fromScratch, opt.raw, opt.step1Only, selected=opt.testList)
23 mrd.prepare(opt.useInput, opt.refRel, opt.fromScratch)
27 mrd.show(opt.testList,opt.extended)
28 if opt.testList :
print 'testListected items:', opt.testList
31 ret = mRunnerHi.runTests(opt)
35 print 'Cannot go on with wmagent injection with failing workflows'
37 wfInjector =
MatrixInjector(opt,mode=opt.wmcontrol,options=opt.wmoptions)
38 ret= wfInjector.prepare(mrd,
47 if __name__ ==
'__main__':
61 'jetmc': [5.1, 13, 15, 25, 38, 39],
62 'metmc' : [5.1, 15, 25, 37, 38, 39],
63 'muonmc' : [5.1, 124.4, 124.5, 20, 21, 22, 23, 25, 30],
68 usage =
'usage: runTheMatrix.py --show -s '
70 parser = optparse.OptionParser(usage)
72 parser.add_option(
'-j',
'--nproc',
73 help=
'number of threads. 0 Will use 4 threads, not execute anything but create the wfs',
77 parser.add_option(
'-n',
'--showMatrix',
78 help=
'Only show the worflows. Use --ext to show more',
83 parser.add_option(
'-e',
'--extended',
84 help=
'Show details of workflows, used with --show',
89 parser.add_option(
'-s',
'--selected',
90 help=
'Run a pre-defined selected matrix of wf. Deprecated, please use -l limited',
95 parser.add_option(
'-l',
'--list',
96 help=
'Coma separated list of workflow to be shown or ran. Possible keys are also '+str(predefinedSet.keys())+
'. and wild card like muon, or mc',
100 parser.add_option(
'-r',
'--raw',
101 help=
'Temporary dump the .txt needed for prodAgent interface. To be discontinued soon. Argument must be the name of the set (standard, pileup,...)',
104 parser.add_option(
'-i',
'--useInput',
105 help=
'Use recyling where available. Either all, or a coma separated list of wf number.',
109 parser.add_option(
'-w',
'--what',
110 help=
'Specify the set to be used. Argument must be the name of the set (standard, pileup,...)',
114 parser.add_option(
'--step1',
115 help=
'Used with --raw. Limit the production to step1',
119 parser.add_option(
'--fromScratch',
120 help=
'Coma separated list of wf to be run without recycling. all is not supported as default.',
124 parser.add_option(
'--refRelease',
125 help=
'Allow to modify the recycling dataset version',
129 parser.add_option(
'--wmcontrol',
130 help=
'Create the workflows for injection to WMAgent. In the WORKING. -wmcontrol init will create the the workflows, -wmcontrol test will dryRun a test, -wmcontrol submit will submit to wmagent',
131 choices=[
'init',
'test',
'submit',
'force'],
135 parser.add_option(
'--revertDqmio',
136 help=
'When submitting workflows to wmcontrol, force DQM outout to use pool and not DQMIO',
137 choices=[
'yes',
'no'],
141 parser.add_option(
'--optionswm',
142 help=
'Specify a few things for wm injection',
145 parser.add_option(
'--keep',
146 help=
'allow to specify for which coma separated steps the output is needed',
148 parser.add_option(
'--label',
149 help=
'allow to give a special label to the output dataset name',
151 parser.add_option(
'--command',
152 help=
'provide a way to add additional command to all of the cmsDriver commands in the matrix',
156 parser.add_option(
'--apply',
157 help=
'allow to use the --command only for 1 coma separeated',
160 parser.add_option(
'--workflow',
161 help=
'define a workflow to be created or altered from the matrix',
166 parser.add_option(
'--dryRun',
167 help=
'do not run the wf at all',
172 parser.add_option(
'--noCafVeto',
173 help=
'Run from any source, ignoring the CAF label',
178 parser.add_option(
'--overWrite',
179 help=
'Change the content of a step for another. List of pairs.',
183 parser.add_option(
'--noRun',
184 help=
'Remove all run list selection from wfs',
191 opt,args = parser.parse_args()
193 print 'Deprecated, please use -l limited'
194 if opt.testList: opt.testList+=
',limited'
195 else: opt.testList=
'limited'
203 opt.apply=
map(stepOrIndex,opt.apply.split(
','))
205 opt.keep=
map(stepOrIndex,opt.keep.split(
','))
211 for entry
in opt.testList.split(
','):
212 if not entry:
continue
214 for k
in predefinedSet:
215 if k.lower().startswith(entry.lower())
or k.lower().endswith(entry.lower()):
216 testList.extend(predefinedSet[k])
221 testList.append(float(entry))
223 print entry,
'is not a possible selected entry'
225 opt.testList =
list(set(testList))
228 if opt.useInput: opt.useInput = opt.useInput.split(
',')
229 if opt.fromScratch: opt.fromScratch = opt.fromScratch.split(
',')
230 if opt.nThreads: opt.nThreads=int(opt.nThreads)
235 opt.overWrite=eval(opt.overWrite)
237 if opt.raw
and opt.show:
def performInjectionOptionTest
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run