#include <AssociationMap.h>
Classes | |
struct | const_iterator |
const iterator More... | |
struct | Find |
find helper More... | |
Public Types | |
typedef Tag::data_type | data_type |
insert data type More... | |
typedef Tag::index_type | index_type |
index type More... | |
typedef tbb::concurrent_unordered_map < index_type, value_type > | internal_transient_map_type |
transient map type More... | |
typedef Tag::key_type | key_type |
insert key type More... | |
typedef Tag::map_type | map_type |
map type More... | |
typedef Tag::ref_type | ref_type |
Holds the RefProd or RefToBaseProd of 1 or 2 collections. More... | |
typedef value_type::value_type | result_type |
type return by operator[] More... | |
typedef AssociationMap< Tag > | self |
self type More... | |
typedef map_type::size_type | size_type |
size type More... | |
typedef helpers::KeyVal < key_type, internal_val_type > | value_type |
type returned by dereferenced iterator, also can be inserted More... | |
Public Member Functions | |
AssociationMap () | |
default constructor More... | |
AssociationMap (EDProductGetter const *getter) | |
AssociationMap (const ref_type &ref) | |
template<typename... Args> | |
AssociationMap (Args...args) | |
const_iterator | begin () const |
first iterator over the map (read only) More... | |
void | clear () |
clear map More... | |
bool | empty () const |
return true if empty More... | |
const_iterator | end () const |
last iterator over the map (read only) More... | |
size_type | erase (const key_type &k) |
erase the element whose key is k More... | |
const_iterator | find (const key_type &k) const |
find element with specified reference key More... | |
void | insert (const key_type &k, const data_type &v) |
insert an association More... | |
void | insert (const value_type &kv) |
Tag::transient_key_vector | keys () |
Tag::transient_map_type | map () |
size_type | numberOfAssociations (const key_type &k) const |
number of associations to a key More... | |
template<typename K > | |
size_type | numberOfAssociations (const K &k) const |
const result_type & | operator[] (const key_type &k) const |
find element with specified reference key More... | |
template<typename K > | |
const result_type & | operator[] (const K &k) const |
void | post_insert () |
post insert action More... | |
const ref_type & | refProd () const |
return ref-prod structure More... | |
size_type | size () const |
map size More... | |
Tag::transient_val_vector | values () |
Static Public Member Functions | |
static short | Class_Version () |
Private Types | |
typedef Tag::val_type | internal_val_type |
Private Member Functions | |
const_iterator | find (size_type i) const |
find element with index i More... | |
const value_type & | get (size_type i) const |
return value_typeelement with key i More... | |
Private Attributes | |
map_type | map_ |
index map More... | |
ref_type | ref_ |
reference set More... | |
internal_transient_map_type | transientMap_ |
transient reference map More... | |
Friends | |
struct | const_iterator |
struct | Find |
template<typename , typename , typename > | |
class | OneToMany |
template<typename , typename , typename , typename > | |
class | OneToManyWithQuality |
template<typename , typename , typename > | |
class | OneToOne |
template<typename , typename , typename > | |
class | OneToValue |
struct | refhelper::FindTrait< self, value_type > |
one-to-many or one-to-one associative map using EDM references
In general, this class is intuitive, but two special cases deserves some extra discussion. These are somewhat unusual corner cases, but sometimes actually have arisen.
First, one can initialize the AssociationMap by passing in a Handle to a collection as an argument to the constructor. Usually it is a good way to initialize it. But this will fail in the case where a collection template parameter to Tag (either CKey or CVal) is a View and the underlying collection read into the View is a RefVector, PtrVector, or vector(Ptr). AssociationMap will behave improperly if the constructor is passed a Handle<View<C> >. In this case, one should initialize with a EDProductGetter const* or construct a RefToBaseProd whose ProductID is associated with the underlying container, not the RefVector, PtrVector, or vector<Ptr>.
AssociationMap is designed to support cases where all the Key Ref's point into one container and all the Val Ref's point into one other container. For example, if one read a vector<Ptr> into a View and the Ptr's pointed into different containers and you tried to use these as elements of CVal, then AssociationMap will not work.
Definition at line 48 of file AssociationMap.h.
typedef Tag::data_type edm::AssociationMap< Tag >::data_type |
insert data type
Definition at line 61 of file AssociationMap.h.
typedef Tag::index_type edm::AssociationMap< Tag >::index_type |
index type
Definition at line 57 of file AssociationMap.h.
typedef tbb::concurrent_unordered_map<index_type, value_type> edm::AssociationMap< Tag >::internal_transient_map_type |
transient map type
Definition at line 73 of file AssociationMap.h.
|
private |
This is the second part of the value part of the items stored in the transient map
Definition at line 51 of file AssociationMap.h.
typedef Tag::key_type edm::AssociationMap< Tag >::key_type |
insert key type
Definition at line 59 of file AssociationMap.h.
typedef Tag::map_type edm::AssociationMap< Tag >::map_type |
map type
Definition at line 65 of file AssociationMap.h.
typedef Tag::ref_type edm::AssociationMap< Tag >::ref_type |
Holds the RefProd or RefToBaseProd of 1 or 2 collections.
Definition at line 63 of file AssociationMap.h.
typedef value_type::value_type edm::AssociationMap< Tag >::result_type |
type return by operator[]
Definition at line 71 of file AssociationMap.h.
typedef AssociationMap<Tag> edm::AssociationMap< Tag >::self |
self type
Definition at line 55 of file AssociationMap.h.
typedef map_type::size_type edm::AssociationMap< Tag >::size_type |
size type
Definition at line 67 of file AssociationMap.h.
typedef helpers::KeyVal<key_type, internal_val_type> edm::AssociationMap< Tag >::value_type |
type returned by dereferenced iterator, also can be inserted
Definition at line 69 of file AssociationMap.h.
|
inline |
|
inlineexplicit |
Definition at line 118 of file AssociationMap.h.
|
inlineexplicit |
Definition at line 121 of file AssociationMap.h.
|
inline |
Definition at line 154 of file AssociationMap.h.
|
inline |
first iterator over the map (read only)
Definition at line 169 of file AssociationMap.h.
Referenced by SiStripGainFromData::algoAnalyze(), reco::JetTrackMatch< JetC >::allJets(), SiPixelHitEfficiencySource::analyze(), MuonTrackValidator::analyze(), FWTrackProxyBuilderFullFramework::build(), V0Validator::doEfficiencies(), noPuUtils::isVertexAssociated(), noPuUtils::isVertexAssociated_fast(), noPuUtils::reversePFCandToVertexAssociation(), DAFTrackProducerAlgorithm::runWithCandidate(), PF_PU_AssoMapAlgos::SortAssociationMap(), PFCand_AssoMapAlgos::SortPFCandAssociationMap(), and FWTrackProxyBuilderFullFramework::visibilityModelChanges().
|
inlinestatic |
Definition at line 243 of file AssociationMap.h.
|
inline |
clear map
Definition at line 157 of file AssociationMap.h.
Referenced by BeautifulSoup.Tag::setString().
|
inline |
return true if empty
Definition at line 164 of file AssociationMap.h.
Referenced by TkConvValidator::analyze(), and V0Validator::doEfficiencies().
|
inline |
last iterator over the map (read only)
Definition at line 171 of file AssociationMap.h.
Referenced by SiStripGainFromData::algoAnalyze(), reco::JetTrackMatch< JetC >::allJets(), SiPixelPhase1HitsV::analyze(), ValidationMisalignedTracker::analyze(), SiPixelHitEfficiencySource::analyze(), TkConvValidator::analyze(), TestTrackHits::analyze(), PhotonValidator::analyze(), MuonTrackValidator::analyze(), LCToSimTSAssociatorByEnergyScoreImpl::associateRecoToSim(), LCToSimTSAssociatorByEnergyScoreImpl::associateSimToReco(), FWTrackProxyBuilderFullFramework::build(), calculateVertexSharedTracks(), Types.LuminosityBlockRange::cppID(), Types.EventRange::cppID(), V0Validator::doEfficiencies(), V0Validator::doFakeRates(), MultiTrackValidatorGenPs::dqmAnalyze(), MultiTrackValidator::dqmAnalyze(), TrackingNtuple::fillSeeds(), TrackingNtuple::fillTrackingParticles(), TrackingNtuple::fillTracks(), edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > >::find(), Primary4DVertexValidation::getMatchedTP(), PrimaryVertexAnalyzer4PUSlimmed::getRecoPVs(), Primary4DVertexValidation::getRecoPVs(), PrimaryVertexAnalyzer4PUSlimmed::getSimPVs(), Primary4DVertexValidation::getSimPVs(), muon::getTevRefitTrack(), noPuUtils::isVertexAssociated(), noPuUtils::isVertexAssociated_fast(), HGVHistoProducerAlgo::layerClusters_to_CaloParticles(), HGVHistoProducerAlgo::layerClusters_to_SimClusters(), PrimaryVertexAnalyzer4PUSlimmed::matchReco2SimVertices(), PrimaryVertexAnalyzer4PUSlimmed::matchRecoTrack2SimSignal(), Primary4DVertexValidation::matchRecoTrack2SimSignal(), PrimaryVertexAnalyzer4PUSlimmed::matchSim2RecoVertices(), HLTEgammaCaloIsolFilterPairs::PassCaloIsolation(), MCTrackMatcher::produce(), TrackAlgoCompareUtil::produce(), noPuUtils::reversePFCandToVertexAssociation(), DAFTrackProducerAlgorithm::runWithCandidate(), PF_PU_AssoMapAlgos::SortAssociationMap(), PFCand_AssoMapAlgos::SortPFCandAssociationMap(), and tevOptimizedTMR().
|
inline |
erase the element whose key is k
Definition at line 179 of file AssociationMap.h.
|
inline |
find element with specified reference key
Definition at line 173 of file AssociationMap.h.
Referenced by BeautifulSoup.Tag::__getattr__(), SiPixelPhase1HitsV::analyze(), ValidationMisalignedTracker::analyze(), TkConvValidator::analyze(), TestTrackHits::analyze(), PhotonValidator::analyze(), MuonTrackValidator::analyze(), LCToSimTSAssociatorByEnergyScoreImpl::associateRecoToSim(), LCToSimTSAssociatorByEnergyScoreImpl::associateSimToReco(), calculateVertexSharedTracks(), V0Validator::doEfficiencies(), V0Validator::doFakeRates(), MultiTrackValidatorGenPs::dqmAnalyze(), MultiTrackValidator::dqmAnalyze(), TrackingNtuple::fillSeeds(), TrackingNtuple::fillTrackingParticles(), TrackingNtuple::fillTracks(), edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > >::find(), BeautifulSoup.Tag::firstText(), Primary4DVertexValidation::getMatchedTP(), PrimaryVertexAnalyzer4PUSlimmed::getRecoPVs(), Primary4DVertexValidation::getRecoPVs(), PrimaryVertexAnalyzer4PUSlimmed::getSimPVs(), Primary4DVertexValidation::getSimPVs(), muon::getTevRefitTrack(), noPuUtils::isVertexAssociated_fast(), HGVHistoProducerAlgo::layerClusters_to_CaloParticles(), HGVHistoProducerAlgo::layerClusters_to_SimClusters(), PrimaryVertexAnalyzer4PUSlimmed::matchReco2SimVertices(), PrimaryVertexAnalyzer4PUSlimmed::matchRecoTrack2SimSignal(), Primary4DVertexValidation::matchRecoTrack2SimSignal(), PrimaryVertexAnalyzer4PUSlimmed::matchSim2RecoVertices(), edm::AssociationMap< Tag >::Find::operator()(), HLTEgammaCaloIsolFilterPairs::PassCaloIsolation(), MCTrackMatcher::produce(), HFRecoEcalCandidateAlgo::produce(), TrackAlgoCompareUtil::produce(), and tevOptimizedTMR().
|
inlineprivate |
find element with index i
Definition at line 253 of file AssociationMap.h.
Referenced by BeautifulSoup.Tag::__getattr__(), and BeautifulSoup.Tag::firstText().
|
inlineprivate |
return value_typeelement with key i
Definition at line 260 of file AssociationMap.h.
Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), submitPVValidationJobs.BetterConfigParser::__updateDict(), rrapi.RRApi::columns(), util.rrapi.RRApi::columns(), rrapi.RRApi::count(), util.rrapi.RRApi::count(), rrapi.RRApi::data(), util.rrapi.RRApi::data(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), submitPVValidationJobs.BetterConfigParser::getResultingSection(), edm::AssociationMap< Tag >::const_iterator::operator*(), util.rrapi.RRApi::report(), rrapi.RRApi::report(), util.rrapi.RRApi::reports(), rrapi.RRApi::reports(), rrapi.RRApi::tables(), util.rrapi.RRApi::tables(), util.rrapi.RRApi::tags(), rrapi.RRApi::tags(), rrapi.RRApi::templates(), util.rrapi.RRApi::templates(), util.rrapi.RRApi::workspaces(), and rrapi.RRApi::workspaces().
|
inline |
insert an association
Definition at line 166 of file AssociationMap.h.
Referenced by BeautifulSoup.PageElement::_invert(), SequenceTypes.Schedule::_replaceIfHeldDirectly(), TrackGenAssociatorByChi2Impl::associateGenToReco(), TrackGenAssociatorByChi2Impl::associateRecoToGen(), VertexAssociatorByTracks::associateRecoToSim(), LCToSimTSAssociatorByEnergyScoreImpl::associateRecoToSim(), VertexAssociatorByPositionAndTracks::associateRecoToSim(), TSToSCAssociatorByEnergyScoreImpl::associateRecoToSim(), TrackAssociatorByHitsImpl::associateRecoToSim(), MultiClusterAssociatorByEnergyScoreImpl::associateRecoToSim(), TrackAssociatorByPositionImpl::associateRecoToSim(), TrackAssociatorByChi2Impl::associateRecoToSim(), LCToSCAssociatorByEnergyScoreImpl::associateRecoToSim(), LCToCPAssociatorByEnergyScoreImpl::associateRecoToSim(), TSToSimTSAssociatorByEnergyScoreImpl::associateRecoToSim(), QuickTrackAssociatorByHitsImpl::associateRecoToSim(), QuickTrackAssociatorByHitsImpl::associateRecoToSimImplementation(), VertexAssociatorByTracks::associateSimToReco(), LCToSimTSAssociatorByEnergyScoreImpl::associateSimToReco(), VertexAssociatorByPositionAndTracks::associateSimToReco(), TSToSCAssociatorByEnergyScoreImpl::associateSimToReco(), TrackAssociatorByHitsImpl::associateSimToReco(), MultiClusterAssociatorByEnergyScoreImpl::associateSimToReco(), TrackAssociatorByPositionImpl::associateSimToReco(), TrackAssociatorByChi2Impl::associateSimToReco(), LCToSCAssociatorByEnergyScoreImpl::associateSimToReco(), LCToCPAssociatorByEnergyScoreImpl::associateSimToReco(), TSToSimTSAssociatorByEnergyScoreImpl::associateSimToReco(), QuickTrackAssociatorByHitsImpl::associateSimToReco(), QuickTrackAssociatorByHitsImpl::associateSimToRecoImplementation(), reco::JetTrackMatch< JetC >::insert(), CosmicMuonLinksProducer::mapTracks(), EgammaHLTBcHcalIsolationProducersRegional::produce(), EgammaHLTClusterShapeProducer::produce(), EgammaHLTHcalVarProducerFromRecHit::produce(), EgammaHLTR9IDProducer::produce(), HLTHcalPFClusterIsolationProducer< T1 >::produce(), EgammaHLTGsfTrackVarProducer::produce(), EgammaHLTElectronTrackIsolationProducers::produce(), EgammaHLTPhotonTrackIsolationProducersRegional::produce(), HLTHGCalLayerClusterIsolationProducer< T1 >::produce(), HLTEcalPFClusterIsolationProducer< T1 >::produce(), NuclearTrackCorrector::produce(), and noPuUtils::reversePFCandToVertexAssociation().
|
inline |
Definition at line 167 of file AssociationMap.h.
Referenced by BeautifulSoup.PageElement::_invert(), and SequenceTypes.Schedule::_replaceIfHeldDirectly().
|
inline |
fill and return a transient key vector required for ROOT interactive usage
Definition at line 224 of file AssociationMap.h.
Referenced by psClasses.queueList::__init__(), psClasses.queueList::smallestQueue(), and psClasses.queueList::thinerQueue().
|
inline |
fill and return a transient map required for ROOT interactive usage
Definition at line 221 of file AssociationMap.h.
|
inline |
number of associations to a key
Definition at line 197 of file AssociationMap.h.
Referenced by VertexAssociatorByTracks::associateRecoToSim(), and VertexAssociatorByTracks::associateSimToReco().
|
inline |
Definition at line 207 of file AssociationMap.h.
|
inline |
find element with specified reference key
Definition at line 185 of file AssociationMap.h.
|
inline |
Definition at line 191 of file AssociationMap.h.
|
inline |
post insert action
Definition at line 229 of file AssociationMap.h.
Referenced by MuonTrackValidator::analyze(), TrackGenAssociatorByChi2Impl::associateGenToReco(), TrackGenAssociatorByChi2Impl::associateRecoToGen(), VertexAssociatorByPositionAndTracks::associateRecoToSim(), TrackAssociatorByHitsImpl::associateRecoToSim(), TrackAssociatorByPositionImpl::associateRecoToSim(), TrackAssociatorByChi2Impl::associateRecoToSim(), QuickTrackAssociatorByHitsImpl::associateRecoToSim(), QuickTrackAssociatorByHitsImpl::associateRecoToSimImplementation(), VertexAssociatorByPositionAndTracks::associateSimToReco(), TrackAssociatorByHitsImpl::associateSimToReco(), TrackAssociatorByPositionImpl::associateSimToReco(), TrackAssociatorByChi2Impl::associateSimToReco(), QuickTrackAssociatorByHitsImpl::associateSimToReco(), and QuickTrackAssociatorByHitsImpl::associateSimToRecoImplementation().
|
inline |
return ref-prod structure
Definition at line 217 of file AssociationMap.h.
Referenced by NuclearTrackCorrector::produce().
|
inline |
map size
Definition at line 162 of file AssociationMap.h.
Referenced by ntupleDataFormat._Collection::__iter__(), ntupleDataFormat._Collection::__len__(), SiPixelHitEfficiencySource::analyze(), VertexAssociatorByTracks::associateRecoToSim(), TrackAssociatorByHitsImpl::associateRecoToSim(), QuickTrackAssociatorByHitsImpl::associateRecoToSim(), VertexAssociatorByTracks::associateSimToReco(), TrackAssociatorByHitsImpl::associateSimToReco(), QuickTrackAssociatorByHitsImpl::associateSimToReco(), CosmicMuonLinksProducer::produce(), and DAFTrackProducerAlgorithm::runWithCandidate().
|
inline |
fill and return a transient key vector required for ROOT interactive usage
Definition at line 227 of file AssociationMap.h.
|
friend |
Definition at line 274 of file AssociationMap.h.
Referenced by edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > >::begin(), edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > >::end(), and edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > >::find().
|
friend |
Definition at line 275 of file AssociationMap.h.
Definition at line 282 of file AssociationMap.h.
|
friend |
Definition at line 284 of file AssociationMap.h.
Definition at line 280 of file AssociationMap.h.
Definition at line 278 of file AssociationMap.h.
|
friend |
Definition at line 276 of file AssociationMap.h.
|
private |
index map
Definition at line 249 of file AssociationMap.h.
Referenced by edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > >::begin(), edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > >::clear(), edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > >::empty(), edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > >::end(), edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > >::erase(), edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > >::get(), edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > >::insert(), edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > >::keys(), edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > >::map(), edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > >::numberOfAssociations(), edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > >::post_insert(), edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > >::size(), and edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > >::values().
|
private |
reference set
Definition at line 247 of file AssociationMap.h.
Referenced by edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > >::find(), edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > >::get(), edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > >::insert(), edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > >::keys(), edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > >::map(), edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > >::numberOfAssociations(), edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > >::operator[](), edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > >::refProd(), and edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > >::values().
|
mutableprivate |
transient reference map
Definition at line 251 of file AssociationMap.h.
Referenced by edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > >::clear(), edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > >::erase(), and edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > >::get().