Skip to content

Commit

Permalink
Modularise sim WF
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Benedikt Volkel committed Aug 8, 2022
1 parent dc72622 commit 72f93fc
Show file tree
Hide file tree
Showing 2 changed files with 404 additions and 266 deletions.
6 changes: 3 additions & 3 deletions MC/bin/o2dpg_qc_finalization_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ def include_all_QC_finalization(ntimeframes, standalone, run, productionTag):
def add_QC_finalization(taskName, qcConfigPath, needs=None):
if standalone == True:
needs = []
elif needs == None:
needs = [taskName + '_local' + str(tf) for tf in range(1, ntimeframes + 1)]
elif needs is None:
needs = [taskName + f'_local_{tf}' for tf in range(1, ntimeframes + 1)]

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

0 comments on commit 72f93fc

Please sign in to comment.