diff --git a/Detectors/ITSMFT/common/workflow/src/ClustererSpec.cxx b/Detectors/ITSMFT/common/workflow/src/ClustererSpec.cxx index 8de29c62335b6..fc0dd5dbae7da 100644 --- a/Detectors/ITSMFT/common/workflow/src/ClustererSpec.cxx +++ b/Detectors/ITSMFT/common/workflow/src/ClustererSpec.cxx @@ -165,12 +165,12 @@ void ClustererDPL::run(ProcessingContext& pc) } } } - int prevFirst{0}; + int prevLast{0}; for (auto& rof : expClusRofVec) { if (rof.getFirstEntry() < 0) { - rof.setFirstEntry(prevFirst); + rof.setFirstEntry(prevLast); } - prevFirst = rof.getFirstEntry(); + prevLast = rof.getFirstEntry() + rof.getNEntries(); } nROFs = expClusRofVec.size(); pc.outputs().snapshot(Output{Origin, "CLUSTERSROF", iLayer}, expClusRofVec);