CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends
edm::AssociationMap< Tag > Class Template Reference

#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_typeinternal_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_typevalue_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_typeoperator[] (const key_type &k) const
 find element with specified reference key More...
 
template<typename K >
const result_typeoperator[] (const K &k) const
 
void post_insert ()
 post insert action More...
 
const ref_typerefProd () 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_typeget (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 >
 

Detailed Description

template<typename Tag>
class edm::AssociationMap< Tag >

one-to-many or one-to-one associative map using EDM references

Author
Luca Lista, INFN

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.

Member Typedef Documentation

template<typename Tag>
typedef Tag::data_type edm::AssociationMap< Tag >::data_type

insert data type

Definition at line 60 of file AssociationMap.h.

template<typename Tag>
typedef Tag::index_type edm::AssociationMap< Tag >::index_type

index type

Definition at line 56 of file AssociationMap.h.

template<typename Tag>
typedef tbb::concurrent_unordered_map<index_type, value_type> edm::AssociationMap< Tag >::internal_transient_map_type

transient map type

Definition at line 72 of file AssociationMap.h.

template<typename Tag>
typedef Tag::val_type edm::AssociationMap< Tag >::internal_val_type
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.

template<typename Tag>
typedef Tag::key_type edm::AssociationMap< Tag >::key_type

insert key type

Definition at line 58 of file AssociationMap.h.

template<typename Tag>
typedef Tag::map_type edm::AssociationMap< Tag >::map_type

map type

Definition at line 64 of file AssociationMap.h.

template<typename Tag>
typedef Tag::ref_type edm::AssociationMap< Tag >::ref_type

Holds the RefProd or RefToBaseProd of 1 or 2 collections.

Definition at line 62 of file AssociationMap.h.

template<typename Tag>
typedef value_type::value_type edm::AssociationMap< Tag >::result_type

type return by operator[]

Definition at line 70 of file AssociationMap.h.

template<typename Tag>
typedef AssociationMap<Tag> edm::AssociationMap< Tag >::self

self type

Definition at line 54 of file AssociationMap.h.

template<typename Tag>
typedef map_type::size_type edm::AssociationMap< Tag >::size_type

size type

Definition at line 66 of file AssociationMap.h.

template<typename Tag>
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 68 of file AssociationMap.h.

Constructor & Destructor Documentation

template<typename Tag>
edm::AssociationMap< Tag >::AssociationMap ( )
inline

default constructor

Definition at line 98 of file AssociationMap.h.

98 { }
template<typename Tag>
edm::AssociationMap< Tag >::AssociationMap ( EDProductGetter const *  getter)
inlineexplicit

Definition at line 104 of file AssociationMap.h.

104  :
105  ref_(getter) { }
ref_type ref_
reference set
template<typename Tag>
edm::AssociationMap< Tag >::AssociationMap ( const ref_type ref)
inlineexplicit

Definition at line 109 of file AssociationMap.h.

109 : ref_(ref) { }
ref_type ref_
reference set
template<typename Tag>
template<typename... Args>
edm::AssociationMap< Tag >::AssociationMap ( Args...  args)
inline

Definition at line 142 of file AssociationMap.h.

142 : ref_(std::forward<Args>(args)...) {}
ref_type ref_
reference set

Member Function Documentation

template<typename Tag>
const_iterator edm::AssociationMap< Tag >::begin ( void  ) const
inline

first iterator over the map (read only)

Definition at line 158 of file AssociationMap.h.

Referenced by DeDxDiscriminatorLearner::algoAnalyze(), SiStripGainFromData::algoAnalyze(), reco::JetTrackMatch< JetC >::allJets(), SiStripLAProfileBooker::analyze(), MCEfficiencyAnalyzer::analyze(), SiPixelHitEfficiencySource::analyze(), HitEff::analyze(), OverlapProblemTSOSAnalyzer::analyze(), AlignmentMonitorAsAnalyzer::analyze(), analyzer::SiPixelLorentzAngle::analyze(), MuonTrackValidator::analyze(), ApeEstimator::analyze(), edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > >::begin(), FWTrackProxyBuilderFullFramework::build(), V0Validator::doEfficiencies(), OverlapProblemTSOSPositionFilter::filter(), noPuUtils::isVertexAssociated(), noPuUtils::isVertexAssociated_fast(), AlignmentProducerBase::processEvent(), QualityFilter::produce(), TrackListCombiner::produce(), ShallowTrackClustersProducer::produce(), TrackInfoProducer::produce(), TkAlCaOverlapTagger::produce(), Type0PFMETcorrInputProducer::produce(), HSCPDeDxInfoProducer::produce(), L3MuonProducer::produce(), GlobalMuonProducer::produce(), ConversionSeedFilter::produce(), PF_PU_FirstVertexTracks::produce(), ConversionTrackProducer::produce(), PFCand_NoPU_WithAM::produce(), AlignmentMuonHIPTrajectorySelector::produce(), ShallowGainCalibration::produce(), reco::modules::TrackerTrackHitFilter::produce(), reco::modules::CosmicTrackSplitter::produce(), noPuUtils::reversePFCandToVertexAssociation(), DAFTrackProducerAlgorithm::runWithCandidate(), PF_PU_AssoMapAlgos::SortAssociationMap(), PFCand_AssoMapAlgos::SortPFCandAssociationMap(), and FWTrackProxyBuilderFullFramework::visibilityModelChanges().

158 { return const_iterator(this, map_.begin()); }
friend struct const_iterator
map_type map_
index map
template<typename Tag>
static short edm::AssociationMap< Tag >::Class_Version ( )
inlinestatic

Definition at line 236 of file AssociationMap.h.

238 :
template<typename Tag>
void edm::AssociationMap< Tag >::clear ( void  )
inline
template<typename Tag>
bool edm::AssociationMap< Tag >::empty ( ) const
inline
template<typename Tag>
const_iterator edm::AssociationMap< Tag >::end ( void  ) const
inline

last iterator over the map (read only)

Definition at line 160 of file AssociationMap.h.

Referenced by DeDxDiscriminatorLearner::algoAnalyze(), SiStripGainFromData::algoAnalyze(), reco::JetTrackMatch< JetC >::allJets(), SiPixelPhase1HitsV::analyze(), ValidationMisalignedTracker::analyze(), SiStripLAProfileBooker::analyze(), ZMuMuAnalyzer::analyze(), MCEfficiencyAnalyzer::analyze(), SimplePi0DiscAnalyzer::analyze(), SiPixelHitEfficiencySource::analyze(), ZMuMuAnalyzer_cynematics::analyze(), GlobalMuonMatchAnalyzer::analyze(), HitEff::analyze(), TkConvValidator::analyze(), TestTrackHits::analyze(), TestOutliers::analyze(), OverlapProblemTPAnalyzer::analyze(), PhotonValidator::analyze(), OverlapProblemTSOSAnalyzer::analyze(), AlignmentMonitorAsAnalyzer::analyze(), analyzer::SiPixelLorentzAngle::analyze(), MuonTrackValidator::analyze(), ApeEstimator::analyze(), FWTrackProxyBuilderFullFramework::build(), calculateVertexSharedTracks(), Types.LuminosityBlockRange::cppID(), Types.EventRange::cppID(), V0Validator::doEfficiencies(), V0Validator::doFakeRates(), MultiTrackValidatorGenPs::dqmAnalyze(), MultiTrackValidator::dqmAnalyze(), edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > >::end(), TrackingNtuple::fillSeeds(), TrackingNtuple::fillTrackingParticles(), TrackingNtuple::fillTracks(), OverlapProblemTSOSPositionFilter::filter(), edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > >::find(), edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > >::get(), PrimaryVertexAnalyzer4PUSlimmed::getRecoPVs(), PrimaryVertexAnalyzer4PUSlimmed::getSimPVs(), muon::getTevRefitTrack(), EgammaHLTFilteredObjProducer< OutCollType >::SelectionCut::getVar(), noPuUtils::isVertexAssociated(), noPuUtils::isVertexAssociated_fast(), MuonIdProducer::makeMuon(), PrimaryVertexAnalyzer4PUSlimmed::matchReco2SimVertices(), PrimaryVertexAnalyzer4PUSlimmed::matchRecoTrack2SimSignal(), PrimaryVertexAnalyzer4PUSlimmed::matchSim2RecoVertices(), edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > >::numberOfAssociations(), HLTEgammaCaloIsolFilterPairs::PassCaloIsolation(), AlignmentProducerBase::processEvent(), QualityFilter::produce(), TrackListCombiner::produce(), ShallowTrackClustersProducer::produce(), MCTrackMatcher::produce(), TrackInfoProducer::produce(), TkAlCaOverlapTagger::produce(), Type0PFMETcorrInputProducer::produce(), TrackListMerger::produce(), MatchedProbeMaker< T >::produce(), L3MuonProducer::produce(), GlobalMuonProducer::produce(), CosmicTrackSelector::produce(), ConversionSeedFilter::produce(), RecoTauGenericJetRegionProducer< JetType, CandType >::produce(), TrackMCQuality::produce(), PF_PU_FirstVertexTracks::produce(), ConversionTrackProducer::produce(), NuclearInteractionEDProducer::produce(), PFCand_NoPU_WithAM::produce(), AlignmentMuonHIPTrajectorySelector::produce(), reco::modules::HICaloCompatibleTrackSelector::produce(), reco::modules::TrackFullCloneSelectorBase< Selector >::produce(), TrackAlgoCompareUtil::produce(), ShallowGainCalibration::produce(), MuonsFromRefitTracksProducer::produce(), reco::modules::TrackerTrackHitFilter::produce(), reco::modules::CosmicTrackSplitter::produce(), noPuUtils::reversePFCandToVertexAssociation(), AnalyticalTrackSelector::run(), DAFTrackProducerAlgorithm::runWithCandidate(), PF_PU_AssoMapAlgos::SortAssociationMap(), PFCand_AssoMapAlgos::SortPFCandAssociationMap(), and tevOptimizedTMR().

160 { return const_iterator(this, map_.end()); }
friend struct const_iterator
map_type map_
index map
template<typename Tag>
size_type edm::AssociationMap< Tag >::erase ( const key_type k)
inline

erase the element whose key is k

Definition at line 167 of file AssociationMap.h.

Referenced by edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > >::erase().

167  {
168  index_type i = k.key();
169  transientMap_.unsafe_erase(i);
170  return map_.erase(i);
171  }
Tag::index_type index_type
index type
internal_transient_map_type transientMap_
transient reference map
int k[5][pyjets_maxn]
map_type map_
index map
template<typename Tag>
const_iterator edm::AssociationMap< Tag >::find ( const key_type k) const
inline

find element with specified reference key

Definition at line 162 of file AssociationMap.h.

Referenced by BeautifulSoup.Tag::__getattr__(), SiPixelPhase1HitsV::analyze(), ValidationMisalignedTracker::analyze(), ZMuMuAnalyzer::analyze(), SimplePi0DiscAnalyzer::analyze(), ZMuMuAnalyzer_cynematics::analyze(), GlobalMuonMatchAnalyzer::analyze(), TkConvValidator::analyze(), TestTrackHits::analyze(), TestOutliers::analyze(), OverlapProblemTPAnalyzer::analyze(), PhotonValidator::analyze(), MuonTrackValidator::analyze(), 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(), edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > >::get(), PrimaryVertexAnalyzer4PUSlimmed::getRecoPVs(), PrimaryVertexAnalyzer4PUSlimmed::getSimPVs(), muon::getTevRefitTrack(), EgammaHLTFilteredObjProducer< OutCollType >::SelectionCut::getVar(), noPuUtils::isVertexAssociated_fast(), MuonIdProducer::makeMuon(), PrimaryVertexAnalyzer4PUSlimmed::matchReco2SimVertices(), PrimaryVertexAnalyzer4PUSlimmed::matchRecoTrack2SimSignal(), PrimaryVertexAnalyzer4PUSlimmed::matchSim2RecoVertices(), edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > >::numberOfAssociations(), edm::AssociationMap< Tag >::Find::operator()(), HLTEgammaCaloIsolFilterPairs::PassCaloIsolation(), MCTrackMatcher::produce(), HFRecoEcalCandidateAlgo::produce(), TrackListMerger::produce(), MatchedProbeMaker< T >::produce(), L3MuonProducer::produce(), GlobalMuonProducer::produce(), CosmicTrackSelector::produce(), RecoTauGenericJetRegionProducer< JetType, CandType >::produce(), TrackMCQuality::produce(), NuclearInteractionEDProducer::produce(), reco::modules::HICaloCompatibleTrackSelector::produce(), reco::modules::TrackFullCloneSelectorBase< Selector >::produce(), TrackAlgoCompareUtil::produce(), MuonsFromRefitTracksProducer::produce(), AnalyticalTrackSelector::run(), and tevOptimizedTMR().

162  {
163  if (ref_.key.id() != k.id()) return end();
164  return find(k.key());
165  }
const_iterator end() const
last iterator over the map (read only)
const_iterator find(const key_type &k) const
find element with specified reference key
ref_type ref_
reference set
int k[5][pyjets_maxn]
template<typename Tag>
const_iterator edm::AssociationMap< Tag >::find ( size_type  i) const
inlineprivate

find element with index i

Definition at line 246 of file AssociationMap.h.

Referenced by BeautifulSoup.Tag::__getattr__(), and BeautifulSoup.Tag::firstText().

246  {
247  typename map_type::const_iterator f = map_.find(i);
248  if (f == map_.end()) return end();
249  return const_iterator(this, f);
250  }
friend struct const_iterator
const_iterator end() const
last iterator over the map (read only)
double f[11][100]
map_type map_
index map
template<typename Tag>
const value_type& edm::AssociationMap< Tag >::get ( size_type  i) const
inlineprivate

return value_typeelement with key i

Definition at line 252 of file AssociationMap.h.

Referenced by Options.Options::__getitem__(), betterConfigParser.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(), edm::AssociationMap< Tag >::const_iterator::operator*(), rrapi.RRApi::report(), util.rrapi.RRApi::report(), util.rrapi.RRApi::reports(), rrapi.RRApi::reports(), util.rrapi.RRApi::tables(), rrapi.RRApi::tables(), rrapi.RRApi::tags(), util.rrapi.RRApi::tags(), util.rrapi.RRApi::templates(), rrapi.RRApi::templates(), rrapi.RRApi::workspaces(), and util.rrapi.RRApi::workspaces().

252  {
253  typename internal_transient_map_type::const_iterator tf = transientMap_.find(i);
254  if (tf == transientMap_.end()) {
255  typename map_type::const_iterator f = map_.find(i);
256  if (f == map_.end())
257  Exception::throwThis(edm::errors::InvalidReference, "can't find reference in AssociationMap at position ", i);
258  value_type v(key_type(ref_.key, i), Tag::val(ref_, f->second));
259  std::pair<typename internal_transient_map_type::const_iterator, bool> ins =
260  transientMap_.insert(std::make_pair(i, v));
261  return ins.first->second;
262  } else {
263  return tf->second;
264  }
265  }
internal_transient_map_type transientMap_
transient reference map
helpers::KeyVal< key_type, internal_val_type > value_type
type returned by dereferenced iterator, also can be inserted
Tag::key_type key_type
insert key type
ref_type ref_
reference set
ins
Definition: cuy.py:314
static void throwThis(Code category, char const *message0="", char const *message1="", char const *message2="", char const *message3="", char const *message4="")
Definition: EDMException.cc:82
double f[11][100]
map_type map_
index map
template<typename Tag>
void edm::AssociationMap< Tag >::insert ( const key_type k,
const data_type v 
)
inline

insert an association

Definition at line 151 of file AssociationMap.h.

Referenced by BeautifulSoup.PageElement::append(), TrackGenAssociatorByChi2Impl::associateGenToReco(), TrackGenAssociatorByChi2Impl::associateRecoToGen(), VertexAssociatorByTracks::associateRecoToSim(), VertexAssociatorByPositionAndTracks::associateRecoToSim(), TrackAssociatorByHitsImpl::associateRecoToSim(), TrackAssociatorByPositionImpl::associateRecoToSim(), TrackAssociatorByChi2Impl::associateRecoToSim(), QuickTrackAssociatorByHitsImpl::associateRecoToSim(), QuickTrackAssociatorByHitsImpl::associateRecoToSimImplementation(), VertexAssociatorByTracks::associateSimToReco(), VertexAssociatorByPositionAndTracks::associateSimToReco(), TrackAssociatorByHitsImpl::associateSimToReco(), TrackAssociatorByPositionImpl::associateSimToReco(), TrackAssociatorByChi2Impl::associateSimToReco(), QuickTrackAssociatorByHitsImpl::associateSimToReco(), QuickTrackAssociatorByHitsImpl::associateSimToRecoImplementation(), reco::JetTrackMatch< JetC >::insert(), CosmicMuonLinksProducer::mapTracks(), EgammaHLTCombinedIsolationProducer::produce(), EgammaHLTPFChargedIsolationProducer::produce(), EgammaHLTPFNeutralIsolationProducer::produce(), EgammaHLTClusterShapeProducer::produce(), EgammaHLTElectronCombinedIsolationProducer::produce(), EgammaHLTPFPhotonIsolationProducer::produce(), HLTEcalPFClusterIsolationProducer< T1 >::produce(), EgammaHLTEcalRecIsolationProducer::produce(), HLTHcalPFClusterIsolationProducer< T1 >::produce(), EgammaHLTElectronDetaDphiProducer::produce(), EgammaHLTElectronTrackIsolationProducers::produce(), EgammaHLTHcalIsolationDoubleConeProducers::produce(), EgammaHLTHcalIsolationProducersRegional::produce(), EgammaHLTR9IDProducer::produce(), EgammaHLTBcHcalIsolationProducersRegional::produce(), EgammaHLTPhotonTrackIsolationProducersRegional::produce(), EgammaHLTR9Producer::produce(), EgammaHLTEcalIsolationProducersRegional::produce(), EgammaHLTGsfTrackVarProducer::produce(), NuclearTrackCorrector::produce(), and noPuUtils::reversePFCandToVertexAssociation().

151  {
152  Tag::insert(ref_, map_, k, v);
153  }
ref_type ref_
reference set
bool insert(Storage &iStorage, ItemType *iItem, const IdTag &iIdTag)
Definition: HCMethods.h:50
int k[5][pyjets_maxn]
map_type map_
index map
template<typename Tag>
void edm::AssociationMap< Tag >::insert ( const value_type kv)
inline

Definition at line 154 of file AssociationMap.h.

Referenced by BeautifulSoup.PageElement::append().

154  {
155  Tag::insert(ref_, map_, kv.key, kv.val);
156  }
ref_type ref_
reference set
bool insert(Storage &iStorage, ItemType *iItem, const IdTag &iIdTag)
Definition: HCMethods.h:50
map_type map_
index map
template<typename Tag>
Tag::transient_key_vector edm::AssociationMap< Tag >::keys ( )
inline

fill and return a transient key vector required for ROOT interactive usage

Definition at line 210 of file AssociationMap.h.

Referenced by psClasses.queueList::__init__(), psClasses.queueList::smallestQueue(), and psClasses.queueList::thinerQueue().

210  {
211  return Tag::transientKeyVector( ref_, map_ );
212  }
ref_type ref_
reference set
map_type map_
index map
template<typename Tag>
Tag::transient_map_type edm::AssociationMap< Tag >::map ( )
inline

fill and return a transient map required for ROOT interactive usage

Definition at line 205 of file AssociationMap.h.

205  {
206  return Tag::transientMap( ref_, map_ );
207  }
ref_type ref_
reference set
map_type map_
index map
template<typename Tag>
size_type edm::AssociationMap< Tag >::numberOfAssociations ( const key_type k) const
inline

number of associations to a key

Definition at line 185 of file AssociationMap.h.

Referenced by VertexAssociatorByTracks::associateRecoToSim(), and VertexAssociatorByTracks::associateSimToReco().

185  {
186  if (ref_.key.id() != k.id()) return 0;
187  typename map_type::const_iterator f = map_.find(k.key());
188  if (f == map_.end()) return 0;
189  return Tag::size(f->second);
190  }
size
Write out results.
ref_type ref_
reference set
double f[11][100]
int k[5][pyjets_maxn]
map_type map_
index map
template<typename Tag>
template<typename K >
size_type edm::AssociationMap< Tag >::numberOfAssociations ( const K &  k) const
inline

Definition at line 193 of file AssociationMap.h.

193  {
194  if (ref_.key.id() != k.id()) return 0;
195  typename map_type::const_iterator f = map_.find(k.key());
196  if (f == map_.end()) return 0;
197  return Tag::size(f->second);
198  }
size
Write out results.
ref_type ref_
reference set
double f[11][100]
int k[5][pyjets_maxn]
map_type map_
index map
template<typename Tag>
const result_type& edm::AssociationMap< Tag >::operator[] ( const key_type k) const
inline

find element with specified reference key

Definition at line 173 of file AssociationMap.h.

173  {
174  helpers::checkRef(ref_.key, k);
175  return get(k.key()).val;
176  }
ref_type ref_
reference set
int k[5][pyjets_maxn]
void checkRef(const RP &rp, const R &r)
throw if r hasn&#39;t the same id as rp
template<typename Tag>
template<typename K >
const result_type& edm::AssociationMap< Tag >::operator[] ( const K &  k) const
inline

Definition at line 179 of file AssociationMap.h.

179  {
180  helpers::checkRef(ref_.key,k);
181  return get(k.key()).val;
182  }
ref_type ref_
reference set
int k[5][pyjets_maxn]
void checkRef(const RP &rp, const R &r)
throw if r hasn&#39;t the same id as rp
template<typename Tag>
void edm::AssociationMap< Tag >::post_insert ( )
inline
template<typename Tag>
const ref_type& edm::AssociationMap< Tag >::refProd ( ) const
inline

return ref-prod structure

Definition at line 201 of file AssociationMap.h.

Referenced by TrackInfoProducer::produce(), and NuclearTrackCorrector::produce().

201 { return ref_; }
ref_type ref_
reference set
template<typename Tag>
size_type edm::AssociationMap< Tag >::size ( void  ) const
inline
template<typename Tag>
Tag::transient_val_vector edm::AssociationMap< Tag >::values ( )
inline

fill and return a transient key vector required for ROOT interactive usage

Definition at line 215 of file AssociationMap.h.

215  {
216  return Tag::transientValVector( ref_, map_ );
217  }
ref_type ref_
reference set
map_type map_
index map

Friends And Related Function Documentation

template<typename Tag>
friend struct const_iterator
friend
template<typename Tag>
friend struct Find
friend

Definition at line 267 of file AssociationMap.h.

template<typename Tag>
template<typename , typename , typename >
friend class OneToMany
friend

Definition at line 271 of file AssociationMap.h.

template<typename Tag>
template<typename , typename , typename , typename >
friend class OneToManyWithQuality
friend

Definition at line 272 of file AssociationMap.h.

template<typename Tag>
template<typename , typename , typename >
friend class OneToOne
friend

Definition at line 270 of file AssociationMap.h.

template<typename Tag>
template<typename , typename , typename >
friend class OneToValue
friend

Definition at line 269 of file AssociationMap.h.

template<typename Tag>
friend struct refhelper::FindTrait< self, value_type >
friend

Definition at line 268 of file AssociationMap.h.

Member Data Documentation

template<typename Tag>
map_type edm::AssociationMap< Tag >::map_
private

index map

Definition at line 242 of file AssociationMap.h.

template<typename Tag>
ref_type edm::AssociationMap< Tag >::ref_
private
template<typename Tag>
internal_transient_map_type edm::AssociationMap< Tag >::transientMap_
mutableprivate