Commit 04b4bbe6 authored by Wouter Deconinck's avatar Wouter Deconinck
Browse files

A podio object can only be in one collection, so use std::vector

parent 2c5d60bf
......@@ -12,7 +12,7 @@ namespace Jug::Base::Beam {
auto find_first_with_pdg(
const collection& parts,
const std::set<int32_t>& pdg) {
collection c;
std::vector<decltype(parts[0])> c;
for (const auto& p: parts) {
if (pdg.count(p.getPDG()) > 0) {
c.push_back(p);
......@@ -27,9 +27,10 @@ namespace Jug::Base::Beam {
const collection& parts,
const std::set<int32_t>& status,
const std::set<int32_t>& pdg) {
collection c;
std::vector<decltype(parts[0])> c;
for (const auto& p: parts) {
if (status.count(p.getGeneratorStatus()) > 0 && pdg.count(p.getPDG()) > 0) {
if (status.count(p.getGeneratorStatus()) > 0 &&
pdg.count(p.getPDG()) > 0) {
c.push_back(p);
break;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment