LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
A class holding many associations between objects. More...
#include "FindAllP.h"
Public Types | |
using | Source_t = Source |
using | Dest_t = Dest |
using | SourcePtr_t = art::Ptr< Source_t > |
using | DestPtr_t = art::Ptr< Dest_t > |
using | InProductCache_t = std::vector< DestPtr_t > |
type for a cache of dest products for a given source product ID More... | |
using | Hash_t = details::hash< art::ProductID > |
type of hash functor for the cache More... | |
using | Cache_t = std::unordered_map< art::ProductID, InProductCache_t, Hash_t > |
type for the complete cache, keyed by source product ID More... | |
Public Member Functions | |
UniqueAssociationCache ()=default | |
Constructor: an empty cache. More... | |
DestPtr_t | operator[] (SourcePtr_t const &src) const |
Returns the specified element of the cache. More... | |
void | clear () |
Empties the cache. More... | |
size_t | NProductIDs () const |
Public Attributes | |
Cache_t | AssnCache |
association cache, keyed by product ID and index More... | |
A class holding many associations between objects.
Source | type of the object we use as query key (indexing object) |
Dest | type of the object we query for |
This class is conceptually related to the query object FindOneP. This object is a cache of possible query results of the type: which Dest object is associated to this specific Src object? The cache is structured so that only one Dest object is known for each Src.
Definition at line 61 of file FindAllP.h.
using lar::util::details::UniqueAssociationCache< Source, Dest >::Cache_t = std::unordered_map<art::ProductID, InProductCache_t, Hash_t> |
type for the complete cache, keyed by source product ID
Definition at line 76 of file FindAllP.h.
using lar::util::details::UniqueAssociationCache< Source, Dest >::Dest_t = Dest |
Definition at line 64 of file FindAllP.h.
using lar::util::details::UniqueAssociationCache< Source, Dest >::DestPtr_t = art::Ptr<Dest_t> |
Definition at line 67 of file FindAllP.h.
using lar::util::details::UniqueAssociationCache< Source, Dest >::Hash_t = details::hash<art::ProductID> |
type of hash functor for the cache
Definition at line 73 of file FindAllP.h.
using lar::util::details::UniqueAssociationCache< Source, Dest >::InProductCache_t = std::vector<DestPtr_t> |
type for a cache of dest products for a given source product ID
Definition at line 70 of file FindAllP.h.
using lar::util::details::UniqueAssociationCache< Source, Dest >::Source_t = Source |
Definition at line 63 of file FindAllP.h.
using lar::util::details::UniqueAssociationCache< Source, Dest >::SourcePtr_t = art::Ptr<Source_t> |
Definition at line 66 of file FindAllP.h.
|
default |
Constructor: an empty cache.
|
inline |
Empties the cache.
Definition at line 94 of file FindAllP.h.
|
inline |
Definition at line 96 of file FindAllP.h.
|
inline |
Returns the specified element of the cache.
src | art pointer to the object we want the association of |
Definition at line 88 of file FindAllP.h.
Cache_t lar::util::details::UniqueAssociationCache< Source, Dest >::AssnCache |
association cache, keyed by product ID and index
Definition at line 78 of file FindAllP.h.