|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef ATHLINKS_ASSOCIATIONMAP_H
6 #define ATHLINKS_ASSOCIATIONMAP_H
8 #define ASSOCIATION_CONTEXT
9 #define ASSOCIATIONMAP_CONTEXT
29 #include "AthLinks/ElementLink.h"
30 #include "AthLinks/ElementLinkVector.h"
37 template<
class OBJCONT,
class ASSCONT>
59 typedef typename std::list<const asso_type*>
asso_list;
63 typedef typename std::map<object_link,asso_store>
store_type;
136 {
return (*objectIter).getObject(); }
155 {
return *assoIter; }
160 {
return objectIter.findAssociation(assoPointer); }
167 {
return objectIter.containsAssociation(assoPointer); }
178 {
return this->
getObjects(*assoIter,theObjects); }
196 {
return this->
size(objectPointer); }
199 {
return objectIter.getNumberOfAssociations(); }
202 {
return this->
size(objectIter); }
221 if ( iMap->first.cptr() == objectLink.
cptr() ) {
229 if (
std::find((foundIter->second).begin(),
230 (foundIter->second).end(),
232 (foundIter->second).end() )
233 {
return foundIter; }
245 #undef ASSOCIATION_CONTEXT
246 #undef ASSOCIATIONMAP_CONTEXT
store_type::iterator store_iterator_type
JetConstituentVector::iterator iterator
bool containsObject(const object_type *theObject) const
testing if object is in store
size_t size() const
get number of associations
bool getAssociations(const object_type *objPointer, asso_list &assocs) const
get all associations for a given object
bool addToStore(const object_link &objectLink, const asso_link &assoLink)
internally used function to add links to store
asso_iterator endAssociation(const object_type *objectPointer) const
end iterator for associations
void addAssociation(const object_container_type *objectContainer, const object_type *objectPointer, const asso_container_type *assoContainer, const asso_type *assoPointer)
virtual ~AssociationMap()
size_t getNumberOfAssociations(const object_type *objectPointer) const
std::string find(const std::string &s)
return a remapped string
object_iterator beginObject() const
begin iterator for objects
asso_iterator beginAssociation(const object_type *objectPointer) const
begin iterator for associations
object_container_type::base_value_type object_type
bool containsAssociation(const object_type *objectPointer, const asso_type *assoPointer) const
ElementLinkVector implementation for standalone ROOT.
templated base class for a look-up map for associations
const asso_type * getAssociation(asso_iterator assoIter) const
associations iterator access
asso_iterator beginAssociation(const object_iterator &objectIter) const
asso_store::const_iterator asso_store_iterator
ElementLink< object_container_type > object_link
static const asso_store s_dum_asso_store
T base_value_type
The T value used as the template parameter.
bool getObjects(const asso_iterator &assoIter, object_list &theObjects) const
get all objects for a given association
ElementLinkVector< asso_container_type > asso_store
object iterator for association maps (internal use only!)
asso_iterator findAssociation(const object_iterator &objectIter, const asso_type *assoPointer) const
find association
std::list< const asso_type * > asso_list
void addAssociation(const object_link &objectLink, const asso_link &assoLink)
AssociationObjectIterator object_iterator
object iterator type
object_iterator endObject() const
end iterator for objects
SG::GenerateIndexingPolicy< asso_container_type >::type::index_type asso_index_type
size_t size(const object_iterator &objectIter) const
size_t getNumberOfObjects() const
retrieve number of objects in store
ElementLink< asso_container_type > asso_link
bool containsAssociation(const asso_type *assoPointer) const
asso_iterator findAssociation(const object_type *objectPointer, const asso_type *assoPointer) const
ElementLink implementation for ROOT usage.
asso_iterator endAssociation(const object_iterator &objectIter) const
bool containsAssociation(const object_iterator &objectIter, const asso_type *assoPointer) const
containment check
ElementConstPointer cptr() const
Return a pointer to the referenced element.
const object_type * getObject(const object_iterator &objectIter) const
get association iterators by object iterator
ASSCONT asso_container_type
void addAssociation(const object_container_type *objectContainer, const object_index_type &objectIndex, const asso_container_type *assoContainer, const asso_index_type &assoIndex)
size_t size()
get number of associations
object_iterator findObject(const object_type *theObject) const
finding an object with allocation
bool getObjects(const asso_type *assoPointer, object_list &theObjects) const
get all objects for a given association
store_iterator_type internalFind(const object_link &objectLink, const asso_link &assoLink)
internally used find method
size_t getNumberOfAssociations(const object_iterator &objectIter) const
AssociationVectorIterator asso_iterator
association iterator type
SG::GenerateIndexingPolicy< object_container_type >::type::index_type object_index_type
store_type m_associationMap
internal store
bool getAssociations(const object_iterator &objIter, asso_list &assocs) const
get all associations for a given object
std::map< object_link, asso_store > store_type
asso_container_type::base_value_type asso_type
size_t size(const object_type *objectPointer) const
std::list< const object_type * > object_list
OBJCONT object_container_type