Project

General

Profile

Feature #5474

Updated by Christopher Green over 5 years ago

Currently, to iterate over an @art::Handle<std::vector<DataProduct>>@ art::Handle<std::vector<DataProduct>> you have to do something like:<pre>for(unsigned like:

for(unsigned
int i = 0; i < prods->size(); ++i){
art::Ptr<DataProduct> prod(prods, i);
...
}</pre>
It
}

it
would be nice to be able to do:<pre>for(art::Ptr<DataProduct> do:

for(art::Ptr<DataProduct>
prod: prods){
...
}</pre> }

Currently you can do:<pre>for(const do:

for(const
DataProduct& prod: *prods){
...
}</pre> }

but in some cases it's necessary to have the product as an @art::Ptr@ art::Ptr inside the loop.

Back