EDM FAQ: Storable Containers


StorableContainers are a number of jackets on STL data structures containing Streamable or StorableObjects. Since ROOT Object I/O cannot at present treat STL containers of user-defined classes, the StorableContainers themselves are not now StorableObjects. They are merely Streamable. A developer must define a StorableObject wrapper class which uses a StorableContainer for implementation in order to put StorableContainers into the EventRecord. For instance, in the EdmObjects package there is a StorableObject class ToyTrackCollection which contains a streamable RefVector, where ToyTrack is a StorableObject. There is also a storable ToyHitCollection which contains a streamable ValueVector where ToyHit is streamable.

Container	Holds an X by Y			"Owning"    EdmObjects examples
                                                 /"Growable"
---------------	-------------------------------	----------- -------------------
ValueVector	StreamableObjects by value	YES / NO    ToyHitCollection
ValueVector	Built-in type by value		YES / NO    
RefVector	StorableObject by reference	YES / NO    ToyTrackCollection
ViewVector	StorableObject by reference	NO  / NO    ToyTrackView
GrowValueList	StreamableObjects by value	YES / YES   
GrowRefList	StorableObject by reference	YES / YES   ToyGrowTrackList
GrowViewList	StorableObject by reference	NO  / YES   ToyGrowTrackView


Comments on this page may be sent to Rob Kennedy