We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e8e4db3 commit 8003ea8Copy full SHA for 8003ea8
Detectors/AOD/src/AODProducerWorkflowSpec.cxx
@@ -1169,7 +1169,7 @@ void AODProducerWorkflowDPL::run(ProcessingContext& pc)
1169
for (auto& label : primVerLabels) {
1170
auto it = std::find_if(mcColToEvSrc.begin(), mcColToEvSrc.end(),
1171
[&label](const std::pair<int, int>& item) { return (item.first == label.getEventID() && item.second == label.getSourceID()); });
1172
- int32_t mcCollisionID = it - mcColToEvSrc.begin();
+ int32_t mcCollisionID = (it != mcColToEvSrc.end()) ? it - mcColToEvSrc.begin() : -1;
1173
uint16_t mcMask = 0; // todo: set mask using normalized weights?
1174
mcColLabelsCursor(0, mcCollisionID, mcMask);
1175
}
0 commit comments