CMS 3D CMS Logo

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)
 
RefVectoroperator= (RefVector &&rhs)
 
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 (RefVector &&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...
 
 ~RefVector ()=default
 

Static Public Member Functions

static short Class_Version ()
 

Private Attributes

contents_type refVector_
 

Detailed Description

template<typename C, typename T = typename refhelper::ValueTrait<C>::value, typename F = typename refhelper::FindTrait<C, T>::value>
class edm::RefVector< C, T, F >

Definition at line 23 of file EDProductfwd.h.

Member Typedef Documentation

template<typename C, typename T = typename refhelper::ValueTrait<C>::value, typename F = typename refhelper::FindTrait<C, T>::value>
typedef C edm::RefVector< C, T, F >::collection_type

Definition at line 34 of file RefVector.h.

template<typename C, typename T = typename refhelper::ValueTrait<C>::value, typename F = typename refhelper::FindTrait<C, T>::value>
typedef iterator edm::RefVector< C, T, F >::const_iterator

Definition at line 38 of file RefVector.h.

template<typename C, typename T = typename refhelper::ValueTrait<C>::value, typename F = typename refhelper::FindTrait<C, T>::value>
typedef value_type const edm::RefVector< C, T, F >::const_reference

Definition at line 40 of file RefVector.h.

template<typename C, typename T = typename refhelper::ValueTrait<C>::value, typename F = typename refhelper::FindTrait<C, T>::value>
typedef RefVectorBase<key_type> edm::RefVector< C, T, F >::contents_type

Definition at line 49 of file RefVector.h.

template<typename C, typename T = typename refhelper::ValueTrait<C>::value, typename F = typename refhelper::FindTrait<C, T>::value>
typedef F edm::RefVector< C, T, F >::finder_type

Definition at line 36 of file RefVector.h.

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

Definition at line 37 of file RefVector.h.

template<typename C, typename T = typename refhelper::ValueTrait<C>::value, typename F = typename refhelper::FindTrait<C, T>::value>
typedef value_type::key_type edm::RefVector< C, T, F >::key_type

Definition at line 44 of file RefVector.h.

template<typename C, typename T = typename refhelper::ValueTrait<C>::value, typename F = typename refhelper::FindTrait<C, T>::value>
typedef std::vector<key_type> edm::RefVector< C, T, F >::KeyVec

Definition at line 45 of file RefVector.h.

template<typename C, typename T = typename refhelper::ValueTrait<C>::value, typename F = typename refhelper::FindTrait<C, T>::value>
typedef T edm::RefVector< C, T, F >::member_type

Definition at line 35 of file RefVector.h.

template<typename C, typename T = typename refhelper::ValueTrait<C>::value, typename F = typename refhelper::FindTrait<C, T>::value>
typedef const_reference edm::RefVector< C, T, F >::reference

Definition at line 41 of file RefVector.h.

template<typename C, typename T = typename refhelper::ValueTrait<C>::value, typename F = typename refhelper::FindTrait<C, T>::value>
typedef KeyVec::size_type edm::RefVector< C, T, F >::size_type

Definition at line 48 of file RefVector.h.

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

Definition at line 39 of file RefVector.h.

Constructor & Destructor Documentation

template<typename C, typename T = typename refhelper::ValueTrait<C>::value, typename F = typename refhelper::FindTrait<C, T>::value>
edm::RefVector< C, T, F >::RefVector ( )
inline

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

Definition at line 53 of file RefVector.h.

53 : refVector_() {}
contents_type refVector_
Definition: RefVector.h:164
template<typename C, typename T = typename refhelper::ValueTrait<C>::value, typename F = typename refhelper::FindTrait<C, T>::value>
edm::RefVector< C, T, F >::~RefVector ( )
default
template<typename C, typename T = typename refhelper::ValueTrait<C>::value, typename F = typename refhelper::FindTrait<C, T>::value>
edm::RefVector< C, T, F >::RefVector ( RefVector< C, T, F > const &  rh)
inline

Definition at line 56 of file RefVector.h.

56 : refVector_(rh.refVector_){}
contents_type refVector_
Definition: RefVector.h:164
template<typename C, typename T = typename refhelper::ValueTrait<C>::value, typename F = typename refhelper::FindTrait<C, T>::value>
edm::RefVector< C, T, F >::RefVector ( RefVector< C, T, F > &&  rh)
inline

Definition at line 57 of file RefVector.h.

57 : refVector_(std::move(rh.refVector_)){}
contents_type refVector_
Definition: RefVector.h:164
def move(src, dest)
Definition: eostools.py:510
template<typename C, typename T = typename refhelper::ValueTrait<C>::value, typename F = typename refhelper::FindTrait<C, T>::value>
edm::RefVector< C, T, F >::RefVector ( ProductID const &  iId)
inline

Definition at line 67 of file RefVector.h.

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

Member Function Documentation

template<typename C, typename T = typename refhelper::ValueTrait<C>::value, typename F = typename refhelper::FindTrait<C, T>::value>
value_type const edm::RefVector< C, T, F >::at ( size_type  idx) const
inline

Retrieve an element of the RefVector.

Definition at line 88 of file RefVector.h.

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

88  {
89  RefCore const& core = refVector_.refCore();
90  key_type const& key = refVector_.keys().at(idx);
91  void const* memberPointer = refVector_.cachedMemberPointer(idx);
92  if(memberPointer) {
93  RefCore newCore(core);
94  newCore.setProductPtr(memberPointer);
95  return value_type(newCore, key);
96  }
97  return value_type(core, key);
98  }
void const * cachedMemberPointer(size_type idx) const
Definition: RefVectorBase.h:67
value_type::key_type key_type
Definition: RefVector.h:44
Definition: __init__.py:1
contents_type refVector_
Definition: RefVector.h:164
RefCore const & refCore() const
Accessor for product ID and product getter.
Definition: RefVectorBase.h:65
keys_type const & keys() const
Accessor for vector of keys and pointers.
Definition: RefVectorBase.h:72
refhelper::RefVectorTrait< C, T, F >::ref_type value_type
Definition: RefVector.h:39
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 248 of file RefVector.h.

Referenced by FWTauProxyBuilderBase::addConstituentTracks(), pat::TriggerEvent::algorithmObjects(), reco::GsfElectron::ambiguousGsfTracksBegin(), JetFlavourClustering::assignToSubjets(), TrackGenAssociatorByChi2Impl::associateGenToReco(), TrackAssociatorByChi2Impl::associateSimToReco(), RecoTrackRefSelector::begin(), HitPixelLayersTPSelector::begin(), CaloRecoTauAlgorithm::buildCaloTau(), 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(), edm::RefVector< C, T, F >::fillView(), HLTHcalMETNoiseCleaner::filter(), HeavyQuarkFromMPIFilterAlgo::filter(), JetVertexChecker::filter(), TauTagTools::filteredTracks(), TauTagTools::filteredTracksByNumTrkHits(), pat::TriggerEvent::filterInPath(), CaloRecoTauTagInfoAlgorithm::filterTracksByQualityBit(), GenParticlesHelper::findDescendents(), GenHFHadronMatcher::findHadronJets(), GenParticlesHelper::findSisters(), JetPlusTrackCorrector::findTrack(), GenParticlePruner::flagDaughters(), GenParticlePruner::flagMothers(), CaloParticle::genParticle_begin(), SimCluster::genParticle_begin(), 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(), JetFlavourClustering::insertGhosts(), SeedMultiplicityAnalyzer::FromTrackRefSeedFilter::isSelected(), JetPlusTrackCorrector::jetDirFromTracks(), reco::IsolatedTauTagInfo::leadingSignalTrack(), main(), JetPlusTrackCorrector::matchTracks(), pat::TriggerEvent::objectInAlgorithm(), pat::TriggerEvent::objectInPath(), ElementsInEllipse< reco::PFCandidate, reco::PFCandidate >::operator()(), TauConeIsolationAlgo< T, C, M >::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()(), operator<<(), pat::TriggerEvent::pathObjects(), CaloParticle::pdgId(), SimCluster::pdgId(), TrackingParticle::pdgId(), reco::PFIsolatedTauTagInfo::PFIsolatedTauTagInfo(), reco::EMIsolatedTauTagInfo::pIsol(), VZeroProducer::produce(), HLTHcalTowerNoiseCleaner::produce(), HLTHcalTowerNoiseCleanerWithrechit::produce(), TauGenJetProducer::produce(), HLTTauMCProducer::produce(), JetPlusTrackProducer::produce(), JetPlusTrackProducerAA::produce(), JetPlusTrackCorrector::rebuildJta(), reco::CastorTower::rechitsBegin(), GenParticlePruner::recursiveFlagDaughters(), GenParticlePruner::recursiveFlagMothers(), SoftLepton::refineJetAxis(), TauElementsOperators::replaceSubStr(), edm::RefVector< reco::CastorTowerCollection, typename Ref< reco::CastorTowerCollection >::value_type, typename Ref< reco::CastorTowerCollection >::finder_type >::reserve(), reco::PFNuclearInteraction::secPFRecTracks_begin(), reco::NuclearInteraction::seeds_begin(), JetFlavourClustering::setFlavours(), reco::CombinedTauTagInfo::signalTks_qsum(), CaloParticle::simCluster_begin(), TrackingVertex::sourceTracks_begin(), reco::CastorCluster::towersBegin(), reco::TrackKinematics::TrackKinematics(), reco::IsolatedTauTagInfo::tracksInCone(), and reco::HcalNoiseRBX::uniqueTowers().

248  {
249  return iterator(this, 0);
250  }
refhelper::RefVectorTrait< C, T, F >::iterator_type iterator
Definition: RefVector.h:37
template<typename C, typename T = typename refhelper::ValueTrait<C>::value, typename F = typename refhelper::FindTrait<C, T>::value>
size_type edm::RefVector< C, T, F >::capacity ( ) const
inline

Capacity of the RefVector.

Definition at line 110 of file RefVector.h.

110 {return refVector_.capacity();}
contents_type refVector_
Definition: RefVector.h:164
size_type capacity() const
Capacity of vector.
Definition: RefVectorBase.h:98
template<typename C, typename T = typename refhelper::ValueTrait<C>::value, typename F = typename refhelper::FindTrait<C, T>::value>
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 refhelper::ValueTrait<C>::value, typename F = typename refhelper::FindTrait<C, T>::value>
void edm::RefVector< C, T, F >::clear ( void  )
inline
template<typename C, typename T = typename refhelper::ValueTrait<C>::value, typename F = typename refhelper::FindTrait<C, T>::value>
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 253 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(), 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(), HitPixelLayersTPSelector::end(), JetPlusTrackCorrector::excludeJta(), VertexFitterResult::fill(), AdHocNTupler::fill(), reco::HcalNoiseInfoProducer::filldigis(), cms::PileupJPTJetIdAlgo::fillJPTBlock(), edm::RefVector< C, T, F >::fillView(), HLTHcalMETNoiseCleaner::filter(), HeavyQuarkFromMPIFilterAlgo::filter(), JetVertexChecker::filter(), TauTagTools::filteredTracks(), TauTagTools::filteredTracksByNumTrkHits(), pat::TriggerEvent::filterInPath(), pat::TriggerEvent::filterRef(), CaloRecoTauTagInfoAlgorithm::filterTracksByQualityBit(), GenParticlesHelper::findDescendents(), GenHFHadronMatcher::findHadronJets(), GenParticlesHelper::findSisters(), JetPlusTrackCorrector::findTrack(), GenParticlePruner::flagDaughters(), GenParticlePruner::flagMothers(), CaloParticle::genParticle_end(), SimCluster::genParticle_end(), 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(), JetFlavourClustering::insertGhosts(), SeedMultiplicityAnalyzer::FromTrackRefSeedFilter::isSelected(), 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()(), operator<<(), pat::TriggerEvent::pathObjects(), pat::TriggerEvent::pathRef(), reco::PFIsolatedTauTagInfo::PFIsolatedTauTagInfo(), reco::EMIsolatedTauTagInfo::pIsol(), VZeroProducer::produce(), HLTHcalTowerNoiseCleanerWithrechit::produce(), HLTHcalTowerNoiseCleaner::produce(), TauGenJetProducer::produce(), HLTTauMCProducer::produce(), JetPlusTrackProducer::produce(), JetPlusTrackProducerAA::produce(), JetPlusTrackCorrector::rebuildJta(), reco::CastorTower::rechitsEnd(), GenParticlePruner::recursiveFlagDaughters(), GenParticlePruner::recursiveFlagMothers(), SoftLepton::refineJetAxis(), TauElementsOperators::replaceSubStr(), edm::RefVector< reco::CastorTowerCollection, typename Ref< reco::CastorTowerCollection >::value_type, typename Ref< reco::CastorTowerCollection >::finder_type >::reserve(), reco::PFNuclearInteraction::secPFRecTracks_end(), reco::NuclearInteraction::seeds_end(), JetFlavourClustering::setFlavours(), reco::CombinedTauTagInfo::signalTks_qsum(), CaloParticle::simCluster_end(), TrackingVertex::sourceTracks_end(), reco::CastorCluster::towersEnd(), reco::TrackKinematics::TrackKinematics(), reco::IsolatedTauTagInfo::tracksInCone(), and reco::HcalNoiseRBX::uniqueTowers().

253  {
254  return iterator(this, size());
255  }
refhelper::RefVectorTrait< C, T, F >::iterator_type iterator
Definition: RefVector.h:37
size_type size() const
Size of the RefVector.
Definition: RefVector.h:107
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 239 of file RefVector.h.

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

Referenced by edm::RefVector< reco::CastorTowerCollection, typename Ref< reco::CastorTowerCollection >::value_type, typename Ref< reco::CastorTowerCollection >::finder_type >::isTransient().

239  {
241  typename contents_type::keys_type::iterator newPos =
242  refVector_.eraseAtIndex(index);
243  typename contents_type::keys_type::size_type newIndex = newPos - refVector_.keys().begin();
244  return iterator(this, newIndex);
245  }
contents_type refVector_
Definition: RefVector.h:164
uint16_t size_type
const_iterator begin() const
Initialize an iterator over the RefVector.
Definition: RefVector.h:248
refhelper::RefVectorTrait< C, T, F >::iterator_type iterator
Definition: RefVector.h:37
keys_type const & keys() const
Accessor for vector of keys and pointers.
Definition: RefVectorBase.h:72
keys_type::iterator eraseAtIndex(size_type index)
erase an element from the vector
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

Definition at line 192 of file RefVector.h.

References edm::RefVector< C, T, F >::begin(), MillePedeFileConverter_cfg::e, edm::RefVector< C, T, F >::end(), mps_fire::i, crabWrapper::key, and edm::RefVector< C, T, F >::size().

Referenced by edm::RefVector< reco::CastorTowerCollection, typename Ref< reco::CastorTowerCollection >::value_type, typename Ref< reco::CastorTowerCollection >::finder_type >::hasProductCache().

194  {
195 
196  pointers.reserve(this->size());
197  helpers.reserve(this->size());
198 
199  size_type key = 0;
200  for(const_iterator i=begin(), e=end(); i!=e; ++i, ++key) {
201  member_type const* address = i->isNull() ? 0 : &**i;
202  pointers.push_back(address);
203  helpers.emplace_back(i->id(),i->key());
204  }
205  }
const_iterator end() const
Termination of iteration.
Definition: RefVector.h:253
const_iterator begin() const
Initialize an iterator over the RefVector.
Definition: RefVector.h:248
KeyVec::size_type size_type
Definition: RefVector.h:48
iterator const_iterator
Definition: RefVector.h:38
size_type size() const
Size of the RefVector.
Definition: RefVector.h:107
template<typename C, typename T = typename refhelper::ValueTrait<C>::value, typename F = typename refhelper::FindTrait<C, T>::value>
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:65
void const * productPtr() const
Definition: RefCore.h:52
template<typename C, typename T = typename refhelper::ValueTrait<C>::value, typename F = typename refhelper::FindTrait<C, T>::value>
ProductID edm::RefVector< C, T, F >::id ( ) const
inline
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 259 of file RefVector.h.

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

Referenced by EwkMuTauHistManager::fillHistograms(), and edm::RefVector< reco::CastorTowerCollection, typename Ref< reco::CastorTowerCollection >::value_type, typename Ref< reco::CastorTowerCollection >::finder_type >::operator!().

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

Checks for non-null.

Definition at line 131 of file RefVector.h.

131 {return !isNull();}
bool isNull() const
Checks for null.
Definition: RefVector.h:128
template<typename C, typename T = typename refhelper::ValueTrait<C>::value, typename F = typename refhelper::FindTrait<C, T>::value>
bool edm::RefVector< C, T, F >::isNull ( ) const
inline
template<typename C, typename T = typename refhelper::ValueTrait<C>::value, typename F = typename refhelper::FindTrait<C, T>::value>
bool edm::RefVector< C, T, F >::isTransient ( ) const
inline

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

Definition at line 141 of file RefVector.h.

141 {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:65
bool isTransient() const
Definition: RefCore.h:106
template<typename C, typename T = typename refhelper::ValueTrait<C>::value, typename F = typename refhelper::FindTrait<C, T>::value>
bool edm::RefVector< C, T, F >::operator! ( ) const
inline

Checks for null.

Definition at line 134 of file RefVector.h.

134 {return isNull();}
bool isNull() const
Checks for null.
Definition: RefVector.h:128
template<typename C, typename T = typename refhelper::ValueTrait<C>::value, typename F = typename refhelper::FindTrait<C, T>::value>
RefVector& edm::RefVector< C, T, F >::operator= ( RefVector< C, T, F > const &  rhs)
template<typename C, typename T = typename refhelper::ValueTrait<C>::value, typename F = typename refhelper::FindTrait<C, T>::value>
RefVector& edm::RefVector< C, T, F >::operator= ( RefVector< C, T, F > &&  rhs)
inline

Definition at line 60 of file RefVector.h.

60  {
61  refVector_ = std::move(rhs.refVector_);
62  return *this;
63  }
contents_type refVector_
Definition: RefVector.h:164
def move(src, dest)
Definition: eostools.py:510
template<typename C, typename T = typename refhelper::ValueTrait<C>::value, typename F = typename refhelper::FindTrait<C, T>::value>
value_type const edm::RefVector< C, T, F >::operator[] ( size_type  idx) const
inline

Retrieve an element of the RefVector.

Definition at line 75 of file RefVector.h.

75  {
76  RefCore const& core = refVector_.refCore();
77  key_type const& key = refVector_.keys()[idx];
78  void const* memberPointer = refVector_.cachedMemberPointer(idx);
79  if(memberPointer) {
80  RefCore newCore(core);
81  newCore.setProductPtr(memberPointer);
82  return value_type(newCore, key);
83  }
84  return value_type(core, key);
85  }
void const * cachedMemberPointer(size_type idx) const
Definition: RefVectorBase.h:67
value_type::key_type key_type
Definition: RefVector.h:44
Definition: __init__.py:1
contents_type refVector_
Definition: RefVector.h:164
RefCore const & refCore() const
Accessor for product ID and product getter.
Definition: RefVectorBase.h:65
keys_type const & keys() const
Accessor for vector of keys and pointers.
Definition: RefVectorBase.h:72
refhelper::RefVectorTrait< C, T, F >::ref_type value_type
Definition: RefVector.h:39
template<typename C, typename T = typename refhelper::ValueTrait<C>::value, typename F = typename refhelper::FindTrait<C, T>::value>
EDProductGetter const* edm::RefVector< C, T, F >::productGetter ( ) const
inline

Accessor for product getter.

Definition at line 125 of file RefVector.h.

125 {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:65
EDProductGetter const * productGetter() const
Definition: RefCore.h:84
template<typename C, typename T = typename refhelper::ValueTrait<C>::value, typename F = typename refhelper::FindTrait<C, T>::value>
void edm::RefVector< C, T, F >::push_back ( value_type const &  ref)
inline

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

Definition at line 69 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(), CaloParticle::addGenParticle(), SimCluster::addGenParticle(), TrackingParticle::addGenParticle(), TrackingVertex::addGenVertex(), reco::CompositeRefCandidate::addMother(), reco::PhotonCore::addOneLegConversion(), reco::GsfElectronCore::addOneLegConversion(), TrackingVertex::addParentTrack(), CaloParticle::addSimCluster(), reco::PFCandidateEGammaExtra::addSingleLegConversionRef(), GlobalHaloAlgo::AddtoBeamHaloEBEERechits(), pat::TriggerEvent::algorithmConditions(), pat::TriggerEvent::algorithmObjects(), pat::TriggerEvent::algorithmRefs(), MultiTrackValidator::analyze(), RecoMuonValidator::analyze(), TrackingNtuple::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(), ElectronSeedProducer::filterClusters(), TauTagTools::filteredTracks(), TauTagTools::filteredTracksByNumTrkHits(), pat::TriggerEvent::filterObjects(), pat::TriggerEvent::filterPaths(), pat::TriggerEvent::filterRefs(), CaloRecoTauTagInfoAlgorithm::filterTracksByQualityBit(), GenParticlesHelper::findDescendents(), GenParticlesHelper::findParticles(), GenParticlesHelper::findSisters(), HLTTauMCProducer::getGenDecayProducts(), EcalHaloAlgo::GetHaloClusterCandidateEB(), EcalHaloAlgo::GetHaloClusterCandidateEE(), HcalHaloAlgo::GetHaloClusterCandidateHB(), HcalHaloAlgo::GetHaloClusterCandidateHE(), reco::PFJet::getTrackRefs(), JetPlusTrackCorrector::matchTracks(), TrackMergeremb< T1 >::merg_and_put(), 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()(), reco::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(), PFDisplacedTrackerVertexProducer::produce(), PFNuclearProducer::produce(), CleanAndMergeProducer::produce(), RecoTauPiZeroUnembedder::produce(), PixelVertexProducer::produce(), HLTL1MuonNoL2Selector::produce(), CastorClusterProducer::produce(), CastorTowerProducer::produce(), MuonMCClassifier::produce(), HLTJetsCleanedFromLeadingLeptons< JetType >::produce(), JetFlavourClustering::produce(), JetPlusTrackCorrector::rebuildJta(), TauElementsOperators::replaceSubStr(), PFPhotonAlgo::RunPFPhoton(), RecoTrackRefSelector::select(), HitPixelLayersTPSelector::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().

69  {
70  refVector_.pushBack(ref.refCore(), ref.key());
71  }
contents_type refVector_
Definition: RefVector.h:164
void pushBack(RefCore const &product, KEY const &key)
Definition: RefVectorBase.h:80
template<typename C, typename T = typename refhelper::ValueTrait<C>::value, typename F = typename refhelper::FindTrait<C, T>::value>
contents_type const& edm::RefVector< C, T, F >::refVector ( ) const
inline

Accessor for all data.

Definition at line 101 of file RefVector.h.

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

Reserve space for RefVector.

Definition at line 113 of file RefVector.h.

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

113 {refVector_.reserve(n);}
contents_type refVector_
Definition: RefVector.h:164
void reserve(size_type n)
Reserve space for vector.
template<typename C, typename T = typename refhelper::ValueTrait<C>::value, typename F = typename refhelper::FindTrait<C, T>::value>
size_type edm::RefVector< C, T, F >::size ( void  ) const
inline

Size of the RefVector.

Definition at line 107 of file RefVector.h.

Referenced by ntupleDataFormat._Collection::__iter__(), ntupleDataFormat._Collection::__len__(), reco::PFCandidate::addElementInBlock(), GlobalHaloAlgo::AddtoBeamHaloEBEERechits(), GlobalHaloAlgo::AddtoBeamHaloHBHERechits(), reco::GsfElectron::ambiguousGsfTracksSize(), MultiTrackValidator::analyze(), PhotonsWithConversionsAnalyzer::analyze(), BTagPerformanceAnalyzerMC::analyze(), PhotonValidator::analyze(), PhotonAnalyzer::analyze(), BeamHaloAnalyzer::analyze(), TrackingNtuple::analyze(), TrackGenAssociatorByChi2Impl::associateRecoToGen(), TrackAssociatorByPositionImpl::associateRecoToSim(), TrackAssociatorByChi2Impl::associateRecoToSim(), MuonAssociatorByHitsHelper::associateRecoToSimIndices(), TrackAssociatorByPositionImpl::associateSimToReco(), MuonAssociatorByHitsHelper::associateSimToRecoIndices(), PVPositionBuilder::average(), MultiTrackValidator::bookHistograms(), CaloRecoTauAlgorithm::buildCaloTau(), reco::TauMassTagInfo::calculateTrkP4(), reco::JPTJet::chargedMultiplicity(), JetPlusTrackCorrector::correctAA(), PFPhotonTranslator::createPhotonCores(), CaloRecoTauDiscriminationByDeltaE::DeltaE(), reco::IsolatedTauTagInfo::discriminator(), TauElementsOperators::discriminatorByIsolTracksN(), JetPlusTrackCorrector::elecCorrection(), reco::JPTJet::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(), TrackingNtuple::fillTrackingParticlesForSeeds(), edm::RefVector< C, T, F >::fillView(), ElectronSeedProducer::filterClusters(), ElectronSeedProducer::filterSeeds(), DivisiveVertexFinder::findVertexes(), DivisiveVertexFinder::findVertexesAlt(), GenParticlePruner::getDaughterKeys(), HLTMuonL2ToL1Map::getL1Keys(), HLTMuonL2ToL1TMap::getL1Keys(), GenParticlePruner::getMotherKeys(), reco::JetTrackMatch< reco::GenJetCollection >::getTracks(), GeneralTracksImporter::importToBlock(), GeneralTracksImporterWithVeto::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(), reco::operator<<(), operator<<(), pat::TriggerEvent::pathModules(), JetPlusTrackCorrector::pionCorrection(), reco::JPTJet::print(), reco::JPTJet::printJet(), VZeroProducer::produce(), CleanAndMergeProducer::produce(), RecoTauPiZeroUnembedder::produce(), GEDPhotonCoreProducer::produce(), TauGenJetProducer::produce(), HLTTauMCProducer::produce(), RecoTauJetRegionProducer::produce(), PixelVertexProducer::produce(), RecoTauPiZeroProducer::produce(), RecoTauProducer::produce(), CaloRecHitsBeamHaloCleaned::produce(), PFRecoTauChargedHadronProducer::produce(), PFPhotonTranslator::produce(), reco::BeamHaloSummaryProducer::produce(), TriggerMatcherToHLTDebug::produce(), reco::CastorTower::rechitsSize(), ReducedEGProducer::relinkConversions(), TauElementsOperators::replaceSubStr(), ElectronSeedGenerator::run(), PFPhotonAlgo::RunPFPhoton(), reco::NuclearInteraction::seedsSize(), JetFlavourClustering::setFlavours(), reco::CombinedTauTagInfo::signalTks_qsum(), RecoTrackRefSelector::size(), HitPixelLayersTPSelector::size(), reco::CastorCluster::towersSize(), MultiTrackValidator::tpDR(), MultiTrackValidator::tpParametersAndSelection(), reco::JetTracksAssociation::tracksP4(), VertexHistoryAnalyzer::vertexString(), TrackHistoryAnalyzer::vertexString(), and PVPositionBuilder::wtAverage().

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

Member Data Documentation

template<typename C, typename T = typename refhelper::ValueTrait<C>::value, typename F = typename refhelper::FindTrait<C, T>::value>
contents_type edm::RefVector< C, T, F >::refVector_
private

Definition at line 164 of file RefVector.h.

Referenced by edm::RefVector< reco::CastorTowerCollection, typename Ref< reco::CastorTowerCollection >::value_type, typename Ref< reco::CastorTowerCollection >::finder_type >::at(), edm::RefVector< reco::CastorTowerCollection, typename Ref< reco::CastorTowerCollection >::value_type, typename Ref< reco::CastorTowerCollection >::finder_type >::capacity(), edm::RefVector< reco::CastorTowerCollection, typename Ref< reco::CastorTowerCollection >::value_type, typename Ref< reco::CastorTowerCollection >::finder_type >::clear(), edm::RefVector< reco::CastorTowerCollection, typename Ref< reco::CastorTowerCollection >::value_type, typename Ref< reco::CastorTowerCollection >::finder_type >::empty(), edm::RefVector< C, T, F >::erase(), edm::RefVector< reco::CastorTowerCollection, typename Ref< reco::CastorTowerCollection >::value_type, typename Ref< reco::CastorTowerCollection >::finder_type >::hasProductCache(), edm::RefVector< reco::CastorTowerCollection, typename Ref< reco::CastorTowerCollection >::value_type, typename Ref< reco::CastorTowerCollection >::finder_type >::id(), edm::RefVector< C, T, F >::isAvailable(), edm::RefVector< reco::CastorTowerCollection, typename Ref< reco::CastorTowerCollection >::value_type, typename Ref< reco::CastorTowerCollection >::finder_type >::isTransient(), edm::RefVector< reco::CastorTowerCollection, typename Ref< reco::CastorTowerCollection >::value_type, typename Ref< reco::CastorTowerCollection >::finder_type >::operator=(), edm::RefVector< reco::CastorTowerCollection, typename Ref< reco::CastorTowerCollection >::value_type, typename Ref< reco::CastorTowerCollection >::finder_type >::operator[](), edm::RefVector< reco::CastorTowerCollection, typename Ref< reco::CastorTowerCollection >::value_type, typename Ref< reco::CastorTowerCollection >::finder_type >::productGetter(), edm::RefVector< reco::CastorTowerCollection, typename Ref< reco::CastorTowerCollection >::value_type, typename Ref< reco::CastorTowerCollection >::finder_type >::push_back(), edm::RefVector< reco::CastorTowerCollection, typename Ref< reco::CastorTowerCollection >::value_type, typename Ref< reco::CastorTowerCollection >::finder_type >::refVector(), edm::RefVector< reco::CastorTowerCollection, typename Ref< reco::CastorTowerCollection >::value_type, typename Ref< reco::CastorTowerCollection >::finder_type >::reserve(), and edm::RefVector< reco::CastorTowerCollection, typename Ref< reco::CastorTowerCollection >::value_type, typename Ref< reco::CastorTowerCollection >::finder_type >::size().