14 from PyJobTransforms.trfArgs
import addAthenaArguments, addDetectorArguments
15 from PyJobTransforms.trfDecorators
import stdTrfExceptionHandler, sigUsrStackTrace
16 from RecJobTransforms.recTransformUtils
import addCommonRecTrfArgs, addStandardRecoFiles
20 from TrigTransform.trigRecoExe
import trigRecoExecutor
21 from TrigTransform.trigCostExe
import trigCostExecutor
22 from TrigTransform.trigRateExe
import trigRateExecutor
26 msg.info(
'logging set in %s', sys.argv[0])
28 @stdTrfExceptionHandler
32 msg.info(
'This is %s', sys.argv[0])
35 trf.parseCmdLineArgs(sys.argv[1:])
39 msg.info(
"%s stopped at %s, trf exit code %d", sys.argv[0], time.asctime(), trf.exitCode)
40 sys.exit(trf.exitCode)
48 executorSet.add(trigRecoExecutor(name =
'BSRDOtoRAW', skeletonFile =
'TriggerJobOpts/runHLT_standalone.py',
49 skeletonCA =
'TriggerJobOpts.runHLT',
50 exe =
'setsid athenaHLT.py',
52 substep =
'b2r', tryDropAndReload =
False,
53 inData = [
'BS_RDO',
'RDO'], outData = [
'BS',
'DRAW_TRIGCOST',
'HIST_HLTMON',
'HIST_DEBUGSTREAMMON'],
54 perfMonFile =
'ntuple_BSRDOtoRAW.pmon.gz',
55 literalRunargs = [
'writeBS = runArgs.writeBS',
56 'from AthenaCommon.AthenaCommonFlags import jobproperties as jps',
57 'jps.AthenaCommonFlags.FilesInput.set_Value_and_Lock(runArgs.inputBS_RDOFile)',
58 'jps.AthenaCommonFlags.EvtMax.set_Value_and_Lock(runArgs.maxEvents)',
59 'if hasattr(runArgs,\'skipEvents\'):',
60 ' jps.AthenaCommonFlags.SkipEvents.set_Value_and_Lock(runArgs.skipEvents)',
61 'if hasattr(runArgs,\'outputBSFile\'):',
62 ' jps.AthenaCommonFlags.BSRDOOutput.set_Value_and_Lock( runArgs.outputBSFile )']))
66 executorSet.add(trigCostExecutor(name =
'DRAWCOSTtoNTUPCOST',
67 exe =
'RunTrigCostAnalysis.py',
68 inData = [
'DRAW_TRIGCOST'], outData = [
'NTUP_TRIGCOST']))
72 executorSet.add(trigRateExecutor(name =
'AODtoNTUPRATE',
73 exe =
'RatesAnalysisFullMenu.py',
74 inData = [
'AOD'], outData = [
'NTUP_TRIGRATE']))
78 executorSet.add(athenaExecutor(name =
'RAWtoALL',
79 skeletonCA =
'RecJobTransforms.RAWtoALL_Skeleton',
80 substep =
'r2a', inData = [
'BS',
'RDO'],
81 outData = [
'ESD',
'AOD',
'HIST_R2A'],
82 perfMonFile =
'ntuple_RAWtoALL.pmon.gz'))
83 executorSet.add(DQMergeExecutor(name =
'DQHistogramMerge', inData = [
'HIST_R2A'], outData = [
'HIST']))
88 trf =
transform(executor = executorSet, description =
'Trigger transform to run HLT, followed by'
89 ' general purpose ATLAS reconstruction transform. Input to HLT is inputBS_RDOFile'
90 ' with outputs of RDO, ESD or AOD. For more details see:'
91 ' https://twiki.cern.ch/twiki/bin/viewauth/Atlas/TriggerTransform or for reco_tf, see:'
92 ' https://twiki.cern.ch/twiki/bin/viewauth/Atlas/RecoTf')
114 parser.defineArgGroup(
'Trigger',
'Specific options related to the trigger configuration used for reprocessing')
118 parser.add_argument(
'--writeBS', type=trfArgClasses.argFactory(trfArgClasses.argBool, runarg=
True),
119 help=
'Needed if running BSRDO to BS step in athena (default: True)', group=
'Trigger', default=trfArgClasses.argBool(
True, runarg=
True))
121 parser.add_argument(
'--inputBS_RDOFile', nargs=
'+',
122 type=trfArgClasses.argFactory(trfArgClasses.argBSFile, io=
'input', runarg=
True, type=
'bs'),
123 help=
'Input bytestream file', group=
'Trigger')
125 parser.add_argument(
'--outputBSFile', nargs=
'+',
126 type=trfArgClasses.argFactory(trfArgClasses.argBSFile, io=
'output', runarg=
True, type=
'bs'),
127 help=
'Output bytestream file', group=
'Trigger')
131 parser.add_argument(
'--streamSelection', nargs=
'+', type=trfArgClasses.argFactory(trfArgClasses.argList, runarg=
True),
132 help=
'select output streams in produced BS file (default: \"Main\"). Specify \"All\" to disable splitting (standard reco will fail on any events with only PEB data)', group=
'Trigger', default=trfArgClasses.argList(
"Main", runarg=
True))
134 parser.add_argument(
'--outputHIST_HLTMONFile', nargs=
'+',
135 type=trfArgClasses.argFactory(trfArgClasses.argHISTFile, io=
'output', runarg=
True, countable=
False),
136 help=
'Output HLTMON file', group=
'Trigger')
138 parser.add_argument(
'--triggerConfig', nargs=
'+', metavar=
'substep=TRIGGERCONFIG',
139 type=trfArgClasses.argFactory(trfArgClasses.argSubstep, runarg=
True, separator=
'='),
140 help=
'Trigger Configuration String. '
141 'N.B. This argument uses EQUALS (=) to separate the substep name from the value.', group=
'Trigger')
143 parser.add_argument(
'--precommand', nargs=
'+', type=trfArgClasses.argFactory(trfArgClasses.argList, runarg=
True),
144 help=
'precommand for athenaHLT aka -c', group=
'Trigger')
146 parser.add_argument(
'--postcommand', nargs=
'+', type=trfArgClasses.argFactory(trfArgClasses.argList, runarg=
True),
147 help=
'postcommand for athenaHLT aka -C', group=
'Trigger')
149 parser.add_argument(
'--prodSysBSRDO', type=trfArgClasses.argFactory(trfArgClasses.argBool, runarg=
True),
150 help=
'For prodsys to make sure uses inputBS_RDOFile rather than inputBSFile when running the b2r step', group=
'Trigger')
155 parser.defineArgGroup(
'TrigCost',
'Specific options related to the trigger cost and rates steps in trigger reprocessings')
158 parser.add_argument(
'--outputDRAW_TRIGCOSTFile', nargs=
'+',
159 type=trfArgClasses.argFactory(trfArgClasses.argBSFile, io=
'output', runarg=
True),
160 help=
'Output bytestream file of CostMonitoring stream', group=
'TrigCost')
162 parser.add_argument(
'--inputDRAW_TRIGCOSTFile', nargs=
'+',
163 type=trfArgClasses.argFactory(trfArgClasses.argBSFile, io=
'input', runarg=
True),
164 help=
'Input bytestream file of CostMonitoring stream', group=
'TrigCost')
166 parser.add_argument(
'--outputNTUP_TRIGCOSTFile', nargs=
'+',
167 type=trfArgClasses.argFactory(trfArgClasses.argHISTFile, io=
'output', runarg=
True, countable=
False),
168 help=
'D3PD output NTUP_TRIGCOST file', group=
'TrigCost')
170 parser.add_argument(
'--outputNTUP_TRIGRATEFile', nargs=
'+',
171 type=trfArgClasses.argFactory(trfArgClasses.argHISTFile, io=
'output', runarg=
True, countable=
False),
172 help=
'D3PD output NTUP_TRIGRATE file', group=
'TrigCost')
175 parser.add_argument(
'--costopts', nargs=
'+',
176 type=trfArgClasses.argFactory(trfArgClasses.argSubstepList, splitter=
' ', runarg=
False),
177 help=
'Extra options to pass to cost processing.', group=
'TrigCost')
180 parser.add_argument(
'--rateopts', nargs=
'+',
181 type=trfArgClasses.argFactory(trfArgClasses.argSubstepList, splitter=
' ', runarg=
False),
182 help=
'Extra options to pass to rates analysis.', group=
'TrigCost')
186 parser.defineArgGroup(
'TriggerDB',
'Specific options related to the trigger DB')
188 parser.add_argument(
'--useDB', type=trfArgClasses.argFactory(trfArgClasses.argBool, runarg=
True),
189 help=
'read from DB for athenaHLT aka use-database', group=
'TriggerDB')
190 parser.add_argument(
'--DBserver', type=trfArgClasses.argFactory(trfArgClasses.argString, runarg=
True),
191 help=
'DB name: aka athenaHLT db-server', group=
'TriggerDB')
192 parser.add_argument(
'--DBsmkey', type=trfArgClasses.argFactory(trfArgClasses.argString, runarg=
True),
193 help=
'DB SMK', group=
'TriggerDB')
194 parser.add_argument(
'--DBhltpskey', type=trfArgClasses.argFactory(trfArgClasses.argString, runarg=
True),
195 help=
'DB hltpskey', group=
'TriggerDB')
196 parser.add_argument(
'--DBl1pskey', type=trfArgClasses.argFactory(trfArgClasses.argString, runarg=
True),
197 help=
'DB l1pskey', group=
'TriggerDB')
202 parser.defineArgGroup(
'Debug',
'Specific options related to the trigger debug recovery')
204 parser.add_argument(
'--outputHIST_DEBUGSTREAMMONFile', nargs=
'+',
205 type=trfArgClasses.argFactory(trfArgClasses.argHISTFile, io=
'output', runarg=
True, countable=
False),
206 help=
'Output DEBUGSTREAMMON file', group=
'Debug')
209 if __name__ ==
'__main__':