215 def __init__(self, ID: str, run: WorkflowRun, type: WorkflowType, steps: List[str], setup: TestSetup, extra_args: str = "") -> None:
216 test_def = ID.split("_")
217 data_type = test_def[0].lower()
218 formats = [format.upper() for format in test_def[1:-1]]
219
220 threads = 0
221 if setup.custom_threads is not None:
222 threads = setup.custom_threads
223
224 if "maxEvents" not in extra_args:
225 base_events = 100
226 events = threads * base_events + 1
227 flush = 80
228
229 extra_args += f" --maxEvents {events}"
230 format_flush = ", ".join([f"\"DAOD_{format}\": {flush}" for format in formats])
231 extra_args += f" --preExec 'flags.Output.TreeAutoFlush={{{format_flush}}}'"
232
233 if "inputAODFile" not in extra_args:
234 extra_args += f" --inputAODFile {input_AOD[run][data_type]}"
235
236
237 self.command = \
238 (f"ATHENA_CORE_NUMBER={threads} Derivation_tf.py"
239 f" --formats {' '.join(formats)}"
240 " --multiprocess --multithreadedFileValidation True"
241 " --athenaMPMergeTargetSize 'DAOD_*:0'"
242 " --sharedWriter True"
243 " --outputDAODFile myOutput.pool.root"
244 f" --imf False {extra_args}")
245
246
247 self.skip_performance_checks = True
248
249 self.output_checks = []
250 for format in formats:
251 self.output_checks.append(FrozenTier0PolicyCheck(setup, f"DAOD_{format}", 10))
252 self.output_checks.append(MetadataCheck(setup, f"DAOD_{format}"))
253
254 super().__init__(ID, run, type, steps, setup)
255