19def getOption(runArgs, name, substep, first, output):
20
21
22 option = {}
23
24
25 tfToAthenaHLT = {}
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'
36
38
39
40
41
42 if 'outputBSFile' in runArgs:
43 option['save-output'] = runArgs['outputBSFile'].value[0]
44 elif 'BS' in output:
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"
49 else:
50 msg.warning('No BS filename defined, athenaHLT will not save the output')
51
52
54 athenaMT, athenaConcurrentEvents = detectAthenaMTThreads(runArgs, name, False)
55
56 if athenaMT != 0:
57 option['threads'] = athenaMT
58 if athenaConcurrentEvents != 0:
59 option['concurrent-events'] = athenaConcurrentEvents
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75 for k
in set(tfToAthenaHLT) &
set(runArgs):
76 v = runArgs[k]
77
80 if isinstance(v, trfArgClasses.argSubstep):
81 myValue = v.returnMyValue(name, substep, first)
82 if myValue is not None:
83 option[tfToAthenaHLT[k]] = myValue
84 else:
85
86 option[tfToAthenaHLT[k]] = v.value
87
88
89
90 if tfToAthenaHLT['maxEvents'] not in option:
91 option[tfToAthenaHLT['maxEvents']] = -1
92 msg.info('maxEvents not defined, explicitly set to -1')
93
94
95
96
97 return option
98
99
100