AthenaHitsVector : Try to add policies ala DataVector (OWN/VIEW)
AthenaHitsVector :
- What we currently have is always owning the elements (
OWN
). Try to add aVIEW
policy alaDataVector
. - The default is
OWN
so nothing should change.
The reason is that in my understanding if we want to use a DataPool
for the T/P converters of Hits
collection
we can not have the Container deleting the elements (as the DataPool
owns them the container must be VIEW
)
So at the end the main "goal" is to have kind of this
void Clear() {
// delete pointers if we own the elements
if (m_ownPolicy == OWN_ELEMENTS) {
for (unsigned int i = 0; i < m_hitvector.size(); i++)
delete m_hitvector[i];
}
Similar changes happened in "resize" etc. We want to delete only if we own. And we want to deep copy only if own etc...
Ping @jchapman from simulation , @ssnyder from the expert / DataPool
side , and @tadej since he brought the issue of many allocations that we might want to avoid via a DataPool