HepMC
2.07 Considerations

HepMC Savannah ] [ HepMC Homepage ] [ Downloads ]

2.07 Overview ] [ the problem with root ] [ constraints ] [ transient vs persistent ] [ possible solutions ] [ proposed solution ] [ output ] [ examples ] [ miscellaneous ]

We could use either a list or a vector.

If you have a vector of objects, and you add or remove an entry, the vector members may be rearranged. Thus any pointer to an existing object in your vector may no longer be valid.

If you have a list of objects, adding or removing an entry does not affect where the object is stored.

Implementation options:

Since HepMC was designed to with the idea that users would be using pointers to GenEvent, GenVertex, and GenParticle, we opted to use vectors.

OTOH, there is a lot to be said for storing the actual objects in a list.