EDM Common Container types

Complete: 3

Purpose

Describe the avaliable common containers supported in the package:

All containers listed in the following are defined in the namespace:

  • edm::

Association

Association<CVal> is a replacement for AssociationMap<OneToOne> developed according to the performance task force recommendation to improve the storage of association maps. The map is one-directional.

Comments

Allows to store association to multiple reference types, and merging maps is straightforward. Does not allow to iterate over the map keys since the type of the objects references used as key is not known. The provided interface is anyway type safe.

Documentation

More details on:

AssociationMap

AssociationMap<Tag> defines associative maps between references to objects stored in the event and other references or values. Tag can be one of the following type. All tag types support one extra template parameter, not listed, which is the index type, which by default is of type unsigned int. All maps are one-directional.

  • OneToValue<CKey, Val>: stores associations between references to an object in a collection of type CKey to values of type Val (see also ValueMap, below).
  • OneToOne<CKey, CVal>: stores associations between references to an object in a collection of type CKey to references to an object in a collection of type of type CVal.
  • OneToMany<CKey, CVal>: stores associations between references to an object in a collection of type CKey to references to many objects in a collection of type of type CVal
  • OneToManyWithQuality<CKey, CVal, Q>: stores associations between references to an object in a collection of type CKey to references to many objects in a collection of type of type CVal, with a quality tag of type Q.
  • OneToOneGeneric<CKey, Val>: is similar to OneToOne<CKey, CVal>, but, adding some default template parameters managed via traits, allows support for edm::View<T> as possible parameter type for CKey and/or CVal.

Comments

Uses internally edm::RefProd / edm::RefToBaseProd and returns externally edm::Ref / edm::RefToBase. In order to guarantee the required interface, and support for edm::Ref, it was required to add a transient cache that could create performance problems.

Stores to disk a std::map, which is deprecated by the performance task force.

Documentation

More details on

AssociationVector

AssociationVector<CKey, CVal> stores a collection of type CVal that is in one-to-one association and with the same size as a collection of type CKey. edm::View<T> is supported as possible type for CKey.

Comments

Uses internally edm::RefProd / edm::RefToBaseProd and returns externally edm::Ref / edm::RefToBase. In order to guarantee the required interface, and support for edm::Ref, it was required to add a transient cache that could create performance problems.

The internal storage should have no performance problem.

Documentation

More details on

DetSet,

No details available.

DetSetLazyVector

No details available.

DetSetRefVector

No details available.

DetSetVector

No details available.

DetSetVectorNew

Improved version of DetSetVector developed by Vincenzo

Documentation

More details on:

EDCollection

EDCollection<T> is functionally equivalent to std::vector<T>. Still present for historical reason. Could be probably removed. Used only in DataFormats/EcalDetId/interface/EcalDetIdCollections.h.

IDVectorMap

No details available. Apparently unused.

MapOfVectors

No details available. Apparently unused.

OwnVector

OwnVector<T> has an interface very similar to std::vector<T> but is capable of storing polymorphic objects that are owned by the container to avoid memory leak. OwnVector has functionalities very similar to boost::ptr_vector adding persistent capabilities.

Comments

storing std::vector<T*> is known to have performance problems with ROOT, though ROOT is going to release improvements for this type of container.

Some of the needs for this type of container are no longer present, now that edm::View allows a polymorphic access to collections.

Documentation

More details on:

PtrVector

Improved version of RefToBaseVector<T> stores a vector of indices referring to objects in a collection, working as a polymorphic set of references.

Comments

Performances should be much improved w.r.t. RefToBaseVector<T>.

RangeMap

RangeMap<ID, C> is a generic container of objects organized in a collection of type C and sorted according to an identified of type ID. It is possible to iterate over contained object, iterate over identifiers, access only objects with a specified identifier, or whose identifier match a specified criterion. The collection is sorted before being inserted in the Event.

Comments

Performance problems have been spotted by the performance task force for this container.

RefVector

RefVector<C> stores a vector of indices referring to objects in a collection

Comments

Concerns have been raised about the large number of template specializations for this type

RefToBaseVector

RefToBaseVector<T> stores a vector of indices referring to objects in a collection, but works as a polymorphic set of references.

Comments

Concerns have been raised about the large number of template specializations for helpers required by this type. Run time performance problems have also been spotted

SortedCollection

No details available.

ValueMap

ValueMap<T> is a replacement for AssociationMap<OneToValue> developed according to the performance task force recommendation to improve the storage of association maps. The map is one-directional.

Comments

Allows to store association to multiple reference types, and merging maps is straightforward. Does not allow to iterate over the map keys since the type of the objects references used as key is not known. The provided interface is anyway type safe.

Documentation

The interface is very similar to Association, proposed below:

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r2 - 2013-10-03 - AndreaBocci



 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CMSPublic All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback