#include <RefHelper.h>
Public Types | |
typedef edm::Ptr< T > | Ref |
Public Member Functions | |
template<typename V , typename SomeRef > | |
V | ancestorLookup (const SomeRef &ref, const edm::ValueMap< V > &map) const |
Ref | ancestorOrSelf (const Ref &ref) const |
Climbs back the Ref chain and returns the root of the branch starting from "ref". More... | |
bool | isAncestorOf (const Ref &old, const Ref &young) const |
true if old is some ancestor of young (it does not have to be the root) More... | |
bool | isRoot (const Ref &ref) const |
Ref | parentOrNull (const Ref &ref) const |
Returns a Ref to the direct parent of "ref", or a null Ref if "ref" is already root. More... | |
Ref | parentOrSelf (const Ref &ref) const |
Returns a Ref to the direct parent of "ref", or "ref" itself if it's already root. More... | |
template<typename V , typename SomeRef > | |
V | recursiveLookup (const SomeRef &ref, const edm::ValueMap< V > &map) const |
RefHelper (const edm::ValueMap< Ref > &backRefMap) | |
Constructor taking a ValueMap of back-references daughter => mother. More... | |
bool | sharedAncestor (const Ref &ref1, const Ref &ref2) const |
true if the two share the same root More... | |
Private Attributes | |
const edm::ValueMap< Ref > & | backRefMap_ |
Definition at line 10 of file RefHelper.h.
typedef edm::Ptr<T> pat::helper::RefHelper< T >::Ref |
Definition at line 12 of file RefHelper.h.
|
inline |
Constructor taking a ValueMap of back-references daughter => mother.
Definition at line 15 of file RefHelper.h.
V pat::helper::RefHelper< T >::ancestorLookup | ( | const SomeRef & | ref, |
const edm::ValueMap< V > & | map | ||
) | const |
Looks up map to find something associated to the root ancestor of "ref" Throws edm::Exception(edm::errors::InvalidReference) if there's no match
Definition at line 124 of file RefHelper.h.
References genParticles_cff::map.
RefHelper< T >::Ref pat::helper::RefHelper< T >::ancestorOrSelf | ( | const Ref & | ref | ) | const |
Climbs back the Ref chain and returns the root of the branch starting from "ref".
Definition at line 72 of file RefHelper.h.
References runTheMatrix::ret, and ctpps_dqm_sourceclient-live_cfg::test.
bool pat::helper::RefHelper< T >::isAncestorOf | ( | const Ref & | old, |
const Ref & | young | ||
) | const |
true if old is some ancestor of young (it does not have to be the root)
Definition at line 88 of file RefHelper.h.
bool pat::helper::RefHelper< T >::isRoot | ( | const Ref & | ref | ) | const |
Definition at line 83 of file RefHelper.h.
RefHelper< T >::Ref pat::helper::RefHelper< T >::parentOrNull | ( | const Ref & | ref | ) | const |
Returns a Ref to the direct parent of "ref", or a null Ref if "ref" is already root.
Definition at line 49 of file RefHelper.h.
References MillePedeFileConverter_cfg::e, edm::Ptr< T >::id(), and edm::errors::InvalidReference.
RefHelper< T >::Ref pat::helper::RefHelper< T >::parentOrSelf | ( | const Ref & | ref | ) | const |
Returns a Ref to the direct parent of "ref", or "ref" itself if it's already root.
Definition at line 66 of file RefHelper.h.
References runTheMatrix::ret.
V pat::helper::RefHelper< T >::recursiveLookup | ( | const SomeRef & | ref, |
const edm::ValueMap< V > & | map | ||
) | const |
Recursively looks up map to find something associated to ref, or one of its parents. Throws edm::Exception(edm::errors::InvalidReference) if there's no match
Definition at line 104 of file RefHelper.h.
References MillePedeFileConverter_cfg::e, Exception, edm::errors::InvalidReference, genParticles_cff::map, and ctpps_dqm_sourceclient-live_cfg::test.
bool pat::helper::RefHelper< T >::sharedAncestor | ( | const Ref & | ref1, |
const Ref & | ref2 | ||
) | const |
true if the two share the same root
Definition at line 98 of file RefHelper.h.
|
private |
Definition at line 45 of file RefHelper.h.