Collecting histograms
Keep the small files every job produces alongside its data, such as monitoring histograms, and merge them into one per transformation. There are two ways, and they combine.
In every case the reconstruction job declares the histogram as a step output, so that it is registered and can travel an edge. Files kept through the output sandbox patterns are not registered and cannot be consumed by anything.
The workgraph
A compute transformation consumes the histogram output along an edge and merges many into one, like any merge. It scales to any number of jobs and runs while the workgraph runs.
The histograms are collected as a workgraph output, and a finalizing action bound to the reconstruction merges them once it has drained. It needs no extra transformation but runs once, at the end, over everything.
The merge step reduces the count while the workgraph runs, and the finalizing action merges the merge step's outputs into one.
The document
CWL document (placeholder)
The document form is pending the dirac: hint schema of DX-ADR-007. This pattern needs:
- the histogram declared as an output of the reconstruction step's tool, alongside the data output, and not only as an output-sandbox pattern;
- for the merge step, a step whose input sources the histogram output, with its own
dirac:Transformationhint; - for the finalizing action, the histogram output declared as a workflow output and the merging action in the reconstruction's finalizing list;
- for both, the merge step's output declared as a workflow output and the action bound to the merge step.
What happens
- Every reconstruction parcel that reaches
Donerecords its data files under the data output and its histogram under the histogram output, from which the merge, the histogram merge or the workgraph output collects them. - With a merge step, the histogram merge's edge feeder picks the histograms up and its packer groups them, and it drains with the rest of the chain.
- With a finalizing action, the histograms accumulate until the workgraph moves to
Finalizing. The action runs in the reconstruction's list, in DAG order, merges the collected files, and recordsPassed. If it fails, the transformation moves toFinalizingBlockedfor an operator. - With both, the action runs in the histogram merge's list, after its producer has been finalised.
See also
- Basic simulation: the LHCb simulation merges its GAUSSHIST, BOOLEHIST and MOOREHIST files by finalizing actions.