Remove HepMC-specific iterators from the interfaces of filters.
This MR is needed afor the preparation to migrate Athena to HepMC3, it removes the custom iterators which are not present in HepMC3.
-
Briefly, the HepMC-specific iterators like
HepMC::GenEvent::particle_const_iterator
orHepMC::GenVertex::particle_iterator
are to clumsy and will be removed everywhere in the future. -
For this particular MR, the iterators are just either used to refer to a particle and the replacement is trivial, or these are used in functions like
findAncestor(const HepMC::GenVertex::particle_iterator& firstAncestor, const HepMC::GenVertex::particle_iterator& endAncestor, ... )
In the files affected by this MR the functions findAncestor(const HepMC::GenVertex::particle_iterator& firstAncestor, const HepMC::GenVertex::particle_iterator& endAncestor,...
are always called on the whole vector of particles, i.e. firstAncestor
is always particles_out_const_begin()
and endAncestor
is always particles_out_const_end()
. The iterators are NOT independent. Therefore instead of the pair of iterators the function takes a pointer to vertex as an argument and derives the proper iterators internally.
-
findAncestor
is the most confusing name for these functions, but I don't fix it so far.