Skip to content

Commit 670d1f7

Browse files
jackal1-66sawenzel
authored andcommitted
Skip combined device creation for empty spec list in DigitizerWorkflow
With --combine-devices, specCombiner() is called unconditionally for digitizerSpecs and for writerSpecs, but when a collection is empty the result is a combined device with no sub-tasks: DPL sees a device with no inputs, injects a Lifetime::Enumeration input (WorkflowHelpers.cxx) and can elect it as the CCDB/DISTSUBTIMEFRAME source. No digits are produced, and since the enumeration is unbounded there is no EOS either, meaning that the workflow hangs forever instead of failing. This is reached with --onlyDet FT0,CTP, where the FT0 digitizer and the CTP digitizer are pushed to specs directly and only the FT0 digit writer goes to writerSpecs, leaving digitizerSpecs empty. In anchored MC that is the detector group of any run taken without both FV0 and EMCAL, such as run 537401, where the problem was found.
1 parent f1d73df commit 670d1f7

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

‎Steer/DigitizerWorkflow/src/SimpleDigitizerWorkflow.cxx‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -850,8 +850,15 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
850850
}
851851
} else {
852852
std::vector<DataProcessorSpec> remaining;
853-
specs.push_back(specCombiner("Digitizations", digitizerSpecs, remaining));
854-
specs.push_back(specCombiner("Writers", writerSpecs, remaining));
853+
// Skip combined device creation for an empty collection as specCombiner would
854+
// return a device with no sub-tasks. This problem was discovered with run 537401 where both FT0,CTP detectors
855+
// bypass digitizerSpecs and FV0 and EMC are not included in the run.
856+
if (!digitizerSpecs.empty()) {
857+
specs.push_back(specCombiner("Digitizations", digitizerSpecs, remaining));
858+
}
859+
if (!writerSpecs.empty()) {
860+
specs.push_back(specCombiner("Writers", writerSpecs, remaining));
861+
}
855862
for (auto& s : remaining) {
856863
specs.push_back(s);
857864
}

0 commit comments

Comments
 (0)