Skip to content

Commit 906a188

Browse files
author
Benedikt Volkel
committed
Modularise sim WF
* add o2dpg_sim_workflow_evolution.py providing several modularisation features * possible to select modules to be simulated using --modules * possible to select detectors to be read out using --readout-detectors * tasks requiring inactive detectors are not added * allows for transport only using specified detectors/passive modules * digi, reco and match introduced as logical steps * consrtuct e.g. a digit task with add_digi_task specify detector, task name constructed automatically * get dependency e.g. with get_digit_need * automatic construction of source strings (e.g. used for vertexing commands or aod producer) this again returns a string only including of sources actually present based on reco and match tasks that have been successfully added * still possible to construct any task explicitly with name, needs etc as before * some tasks adjusted to their minimal dependencies * small adjustments in o2dpg_qc_finalization_workflow.py to have same "<taskname>_<timeframe>" format of tasknames per timeframe
1 parent 7ee6218 commit 906a188

File tree

2 files changed

+1295
-3
lines changed

2 files changed

+1295
-3
lines changed

MC/bin/o2dpg_qc_finalization_workflow.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ def include_all_QC_finalization(ntimeframes, standalone, run, productionTag):
4444
def add_QC_finalization(taskName, qcConfigPath, needs=None):
4545
if standalone == True:
4646
needs = []
47-
elif needs == None:
48-
needs = [taskName + '_local' + str(tf) for tf in range(1, ntimeframes + 1)]
47+
elif needs is None:
48+
needs = [taskName + f'_local_{tf}' for tf in range(1, ntimeframes + 1)]
4949

5050
task = createTask(name=QC_finalize_name(taskName), needs=needs, cwd=qcdir, lab=["QC"], cpu=1, mem='2000')
5151
task['cmd'] = f'o2-qc --config {qcConfigPath} --remote-batch {taskName}.root' + \
@@ -74,7 +74,7 @@ def add_QC_postprocessing(taskName, qcConfigPath, needs, runSpecific, prodSpecif
7474
## The list of remote-batch workflows (reading the merged QC tasks results, applying Checks, uploading them to QCDB)
7575
MFTDigitsQCneeds = []
7676
for flp in range(5):
77-
MFTDigitsQCneeds.extend(['mftDigitsQC'+str(flp)+'_local'+str(tf) for tf in range(1, ntimeframes + 1)])
77+
MFTDigitsQCneeds.extend([f'mftDigitsQC{flp}_local_{tf}' for tf in range(1, ntimeframes + 1)])
7878
add_QC_finalization('mftDigitsQC', 'json://${O2DPG_ROOT}/MC/config/QC/json/qc-mft-digit-0.json', MFTDigitsQCneeds)
7979
add_QC_finalization('mftClustersQC', 'json://${O2DPG_ROOT}/MC/config/QC/json/qc-mft-cluster.json')
8080
add_QC_finalization('mftAsyncQC', 'json://${O2DPG_ROOT}/MC/config/QC/json/qc-mft-async.json')

0 commit comments

Comments
 (0)