9.3 Common Containers for EDM Objects
Complete:
Detailed Review status
Contents
Introduction
An object produced by CMSSW reconstruction
must be stored according to the Event Data Model (EDM), see
creating a new Event Data Product ,
and inserted into the Event.
Most of the simplest objects can be stored just as:
std::vector<T>
Where
T
is the object type.
In cases where more advanced features are required,
more specialized containers are appropriate.
Some common generic containers have been developed for the most
common of these cases.
The class templates are defined under CMSSW in the package:
DataFormats/Common
The main generic containers are documented in the pages linked below.
OwnVector Container
OwnVector stores a collection of polymorphic objects that
are automatically destroyed at the end of the event processing.
AssociationMap Container
AssociationMap template implements different types of associations
of objects stored in different collections.
Object references are stored internally as indices of objects in existing
collections, and are usable via
edm::Ref<...>
.
AssociationVector Container
AssociationVector template implements simple one-to-one associations
stored
by value in the container. It is a lighter alternative to one-to-value
AssociationMap in the cases where all objects in a collection have an
associated quantity.
Review status
Responsible:
LucaLista
Last reviewed by:
PetarMaksimovic - 28 Feb 2008