16 msg = logging.getLogger(
"PyJobTransforms." + __name__)
19 def getOption(runArgs, name, substep, first, output):
26 tfToAthenaHLT[
'inputBS_RDOFile'] =
'file'
27 tfToAthenaHLT[
'maxEvents'] =
'number-of-events'
28 tfToAthenaHLT[
'skipEvents'] =
'skip-events'
29 tfToAthenaHLT[
'precommand'] =
'precommand'
30 tfToAthenaHLT[
'postcommand'] =
'postcommand'
31 tfToAthenaHLT[
'useDB'] =
'use-database'
32 tfToAthenaHLT[
'DBserver'] =
'db-server'
33 tfToAthenaHLT[
'DBsmkey'] =
'smk'
34 tfToAthenaHLT[
'DBhltpskey'] =
'hltpsk'
35 tfToAthenaHLT[
'DBl1pskey'] =
'l1psk'
42 if 'outputBSFile' in runArgs:
43 option[
'save-output'] = runArgs[
'outputBSFile'].value[0]
45 option[
'save-output'] = output[
'BS'].value[0]
46 elif 'DRAW_TRIGCOST' in output
or 'HIST_DEBUGSTREAMMON' in output:
47 msg.info(
'BS output needed, but not defined. Saving as temp.BS, but not avaialable to other steps')
48 option[
'save-output'] =
"temp.BS"
50 msg.warning(
'No BS filename defined, athenaHLT will not save the output')
66 for k
in set(tfToAthenaHLT) &
set(runArgs):
72 myValue = v.returnMyValue(name, substep, first)
73 if myValue
is not None:
74 option[tfToAthenaHLT[k]] = myValue
77 option[tfToAthenaHLT[k]] = v.value
81 if tfToAthenaHLT[
'maxEvents']
not in option:
82 option[tfToAthenaHLT[
'maxEvents']] = -1
83 msg.info(
'maxEvents not defined, explicitly set to -1')
93 option =
getOption(runArgs, name, substep, first, output)
94 msg.info(
'Options set to: \"%s\":', option)
96 for k, v
in option.items():
100 optionList.append(item.format(k, f))
104 optionList.append(item.format(k, v))
107 if '--use-database=True' in optionList:
108 optionList.remove(
'--use-database=True')
109 optionList.append(
'--use-database')