CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
edm::RefVector< C, T, F > Class Template Reference

#include <EDProductfwd.h>

Public Types

typedef C collection_type
 
typedef iterator const_iterator
 
typedef value_type const const_reference
 
typedef RefVectorBase< key_typecontents_type
 
typedef F finder_type
 
typedef
refhelper::RefVectorTrait< C,
T, F >::iterator_type 
iterator
 
typedef value_type::key_type key_type
 
typedef std::vector< key_typeKeyVec
 
typedef T member_type
 
typedef const_reference reference
 
typedef KeyVec::size_type size_type
 
typedef
refhelper::RefVectorTrait< C,
T, F >::ref_type 
value_type
 

Public Member Functions

value_type const at (size_type idx) const
 Retrieve an element of the RefVector. More...
 
const_iterator begin () const
 Initialize an iterator over the RefVector. More...
 
size_type capacity () const
 Capacity of the RefVector. More...
 
void clear ()
 Clear the vector. More...
 
bool empty () const
 Is the RefVector empty. More...
 
const_iterator end () const
 Termination of iteration. More...
 
iterator erase (iterator const &pos)
 Erase an element from the vector. More...
 
void fillView (ProductID const &id, std::vector< void const * > &pointers, FillViewHelperVector &helpers) const
 
bool hasProductCache () const
 Checks if product is in memory. More...
 
ProductID id () const
 Accessor for product ID. More...
 
bool isAvailable () const
 
bool isNonnull () const
 Checks for non-null. More...
 
bool isNull () const
 Checks for null. More...
 
bool isTransient () const
 Checks if product collection is tansient (i.e. non persistable) More...
 
bool operator! () const
 Checks for null. More...
 
RefVectoroperator= (RefVector const &rhs)
 Copy assignment. More...
 
value_type const operator[] (size_type idx) const
 Retrieve an element of the RefVector. More...
 
EDProductGetter const * productGetter () const
 Accessor for product getter. More...
 
void push_back (value_type const &ref)
 Add a Ref<C, T> to the RefVector. More...
 
 RefVector ()
 
 RefVector (RefVector const &rh)
 
 RefVector (ProductID const &iId)
 
contents_type const & refVector () const
 Accessor for all data. More...
 
void reserve (size_type n)
 Reserve space for RefVector. More...
 
size_type size () const
 Size of the RefVector. More...
 
void swap (RefVector< C, T, F > &other)
 Swap two vectors. More...
 

Static Public Member Functions

static short Class_Version ()
 

Private Attributes

contents_type refVector_
 

Detailed Description

template<typename C, typename T, typename F>
class edm::RefVector< C, T, F >

Definition at line 24 of file EDProductfwd.h.

Member Typedef Documentation

template<typename C, typename T, typename F>
typedef C edm::RefVector< C, T, F >::collection_type

Definition at line 35 of file RefVector.h.

template<typename C, typename T, typename F>
typedef iterator edm::RefVector< C, T, F >::const_iterator

Definition at line 39 of file RefVector.h.

template<typename C, typename T, typename F>
typedef value_type const edm::RefVector< C, T, F >::const_reference

Definition at line 41 of file RefVector.h.

template<typename C, typename T, typename F>
typedef RefVectorBase<key_type> edm::RefVector< C, T, F >::contents_type

Definition at line 50 of file RefVector.h.

template<typename C, typename T, typename F>
typedef F edm::RefVector< C, T, F >::finder_type

Definition at line 37 of file RefVector.h.

template<typename C, typename T, typename F>
typedef refhelper::RefVectorTrait<C, T, F>::iterator_type edm::RefVector< C, T, F >::iterator

Definition at line 38 of file RefVector.h.

template<typename C, typename T, typename F>
typedef value_type::key_type edm::RefVector< C, T, F >::key_type

Definition at line 45 of file RefVector.h.

template<typename C, typename T, typename F>
typedef std::vector<key_type> edm::RefVector< C, T, F >::KeyVec

Definition at line 46 of file RefVector.h.

template<typename C, typename T, typename F>
typedef T edm::RefVector< C, T, F >::member_type

Definition at line 36 of file RefVector.h.

template<typename C, typename T, typename F>
typedef const_reference edm::RefVector< C, T, F >::reference

Definition at line 42 of file RefVector.h.

template<typename C, typename T, typename F>
typedef KeyVec::size_type edm::RefVector< C, T, F >::size_type

Definition at line 49 of file RefVector.h.

template<typename C, typename T, typename F>
typedef refhelper::RefVectorTrait<C, T, F>::ref_type edm::RefVector< C, T, F >::value_type

Definition at line 40 of file RefVector.h.

Constructor & Destructor Documentation

template<typename C, typename T, typename F>
edm::RefVector< C, T, F >::RefVector ( )
inline

Default constructor needed for reading from persistent store. Not for direct use.

Definition at line 54 of file RefVector.h.

54 : refVector_() {}
contents_type refVector_
Definition: RefVector.h:164
template<typename C, typename T, typename F>
edm::RefVector< C, T, F >::RefVector ( RefVector< C, T, F > const &  rh)
inline

Definition at line 55 of file RefVector.h.

55 : refVector_(rh.refVector_){}
contents_type refVector_
Definition: RefVector.h:164
template<typename C, typename T, typename F>
edm::RefVector< C, T, F >::RefVector ( ProductID const &  iId)
inline

Definition at line 60 of file RefVector.h.

60 : refVector_(iId) {}
contents_type refVector_
Definition: RefVector.h:164

Member Function Documentation

template<typename C, typename T, typename F>
value_type const edm::RefVector< C, T, F >::at ( size_type  idx) const
inline

Retrieve an element of the RefVector.

Definition at line 80 of file RefVector.h.

Referenced by TrackClassifierByProxy< Collection >::evaluate(), and VertexClassifierByProxy< reco::SecondaryVertexTagInfoCollection >::evaluate().

80  {
81  RefCore const& core = refVector_.refCore();
82  key_type const& key = refVector_.keys().at(idx);
83  void const* memberPointer = refVector_.cachedMemberPointer(idx);
84  if(memberPointer) {
85  RefCore newCore(core);
86  newCore.setProductPtr(memberPointer);
87  return value_type(newCore, key);
88  }
89  return value_type(core, key);
90  }
void const * cachedMemberPointer(size_type idx) const
Definition: RefVectorBase.h:55
value_type::key_type key_type
Definition: RefVector.h:45
contents_type refVector_
Definition: RefVector.h:164
RefCore const & refCore() const
Accessor for product ID and product getter.
Definition: RefVectorBase.h:53
keys_type const & keys() const
Accessor for vector of keys and pointers.
Definition: RefVectorBase.h:60
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
refhelper::RefVectorTrait< C, T, F >::ref_type value_type
Definition: RefVector.h:40
template<typename C , typename T , typename F >
RefVector< C, T, F >::const_iterator edm::RefVector< C, T, F >::begin ( void  ) const

Initialize an iterator over the RefVector.

Definition at line 250 of file RefVector.h.

Referenced by FWTauProxyBuilderBase::addConstituentTracks(), pat::TriggerEvent::algorithmObjects(), reco::GsfElectron::ambiguousGsfTracksBegin(), JetFlavourClustering::assignToSubjets(), TrackGenAssociatorByChi2Impl::associateGenToReco(), TrackAssociatorByChi2Impl::associateSimToReco(), RecoTrackRefSelector::begin(), CaloRecoTauAlgorithm::buildCaloTau(), Basic2DGenericPFlowPositionCalc::calculateAndSetPositionActual(), JetPlusTrackProducerAA::calculateBGtracksJet(), JetPlusTrackCorrector::calculateCorr(), reco::TauMassTagInfo::calculateTrkP4(), reco::HcalNoiseHPD::caloTowerEmE(), reco::HcalNoiseHPD::caloTowerEmFraction(), reco::HcalNoiseHPD::caloTowerHadE(), reco::HcalNoiseHPD::caloTowerTotalE(), reco::CastorCluster::CastorCluster(), reco::CastorTower::CastorTower(), TagProbeFitTreeProducer::checkMother(), CommonHcalNoiseRBXData::CommonHcalNoiseRBXData(), reco::JetSignalVertexCompatibilityAlgo::compatibility(), pat::TriggerEvent::conditionInAlgorithm(), JetPlusTrackCorrector::correctAA(), TrackingVertex::daughterTracks_begin(), TrackingParticle::decayVertices_begin(), pat::GenericParticle::embedTracks(), edm::RefVector< C, T, F >::erase(), JetPlusTrackCorrector::excludeJta(), VertexFitterResult::fill(), AdHocNTupler::fill(), reco::HcalNoiseInfoProducer::filldigis(), cms::PileupJPTJetIdAlgo::fillJPTBlock(), HLTHcalMETNoiseCleaner::filter(), HeavyQuarkFromMPIFilterAlgo::filter(), JetVertexChecker::filter(), TauTagTools::filteredTracks(), TauTagTools::filteredTracksByNumTrkHits(), pat::TriggerEvent::filterInPath(), CaloRecoTauTagInfoAlgorithm::filterTracksByQualityBit(), GenHFHadronMatcher::findHadronJets(), JetPlusTrackCorrector::findTrack(), GenParticlePruner::flagDaughters(), GenParticlePruner::flagMothers(), TrackingParticle::genParticle_begin(), TrackingVertex::genVertices_begin(), GenParticlePruner::getDaughterKeys(), HLTTauMCProducer::getGenDecayProducts(), GenParticlePruner::getMotherKeys(), CaloRecoTauTagInfoAlgorithm::getNeutralEcalBasicClusters(), GenParticlesHelper::hasAncestor(), HeavyQuarkFromMPIFilterAlgo::hasMPIAncestor(), reco::isodeposit::OtherJetConstituentsDeltaRVeto::initialize(), edm::OneToMany< reco::TrackJetCollection, reco::TrackCollection >::insert(), JetPlusTrackCorrector::jetDirFromTracks(), reco::IsolatedTauTagInfo::leadingSignalTrack(), main(), JetPlusTrackCorrector::matchTracks(), pat::TriggerEvent::objectInAlgorithm(), pat::TriggerEvent::objectInPath(), ElementsInAnnulusRef< math::XYZVector, DeltaR< math::XYZVector >, Angle< math::XYZVector >, reco::TrackCollection >::operator()(), ElementsInEllipse< reco::PFCandidate, reco::PFCandidate >::operator()(), TauConeIsolationAlgo< T, C, M >::operator()(), ElementsInConeRef< math::XYZVector, DeltaR< math::XYZVector >, reco::TrackCollection >::operator()(), GhostTrackComputer::operator()(), JoinCaloTowerRefVectorsWithoutDuplicates::operator()(), pat::TriggerEvent::pathObjects(), TrackingParticle::pdgId(), reco::PFIsolatedTauTagInfo::PFIsolatedTauTagInfo(), reco::EMIsolatedTauTagInfo::pIsol(), VZeroProducer::produce(), HLTHcalTowerNoiseCleaner::produce(), HLTHcalTowerNoiseCleanerWithrechit::produce(), TauGenJetProducer::produce(), HLTTauMCProducer::produce(), RecoTauJetRegionProducer::produce(), JetPlusTrackProducer::produce(), JetPlusTrackProducerAA::produce(), JetPlusTrackCorrector::rebuildJta(), reco::CastorTower::rechitsBegin(), GenParticlePruner::recursiveFlagDaughters(), GenParticlePruner::recursiveFlagMothers(), SoftLepton::refineJetAxis(), reco::PFNuclearInteraction::secPFRecTracks_begin(), reco::NuclearInteraction::seeds_begin(), JetFlavourClustering::setFlavours(), reco::CombinedTauTagInfo::signalTks_qsum(), TrackingVertex::sourceTracks_begin(), ConeIsolationAlgorithm::tag(), reco::CastorCluster::towersBegin(), reco::TrackKinematics::TrackKinematics(), reco::IsolatedTauTagInfo::tracksInCone(), and reco::HcalNoiseRBX::uniqueTowers().

250  {
251  return iterator(this, 0);
252  }
refhelper::RefVectorTrait< C, T, F >::iterator_type iterator
Definition: RefVector.h:38
template<typename C, typename T, typename F>
size_type edm::RefVector< C, T, F >::capacity ( ) const
inline

Capacity of the RefVector.

Definition at line 102 of file RefVector.h.

102 {return refVector_.capacity();}
contents_type refVector_
Definition: RefVector.h:164
size_type capacity() const
Capacity of vector.
Definition: RefVectorBase.h:86
template<typename C, typename T, typename F>
static short edm::RefVector< C, T, F >::Class_Version ( )
inlinestatic

Definition at line 160 of file RefVector.h.

162 :
163 
template<typename C, typename T, typename F>
void edm::RefVector< C, T, F >::clear ( void  )
inline
template<typename C, typename T, typename F>
bool edm::RefVector< C, T, F >::empty ( ) const
inline
template<typename C , typename T , typename F >
RefVector< C, T, F >::const_iterator edm::RefVector< C, T, F >::end ( void  ) const

Termination of iteration.

Definition at line 255 of file RefVector.h.

References edm::RefVector< C, T, F >::size().

Referenced by FWTauProxyBuilderBase::addConstituentTracks(), pat::TriggerEvent::algorithmObjects(), pat::TriggerEvent::algorithmRef(), reco::GsfElectron::ambiguousGsfTracksEnd(), JetFlavourClustering::assignToSubjets(), TrackGenAssociatorByChi2Impl::associateGenToReco(), TrackAssociatorByChi2Impl::associateSimToReco(), CaloRecoTauAlgorithm::buildCaloTau(), Basic2DGenericPFlowPositionCalc::calculateAndSetPositionActual(), JetPlusTrackProducerAA::calculateBGtracksJet(), JetPlusTrackCorrector::calculateCorr(), reco::TauMassTagInfo::calculateTrkP4(), reco::HcalNoiseHPD::caloTowerEmE(), reco::HcalNoiseHPD::caloTowerEmFraction(), reco::HcalNoiseHPD::caloTowerHadE(), reco::HcalNoiseHPD::caloTowerTotalE(), reco::CastorCluster::CastorCluster(), reco::CastorTower::CastorTower(), TagProbeFitTreeProducer::checkMother(), CommonHcalNoiseRBXData::CommonHcalNoiseRBXData(), reco::JetSignalVertexCompatibilityAlgo::compatibility(), pat::TriggerEvent::conditionInAlgorithm(), pat::TriggerEvent::conditionRef(), JetPlusTrackCorrector::correctAA(), Types.LuminosityBlockRange::cppID(), Types.EventRange::cppID(), TrackingVertex::daughterTracks_end(), TrackingParticle::decayVertices_end(), pat::GenericParticle::embedTracks(), RecoTrackRefSelector::end(), JetPlusTrackCorrector::excludeJta(), VertexFitterResult::fill(), AdHocNTupler::fill(), reco::HcalNoiseInfoProducer::filldigis(), cms::PileupJPTJetIdAlgo::fillJPTBlock(), HLTHcalMETNoiseCleaner::filter(), HeavyQuarkFromMPIFilterAlgo::filter(), JetVertexChecker::filter(), TauTagTools::filteredTracks(), TauTagTools::filteredTracksByNumTrkHits(), pat::TriggerEvent::filterInPath(), pat::TriggerEvent::filterRef(), CaloRecoTauTagInfoAlgorithm::filterTracksByQualityBit(), GenHFHadronMatcher::findHadronJets(), JetPlusTrackCorrector::findTrack(), GenParticlePruner::flagDaughters(), GenParticlePruner::flagMothers(), TrackingParticle::genParticle_end(), TrackingVertex::genVertices_end(), GenParticlePruner::getDaughterKeys(), HLTTauMCProducer::getGenDecayProducts(), GenParticlePruner::getMotherKeys(), CaloRecoTauTagInfoAlgorithm::getNeutralEcalBasicClusters(), GenParticlesHelper::hasAncestor(), HeavyQuarkFromMPIFilterAlgo::hasMPIAncestor(), reco::isodeposit::OtherJetConstituentsDeltaRVeto::initialize(), edm::OneToMany< reco::TrackJetCollection, reco::TrackCollection >::insert(), JetPlusTrackCorrector::jetDirFromTracks(), reco::IsolatedTauTagInfo::leadingSignalTrack(), main(), JetPlusTrackCorrector::matchTracks(), pat::TriggerEvent::objectInAlgorithm(), pat::TriggerEvent::objectInPath(), TauConeIsolationAlgo< T, C, M >::operator()(), ElementsInEllipse< reco::PFCandidate, reco::PFCandidate >::operator()(), ElementsInAnnulusRef< math::XYZVector, DeltaR< math::XYZVector >, Angle< math::XYZVector >, reco::TrackCollection >::operator()(), ElementsInConeRef< math::XYZVector, DeltaR< math::XYZVector >, reco::TrackCollection >::operator()(), GhostTrackComputer::operator()(), JoinCaloTowerRefVectorsWithoutDuplicates::operator()(), pat::TriggerEvent::pathObjects(), pat::TriggerEvent::pathRef(), reco::PFIsolatedTauTagInfo::PFIsolatedTauTagInfo(), reco::EMIsolatedTauTagInfo::pIsol(), VZeroProducer::produce(), HLTHcalTowerNoiseCleaner::produce(), HLTHcalTowerNoiseCleanerWithrechit::produce(), TauGenJetProducer::produce(), HLTTauMCProducer::produce(), RecoTauJetRegionProducer::produce(), JetPlusTrackProducer::produce(), JetPlusTrackProducerAA::produce(), JetPlusTrackCorrector::rebuildJta(), reco::CastorTower::rechitsEnd(), GenParticlePruner::recursiveFlagDaughters(), GenParticlePruner::recursiveFlagMothers(), SoftLepton::refineJetAxis(), reco::PFNuclearInteraction::secPFRecTracks_end(), reco::NuclearInteraction::seeds_end(), JetFlavourClustering::setFlavours(), reco::CombinedTauTagInfo::signalTks_qsum(), TrackingVertex::sourceTracks_end(), ConeIsolationAlgorithm::tag(), reco::CastorCluster::towersEnd(), reco::TrackKinematics::TrackKinematics(), reco::IsolatedTauTagInfo::tracksInCone(), and reco::HcalNoiseRBX::uniqueTowers().

255  {
256  return iterator(this, size());
257  }
refhelper::RefVectorTrait< C, T, F >::iterator_type iterator
Definition: RefVector.h:38
size_type size() const
Size of the RefVector.
Definition: RefVector.h:99
template<typename C , typename T , typename F >
RefVector< C, T, F >::iterator edm::RefVector< C, T, F >::erase ( iterator const &  pos)
inline

Erase an element from the vector.

Definition at line 241 of file RefVector.h.

References edm::RefVector< C, T, F >::begin(), edm::RefVectorBase< T >::eraseAtIndex(), cmsHarvester::index, edm::RefVectorBase< T >::keys(), and edm::RefVector< C, T, F >::refVector_.

241  {
243  typename contents_type::keys_type::iterator newPos =
244  refVector_.eraseAtIndex(index);
245  typename contents_type::keys_type::size_type newIndex = newPos - refVector_.keys().begin();
246  return iterator(this, newIndex);
247  }
contents_type refVector_
Definition: RefVector.h:164
keys_type::iterator eraseAtIndex(size_type index)
erase an element from the vector
Definition: RefVectorBase.h:92
uint16_t size_type
const_iterator begin() const
Initialize an iterator over the RefVector.
Definition: RefVector.h:250
refhelper::RefVectorTrait< C, T, F >::iterator_type iterator
Definition: RefVector.h:38
keys_type const & keys() const
Accessor for vector of keys and pointers.
Definition: RefVectorBase.h:60
template<typename C, typename T, typename F>
void edm::RefVector< C, T, F >::fillView ( ProductID const &  id,
std::vector< void const * > &  pointers,
FillViewHelperVector helpers 
) const
template<typename C, typename T, typename F>
bool edm::RefVector< C, T, F >::hasProductCache ( ) const
inline

Checks if product is in memory.

Definition at line 153 of file RefVector.h.

153 {return refVector_.refCore().productPtr() != 0;}
contents_type refVector_
Definition: RefVector.h:164
RefCore const & refCore() const
Accessor for product ID and product getter.
Definition: RefVectorBase.h:53
void const * productPtr() const
Definition: RefCore.h:41
template<typename C, typename T, typename F>
ProductID edm::RefVector< C, T, F >::id ( ) const
inline

Accessor for product ID.

Definition at line 114 of file RefVector.h.

Referenced by edm::RefVector< JetEisolAssociationCollection >::isNull(), RecoTauJetRegionProducer::produce(), RecoTauPiZeroProducer::produce(), and PFRecoTauChargedHadronProducer::produce().

114 {return refVector_.refCore().id();}
contents_type refVector_
Definition: RefVector.h:164
RefCore const & refCore() const
Accessor for product ID and product getter.
Definition: RefVectorBase.h:53
ProductID id() const
Definition: RefCore.h:38
template<typename C , typename T , typename F >
bool edm::RefVector< C, T, F >::isAvailable ( ) const

Checks if product collection is in memory or available in the Event. No type checking is done.

Definition at line 261 of file RefVector.h.

References edm::RefVector< C, T, F >::empty(), i, edm::RefCore::isAvailable(), edm::RefVectorBase< T >::refCore(), edm::RefVector< C, T, F >::refVector_, and edm::RefVector< C, T, F >::size().

Referenced by EwkMuTauHistManager::fillHistograms().

261  {
262  if(refVector_.refCore().isAvailable()) {
263  return true;
264  } else if(empty()) {
265  return false;
266  }
267 
268  // The following is the simplest implementation, but
269  // this is woefully inefficient and could be optimized
270  // to run much faster with some nontrivial effort. There
271  // is only 1 place in the code base where this function
272  // is used at all and I'm not sure whether it will ever
273  // be used with thinned collections, so for the moment I
274  // am not spending the time to optimize this.
275  for(size_type i = 0; i < size(); ++i) {
276  if(!(*this)[i].isAvailable()) {
277  return false;
278  }
279  }
280  return true;
281  }
int i
Definition: DBlmapReader.cc:9
contents_type refVector_
Definition: RefVector.h:164
bool empty() const
Is the RefVector empty.
Definition: RefVector.h:96
KeyVec::size_type size_type
Definition: RefVector.h:49
RefCore const & refCore() const
Accessor for product ID and product getter.
Definition: RefVectorBase.h:53
bool isAvailable() const
Definition: RefCore.cc:168
size_type size() const
Size of the RefVector.
Definition: RefVector.h:99
template<typename C, typename T, typename F>
bool edm::RefVector< C, T, F >::isNonnull ( ) const
inline

Checks for non-null.

Definition at line 123 of file RefVector.h.

123 {return !isNull();}
bool isNull() const
Checks for null.
Definition: RefVector.h:120
template<typename C, typename T, typename F>
bool edm::RefVector< C, T, F >::isNull ( ) const
inline

Checks for null.

Definition at line 120 of file RefVector.h.

Referenced by edm::RefVector< JetEisolAssociationCollection >::isNonnull(), and edm::RefVector< JetEisolAssociationCollection >::operator!().

120 {return !id().isValid();}
ProductID id() const
Accessor for product ID.
Definition: RefVector.h:114
bool isValid() const
Definition: ProductID.h:35
template<typename C, typename T, typename F>
bool edm::RefVector< C, T, F >::isTransient ( ) const
inline

Checks if product collection is tansient (i.e. non persistable)

Definition at line 133 of file RefVector.h.

133 {return refVector_.refCore().isTransient();}
contents_type refVector_
Definition: RefVector.h:164
RefCore const & refCore() const
Accessor for product ID and product getter.
Definition: RefVectorBase.h:53
bool isTransient() const
Definition: RefCore.h:95
template<typename C, typename T, typename F>
bool edm::RefVector< C, T, F >::operator! ( ) const
inline

Checks for null.

Definition at line 126 of file RefVector.h.

126 {return isNull();}
bool isNull() const
Checks for null.
Definition: RefVector.h:120
template<typename C, typename T, typename F>
RefVector< C, T, F > & edm::RefVector< C, T, F >::operator= ( RefVector< C, T, F > const &  rhs)
inline

Copy assignment.

Definition at line 177 of file RefVector.h.

References edm::RefVector< C, T, F >::swap(), and groupFilesInBlocks::temp.

177  {
178  RefVector<C, T, F> temp(rhs);
179  this->swap(temp);
180  return *this;
181  }
void swap(RefVector< C, T, F > &other)
Swap two vectors.
Definition: RefVector.h:170
template<typename C, typename T, typename F>
value_type const edm::RefVector< C, T, F >::operator[] ( size_type  idx) const
inline

Retrieve an element of the RefVector.

Definition at line 67 of file RefVector.h.

67  {
68  RefCore const& core = refVector_.refCore();
69  key_type const& key = refVector_.keys()[idx];
70  void const* memberPointer = refVector_.cachedMemberPointer(idx);
71  if(memberPointer) {
72  RefCore newCore(core);
73  newCore.setProductPtr(memberPointer);
74  return value_type(newCore, key);
75  }
76  return value_type(core, key);
77  }
void const * cachedMemberPointer(size_type idx) const
Definition: RefVectorBase.h:55
value_type::key_type key_type
Definition: RefVector.h:45
contents_type refVector_
Definition: RefVector.h:164
RefCore const & refCore() const
Accessor for product ID and product getter.
Definition: RefVectorBase.h:53
keys_type const & keys() const
Accessor for vector of keys and pointers.
Definition: RefVectorBase.h:60
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
refhelper::RefVectorTrait< C, T, F >::ref_type value_type
Definition: RefVector.h:40
template<typename C, typename T, typename F>
EDProductGetter const* edm::RefVector< C, T, F >::productGetter ( ) const
inline

Accessor for product getter.

Definition at line 117 of file RefVector.h.

117 {return refVector_.refCore().productGetter();}
contents_type refVector_
Definition: RefVector.h:164
RefCore const & refCore() const
Accessor for product ID and product getter.
Definition: RefVectorBase.h:53
EDProductGetter const * productGetter() const
Definition: RefCore.h:73
template<typename C, typename T, typename F>
void edm::RefVector< C, T, F >::push_back ( value_type const &  ref)
inline

Add a Ref<C, T> to the RefVector.

Definition at line 62 of file RefVector.h.

Referenced by pat::TriggerEvent::acceptedAlgorithms(), pat::TriggerEvent::acceptedAlgorithmsGtl(), pat::TriggerEvent::acceptedConditions(), pat::TriggerEvent::acceptedFilters(), pat::TriggerEvent::acceptedPaths(), pat::TriggerEvent::acceptedPhysAlgorithms(), pat::TriggerEvent::acceptedPhysAlgorithmsGtl(), pat::TriggerEvent::acceptedTechAlgorithms(), pat::TriggerEvent::acceptedTechAlgorithmsGtl(), reco::CastorTower::add(), reco::CastorCluster::add(), reco::GsfElectron::addAmbiguousGsfTrack(), reco::PhotonCore::addConversion(), reco::GsfElectronCore::addConversion(), reco::PFCandidatePhotonExtra::addConversionRef(), reco::PFCandidateEGammaExtra::addConversionRef(), reco::CompositeRefCandidate::addDaughter(), TrackingVertex::addDaughterTrack(), TrackingParticle::addDecayVertex(), reco::PhotonCore::addElectronPixelSeed(), reco::PFCandidate::addElementInBlock(), TrackingParticle::addGenParticle(), TrackingVertex::addGenVertex(), reco::CompositeRefCandidate::addMother(), reco::PFRecHit::addNeighbour(), reco::PhotonCore::addOneLegConversion(), reco::GsfElectronCore::addOneLegConversion(), TrackingVertex::addParentTrack(), reco::PFCandidateEGammaExtra::addSingleLegConversionRef(), GlobalHaloAlgo::AddtoBeamHaloEBEERechits(), pat::TriggerEvent::algorithmConditions(), pat::TriggerEvent::algorithmObjects(), pat::TriggerEvent::algorithmRefs(), RecoMuonValidator::analyze(), helper::SimpleJetTrackAssociator::associate(), TrackGenAssociatorByChi2Impl::associateGenToReco(), JetTracksAssociationXtrpCalo::associateInputTracksToJet(), MuonToSimAssociatorByHits::associateMuons(), MuonToTrackingParticleAssociatorByHitsImpl::associateMuons(), TrackGenAssociatorByChi2Impl::associateRecoToGen(), MuonAssociatorByHits::associateRecoToSim(), reco::TrackToTrackingParticleAssociatorBaseImpl::associateRecoToSim(), reco::TrackToTrackingParticleAssociatorBaseImpl::associateSimToReco(), MuonAssociatorByHits::associateSimToReco(), helper::SimpleJetTrackAssociator::associateTransient(), CaloRecoTauAlgorithm::buildCaloTau(), EcalHaloAlgo::Calculate(), CSCHaloAlgo::Calculate(), JetPlusTrackProducerAA::calculateBGtracksJet(), reco::CastorCluster::CastorCluster(), reco::CastorTower::CastorTower(), pat::TriggerEvent::conditionAlgorithms(), pat::TriggerEvent::conditionObjects(), pat::TriggerEvent::conditionRefs(), JetPlusTrackCorrector::excludeJta(), pat::GenericParticle::fillInFrom(), PFTauViewRefSelector::filter(), ElectronSeedProducer::filterClusters(), TauTagTools::filteredTracks(), TauTagTools::filteredTracksByNumTrkHits(), pat::TriggerEvent::filterObjects(), pat::TriggerEvent::filterPaths(), pat::TriggerEvent::filterRefs(), CaloRecoTauTagInfoAlgorithm::filterTracksByQualityBit(), HLTTauMCProducer::getGenDecayProducts(), EcalHaloAlgo::GetHaloClusterCandidateEB(), EcalHaloAlgo::GetHaloClusterCandidateEE(), HcalHaloAlgo::GetHaloClusterCandidateHB(), HcalHaloAlgo::GetHaloClusterCandidateHE(), reco::PFJet::getTrackRefs(), JetPlusTrackCorrector::matchTracks(), pat::TriggerEvent::objectAlgorithms(), pat::TriggerEvent::objectConditions(), pat::TriggerEvent::objectFilters(), pat::TriggerEvent::objectPaths(), pat::TriggerEvent::objectRefs(), pat::TriggerEvent::objects(), TauConeIsolationAlgo< T, C, M >::operator()(), ElementsInAnnulusRef< math::XYZVector, DeltaR< math::XYZVector >, Angle< math::XYZVector >, reco::TrackCollection >::operator()(), ElementsInEllipse< reco::PFCandidate, reco::PFCandidate >::operator()(), ElementsInConeRef< math::XYZVector, DeltaR< math::XYZVector >, reco::TrackCollection >::operator()(), JoinCaloTowerRefVectorsWithoutDuplicates::operator()(), pat::TriggerEvent::pathFilters(), pat::TriggerEvent::pathModules(), pat::TriggerEvent::pathObjects(), pat::TriggerEvent::pathRefs(), reco::PFIsolatedTauTagInfo::PFIsolatedTauTagInfo(), reco::PFTauDecayMode::pfMasterClones(), pat::TriggerEvent::physAlgorithms(), JetTracksAssociationDRVertex::produce(), VZeroProducer::produce(), JetTracksAssociationDRVertexAssigned::produce(), JetTracksAssociationDRCalo::produce(), JetVetoedTracksAssociationDRVertex::produce(), CastorFastTowerProducer::produce(), CastorFastClusterProducer::produce(), CleanAndMergeProducer::produce(), PFDisplacedTrackerVertexProducer::produce(), PFNuclearProducer::produce(), PFTauViewRefMerger::produce(), RecoTauPiZeroUnembedder::produce(), HLTTauMCProducer::produce(), PixelVertexProducer::produce(), HLTJetCollectionsForBoostedLeptonPlusJets< jetType >::produce(), HLTJetCollectionsForLeptonPlusJets< jetType >::produce(), ReducedEGProducer::produce(), CastorClusterProducer::produce(), MuonMCClassifier::produce(), HLTJetsCleanedFromLeadingLeptons< JetType >::produce(), JetFlavourClustering::produce(), JetPlusTrackCorrector::rebuildJta(), PFPhotonAlgo::RunPFPhoton(), RecoTrackRefSelector::select(), reco::PFBlockElementTrack::setConversionRef(), ConeIsolationAlgorithm::tag(), pat::TriggerEvent::techAlgorithms(), reco::IsolatedTauTagInfo::tracksInCone(), edm::OneToMany< reco::TrackJetCollection, reco::TrackCollection >::transientMap(), and edm::OneToMany< reco::TrackJetCollection, reco::TrackCollection >::val().

62  {
63  refVector_.pushBack(ref.refCore(), ref.key());
64  }
contents_type refVector_
Definition: RefVector.h:164
void pushBack(RefCore const &product, KEY const &key)
Definition: RefVectorBase.h:68
template<typename C, typename T, typename F>
contents_type const& edm::RefVector< C, T, F >::refVector ( ) const
inline

Accessor for all data.

Definition at line 93 of file RefVector.h.

93 {return refVector_;}
contents_type refVector_
Definition: RefVector.h:164
template<typename C, typename T, typename F>
void edm::RefVector< C, T, F >::reserve ( size_type  n)
inline

Reserve space for RefVector.

Definition at line 105 of file RefVector.h.

Referenced by reco::PFJet::getTrackRefs(), reco::HcalNoiseHPD::HcalNoiseHPD(), and reco::PFCandidate::PFCandidate().

105 {refVector_.reserve(n);}
contents_type refVector_
Definition: RefVector.h:164
void reserve(size_type n)
Reserve space for vector.
Definition: RefVectorBase.h:89
template<typename C, typename T, typename F>
size_type edm::RefVector< C, T, F >::size ( void  ) const
inline

Size of the RefVector.

Definition at line 99 of file RefVector.h.

Referenced by reco::PFCandidate::addElementInBlock(), GlobalHaloAlgo::AddtoBeamHaloEBEERechits(), GlobalHaloAlgo::AddtoBeamHaloHBHERechits(), reco::GsfElectron::ambiguousGsfTracksSize(), PhotonsWithConversionsAnalyzer::analyze(), BTagPerformanceAnalyzerMC::analyze(), PhotonValidator::analyze(), PhotonAnalyzer::analyze(), BeamHaloAnalyzer::analyze(), TrackGenAssociatorByChi2Impl::associateRecoToGen(), TrackAssociatorByPositionImpl::associateRecoToSim(), TrackAssociatorByChi2Impl::associateRecoToSim(), MuonAssociatorByHitsHelper::associateRecoToSimIndices(), TrackAssociatorByPositionImpl::associateSimToReco(), MuonAssociatorByHitsHelper::associateSimToRecoIndices(), PVPositionBuilder::average(), CaloRecoTauAlgorithm::buildCaloTau(), reco::TauMassTagInfo::calculateTrkP4(), reco::JPTJet::chargedMultiplicity(), JetPlusTrackCorrector::correctAA(), PFPhotonTranslator::createPhotonCores(), CaloRecoTauDiscriminationByDeltaE::DeltaE(), reco::IsolatedTauTagInfo::discriminator(), TauElementsOperators::discriminatorByIsolTracksN(), JetPlusTrackCorrector::elecCorrection(), reco::JPTJet::elecMultiplicity(), pat::Jet::elecMultiplicity(), reco::PFCandidate::elementsInBlocks(), pat::GenericParticle::embedTracks(), edm::RefVector< C, T, F >::end(), TrackClassifierByProxy< Collection >::evaluate(), VertexClassifierByProxy< reco::SecondaryVertexTagInfoCollection >::evaluate(), JetPlusTrackCorrector::excludeJta(), AdHocNTupler::fill(), EwkMuTauHistManager::fillHistograms(), cms::PileupJPTJetIdAlgo::fillJPTBlock(), ElectronSeedProducer::filterClusters(), ElectronSeedProducer::filterSeeds(), DivisiveVertexFinder::findVertexes(), DivisiveVertexFinder::findVertexesAlt(), GenParticlePruner::getDaughterKeys(), HLTMuonL2ToL1Map::getL1Keys(), HLTMuonL2ToL1TMap::getL1Keys(), GenParticlePruner::getMotherKeys(), reco::JetTrackMatch< reco::GenJetCollection >::getTracks(), GeneralTracksImporter::importToBlock(), edm::RefVector< C, T, F >::isAvailable(), NuclearInteractionEDProducer::isInside(), HLTMuonL2ToL1Map::isTriggeredByL1(), HLTMuonL2ToL1TMap::isTriggeredByL1(), reco::IsolatedTauTagInfo::leadingSignalTrack(), reco::PFTau::leadTauChargedHadronCandidate(), main(), JetPlusTrackCorrector::matchTracks(), JetPlusTrackCorrector::muonCorrection(), reco::JPTJet::muonMultiplicity(), TrackingVertex::nDaughterTracks(), TrackingVertex::nGenVertices(), TrackingVertex::nSourceTracks(), reco::CompositeRefCandidate::numberOfDaughters(), reco::EcalHaloData::NumberOfHaloSuperClusters(), reco::CSCHaloData::NumberOfHaloTracks(), reco::CompositeRefCandidate::numberOfMothers(), pat::GenericParticle::numberOfTracks(), operator<<(), pat::TriggerEvent::pathModules(), JetPlusTrackCorrector::pionCorrection(), reco::JPTJet::print(), reco::JPTJet::printJet(), VZeroProducer::produce(), CleanAndMergeProducer::produce(), RecoTauPiZeroUnembedder::produce(), GEDPhotonCoreProducer::produce(), TauGenJetProducer::produce(), HLTTauMCProducer::produce(), PixelVertexProducer::produce(), RecoTauJetRegionProducer::produce(), RecoTauPiZeroProducer::produce(), ReducedEGProducer::produce(), RecoTauProducer::produce(), CaloRecHitsBeamHaloCleaned::produce(), PFRecoTauChargedHadronProducer::produce(), PFPhotonTranslator::produce(), reco::BeamHaloSummaryProducer::produce(), TriggerMatcherToHLTDebug::produce(), reco::CastorTower::rechitsSize(), ElectronSeedGenerator::run(), PFPhotonAlgo::RunPFPhoton(), reco::NuclearInteraction::seedsSize(), JetFlavourClustering::setFlavours(), reco::CombinedTauTagInfo::signalTks_qsum(), RecoTrackRefSelector::size(), reco::CastorCluster::towersSize(), reco::JetTracksAssociation::tracksP4(), VertexHistoryAnalyzer::vertexString(), TrackHistoryAnalyzer::vertexString(), and PVPositionBuilder::wtAverage().

99 {return refVector_.size();}
contents_type refVector_
Definition: RefVector.h:164
size_type size() const
Size of vector.
Definition: RefVectorBase.h:66
template<typename C, typename T, typename F>
void edm::RefVector< C, T, F >::swap ( RefVector< C, T, F > &  other)
inline

Swap two vectors.

Definition at line 170 of file RefVector.h.

References edm::RefVectorBase< T >::swap().

Referenced by edm::RefVector< C, T, F >::operator=().

170  {
171  refVector_.swap(other.refVector_);
172  }
contents_type refVector_
Definition: RefVector.h:164
void swap(RefVectorBase< KEY > &other)
swap two vectors

Member Data Documentation

template<typename C, typename T, typename F>
contents_type edm::RefVector< C, T, F >::refVector_
private