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) noexcept
 
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) noexcept
 
 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) noexcept
 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 27 of file EDProductfwd.h.

Member Typedef Documentation

◆ collection_type

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.

◆ const_iterator

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.

◆ const_reference

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.

◆ contents_type

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.

◆ finder_type

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.

◆ iterator

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.

◆ key_type

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.

◆ KeyVec

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.

◆ member_type

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.

◆ reference

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.

◆ size_type

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.

◆ value_type

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

◆ RefVector() [1/4]

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:156

◆ ~RefVector()

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

◆ RefVector() [2/4]

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:156

◆ RefVector() [3/4]

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)
inlinenoexcept

Definition at line 57 of file RefVector.h.

57 : refVector_(std::move(rh.refVector_)) {}
contents_type refVector_
Definition: RefVector.h:156
def move(src, dest)
Definition: eostools.py:511

◆ RefVector() [4/4]

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 65 of file RefVector.h.

65 : refVector_(iId) {}
contents_type refVector_
Definition: RefVector.h:156

Member Function Documentation

◆ at()

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 83 of file RefVector.h.

Referenced by CTPPSProtonReconstructionPlotter::CalculateTimingTrackingDistance(), and TrackingNtuple::fillCandidates().

83  {
84  RefCore const& core = refVector_.refCore();
85  key_type const& key = refVector_.keys().at(idx);
86  void const* memberPointer = refVector_.cachedMemberPointer(idx);
87  if (memberPointer) {
88  RefCore newCore(core); // NOLINT
89  newCore.setProductPtr(memberPointer);
90  return value_type(newCore, key);
91  }
92  return value_type(core, key);
93  }
value_type::key_type key_type
Definition: RefVector.h:44
Definition: __init__.py:1
contents_type refVector_
Definition: RefVector.h:156
void const * cachedMemberPointer(size_type idx) const
Definition: RefVectorBase.h:68
refhelper::RefVectorTrait< C, T, F >::ref_type value_type
Definition: RefVector.h:39
RefCore const & refCore() const
Accessor for product ID and product getter.
Definition: RefVectorBase.h:66
keys_type const & keys() const
Accessor for vector of keys and pointers.
Definition: RefVectorBase.h:73

◆ begin()

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 223 of file RefVector.h.

Referenced by pat::TriggerEvent::algorithmObjects(), TkConvValidator::analyze(), PhotonValidator::analyze(), JetFlavourClustering::assignToSubjets(), TrackGenAssociatorByChi2Impl::associateGenToReco(), TrackAssociatorByChi2Impl::associateSimToReco(), RecoTrackRefSelector::begin(), HitPixelLayersTPSelector::begin(), JetPlusTrackProducerAA::calculateBGtracksJet(), reco::CastorCluster::CastorCluster(), reco::CastorTower::CastorTower(), pat::TriggerEvent::conditionInAlgorithm(), JetPlusTrackCorrector::correctAA(), TrackingVertex::daughterTracks_begin(), TrackingParticle::decayVertices_begin(), pat::GenericParticle::embedTracks(), edm::RefVector< std::vector< math::PtEtaPhiELorentzVectorD > >::erase(), JetPlusTrackCorrector::excludeJta(), VertexFitterResult::fill(), cms::PileupJPTJetIdAlgo::fillJPTBlock(), edm::RefVector< std::vector< math::PtEtaPhiELorentzVectorD > >::fillView(), HLTHcalMETNoiseCleaner::filter(), tautagtools::filteredTracks(), pat::TriggerEvent::filterInPath(), GenParticlesHelper::findDescendents(), GenHFHadronMatcher::findHadronJets(), GenParticlesHelper::findSisters(), JetPlusTrackCorrector::findTrack(), GenParticlePruner::flagMothers(), TrackingParticleSelectorByGen::flagMothers(), CaloParticle::genParticle_begin(), SimCluster::genParticle_begin(), TrackingParticle::genParticle_begin(), TrackingVertex::genVertices_begin(), HLTTauMCProducer::getGenDecayProducts(), GenParticlePruner::getMotherKeys(), TrackingParticleSelectorByGen::getMotherKeys(), GenParticlesHelper::hasAncestor(), reco::isodeposit::OtherJetConstituentsDeltaRVeto::initialize(), JetPlusTrackCorrector::jetDirFromTracks(), reco::IsolatedTauTagInfo::leadingSignalTrack(), JetPlusTrackCorrector::matchTracks(), pat::TriggerEvent::objectInAlgorithm(), pat::TriggerEvent::objectInPath(), JoinCaloTowerRefVectorsWithoutDuplicates::operator()(), pat::TriggerEvent::pathObjects(), CaloParticle::pdgId(), SimCluster::pdgId(), TrackingParticle::pdgId(), HLTHcalTowerNoiseCleaner::produce(), HLTHcalTowerNoiseCleanerWithrechit::produce(), TauGenJetProducer::produce(), HLTTauMCProducer::produce(), JetPlusTrackProducer::produce(), JetPlusTrackProducerAA::produce(), reco::CastorTower::rechitsBegin(), GenParticlePruner::recursiveFlagMothers(), TrackingParticleSelectorByGen::recursiveFlagMothers(), reco::PFNuclearInteraction::secPFRecTracks_begin(), reco::NuclearInteraction::seeds_begin(), JetFlavourClustering::setFlavours(), reco::CombinedTauTagInfo::signalTks_qsum(), CaloParticle::simCluster_begin(), TrackingVertex::sourceTracks_begin(), reco::CastorCluster::towersBegin(), reco::IsolatedTauTagInfo::tracksInCone(), and reco::HcalNoiseRBX::uniqueTowers().

223  {
224  return iterator(this, 0);
225  }
refhelper::RefVectorTrait< C, T, F >::iterator_type iterator
Definition: RefVector.h:37

◆ capacity()

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 105 of file RefVector.h.

105 { return refVector_.capacity(); }
contents_type refVector_
Definition: RefVector.h:156
size_type capacity() const
Capacity of vector.
Definition: RefVectorBase.h:99

◆ Class_Version()

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 153 of file RefVector.h.

155 :
contents_type refVector_
Definition: RefVector.h:156
RefVectorBase< key_type > contents_type
Definition: RefVector.h:49

◆ clear()

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

◆ empty()

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

◆ end()

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 228 of file RefVector.h.

Referenced by pat::TriggerEvent::algorithmObjects(), pat::TriggerEvent::algorithmRef(), TkConvValidator::analyze(), PhotonValidator::analyze(), JetFlavourClustering::assignToSubjets(), TrackGenAssociatorByChi2Impl::associateGenToReco(), TrackAssociatorByChi2Impl::associateSimToReco(), JetPlusTrackProducerAA::calculateBGtracksJet(), reco::CastorCluster::CastorCluster(), reco::CastorTower::CastorTower(), 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(), cms::PileupJPTJetIdAlgo::fillJPTBlock(), edm::RefVector< std::vector< math::PtEtaPhiELorentzVectorD > >::fillView(), HLTHcalMETNoiseCleaner::filter(), tautagtools::filteredTracks(), pat::TriggerEvent::filterInPath(), pat::TriggerEvent::filterRef(), GenParticlesHelper::findDescendents(), GenHFHadronMatcher::findHadronJets(), GenParticlesHelper::findSisters(), JetPlusTrackCorrector::findTrack(), GenParticlePruner::flagMothers(), TrackingParticleSelectorByGen::flagMothers(), CaloParticle::genParticle_end(), SimCluster::genParticle_end(), TrackingParticle::genParticle_end(), TrackingVertex::genVertices_end(), HLTTauMCProducer::getGenDecayProducts(), GenParticlePruner::getMotherKeys(), TrackingParticleSelectorByGen::getMotherKeys(), GenParticlesHelper::hasAncestor(), reco::isodeposit::OtherJetConstituentsDeltaRVeto::initialize(), JetPlusTrackCorrector::jetDirFromTracks(), reco::IsolatedTauTagInfo::leadingSignalTrack(), JetPlusTrackCorrector::matchTracks(), pat::TriggerEvent::objectInAlgorithm(), pat::TriggerEvent::objectInPath(), JoinCaloTowerRefVectorsWithoutDuplicates::operator()(), pat::TriggerEvent::pathObjects(), pat::TriggerEvent::pathRef(), HLTHcalTowerNoiseCleanerWithrechit::produce(), HLTHcalTowerNoiseCleaner::produce(), TauGenJetProducer::produce(), HLTTauMCProducer::produce(), JetPlusTrackProducer::produce(), JetPlusTrackProducerAA::produce(), reco::CastorTower::rechitsEnd(), GenParticlePruner::recursiveFlagMothers(), TrackingParticleSelectorByGen::recursiveFlagMothers(), reco::PFNuclearInteraction::secPFRecTracks_end(), reco::NuclearInteraction::seeds_end(), JetFlavourClustering::setFlavours(), reco::CombinedTauTagInfo::signalTks_qsum(), CaloParticle::simCluster_end(), TrackingVertex::sourceTracks_end(), reco::CastorCluster::towersEnd(), reco::IsolatedTauTagInfo::tracksInCone(), and reco::HcalNoiseRBX::uniqueTowers().

228  {
229  return iterator(this, size());
230  }
refhelper::RefVectorTrait< C, T, F >::iterator_type iterator
Definition: RefVector.h:37
size_type size() const
Size of the RefVector.
Definition: RefVector.h:102

◆ erase()

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 215 of file RefVector.h.

215  {
217  typename contents_type::keys_type::iterator newPos = refVector_.eraseAtIndex(index);
218  typename contents_type::keys_type::size_type newIndex = newPos - refVector_.keys().begin();
219  return iterator(this, newIndex);
220  }
contents_type refVector_
Definition: RefVector.h:156
uint16_t size_type
refhelper::RefVectorTrait< C, T, F >::iterator_type iterator
Definition: RefVector.h:37
keys_type::iterator eraseAtIndex(size_type index)
erase an element from the vector
const_iterator begin() const
Initialize an iterator over the RefVector.
Definition: RefVector.h:223
keys_type const & keys() const
Accessor for vector of keys and pointers.
Definition: RefVectorBase.h:73

◆ fillView()

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 177 of file RefVector.h.

179  {
180  pointers.reserve(this->size());
181  helpers.reserve(this->size());
182 
183  size_type key = 0;
184  for (const_iterator i = begin(), e = end(); i != e; ++i, ++key) {
185  member_type const* address = i->isNull() ? nullptr : &**i;
186  pointers.push_back(address);
187  helpers.emplace_back(i->id(), i->key());
188  }
189  }
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:102
const_iterator end() const
Termination of iteration.
Definition: RefVector.h:228
const_iterator begin() const
Initialize an iterator over the RefVector.
Definition: RefVector.h:223

◆ hasProductCache()

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 148 of file RefVector.h.

148 { return refVector_.refCore().productPtr() != 0; }
contents_type refVector_
Definition: RefVector.h:156
void const * productPtr() const
Definition: RefCore.h:51
RefCore const & refCore() const
Accessor for product ID and product getter.
Definition: RefVectorBase.h:66

◆ id()

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

Accessor for product ID.

Definition at line 117 of file RefVector.h.

Referenced by edm::RefVector< std::vector< math::PtEtaPhiELorentzVectorD > >::isNull().

117 { return refVector_.refCore().id(); }
ProductID id() const
Definition: RefCore.h:48
contents_type refVector_
Definition: RefVector.h:156
RefCore const & refCore() const
Accessor for product ID and product getter.
Definition: RefVectorBase.h:66

◆ isAvailable()

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 233 of file RefVector.h.

Referenced by EwkMuTauHistManager::fillHistograms().

233  {
234  if (refVector_.refCore().isAvailable()) {
235  return true;
236  } else if (empty()) {
237  return false;
238  }
239 
240  // The following is the simplest implementation, but
241  // this is woefully inefficient and could be optimized
242  // to run much faster with some nontrivial effort. There
243  // is only 1 place in the code base where this function
244  // is used at all and I'm not sure whether it will ever
245  // be used with thinned collections, so for the moment I
246  // am not spending the time to optimize this.
247  for (size_type i = 0; i < size(); ++i) {
248  if (!(*this)[i].isAvailable()) {
249  return false;
250  }
251  }
252  return true;
253  }
bool empty() const
Is the RefVector empty.
Definition: RefVector.h:99
bool isAvailable() const
Definition: RefCore.cc:146
contents_type refVector_
Definition: RefVector.h:156
KeyVec::size_type size_type
Definition: RefVector.h:48
size_type size() const
Size of the RefVector.
Definition: RefVector.h:102
RefCore const & refCore() const
Accessor for product ID and product getter.
Definition: RefVectorBase.h:66

◆ isNonnull()

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 126 of file RefVector.h.

126 { return !isNull(); }
bool isNull() const
Checks for null.
Definition: RefVector.h:123

◆ isNull()

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

Checks for null.

Definition at line 123 of file RefVector.h.

Referenced by edm::RefVector< std::vector< math::PtEtaPhiELorentzVectorD > >::isNonnull(), and edm::RefVector< std::vector< math::PtEtaPhiELorentzVectorD > >::operator!().

123 { return !id().isValid(); }
bool isValid() const
Definition: ProductID.h:32
ProductID id() const
Accessor for product ID.
Definition: RefVector.h:117

◆ isTransient()

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 136 of file RefVector.h.

136 { return refVector_.refCore().isTransient(); }
contents_type refVector_
Definition: RefVector.h:156
bool isTransient() const
Definition: RefCore.h:105
RefCore const & refCore() const
Accessor for product ID and product getter.
Definition: RefVectorBase.h:66

◆ operator!()

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 129 of file RefVector.h.

129 { return isNull(); }
bool isNull() const
Checks for null.
Definition: RefVector.h:123

◆ operator=() [1/2]

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)

◆ operator=() [2/2]

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)
inlinenoexcept

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:156
def move(src, dest)
Definition: eostools.py:511

◆ operator[]()

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 70 of file RefVector.h.

70  {
71  RefCore const& core = refVector_.refCore();
72  key_type const& key = refVector_.keys()[idx];
73  void const* memberPointer = refVector_.cachedMemberPointer(idx);
74  if (memberPointer) {
75  RefCore newCore(core); // NOLINT
76  newCore.setProductPtr(memberPointer);
77  return value_type(newCore, key);
78  }
79  return value_type(core, key);
80  }
value_type::key_type key_type
Definition: RefVector.h:44
Definition: __init__.py:1
contents_type refVector_
Definition: RefVector.h:156
void const * cachedMemberPointer(size_type idx) const
Definition: RefVectorBase.h:68
refhelper::RefVectorTrait< C, T, F >::ref_type value_type
Definition: RefVector.h:39
RefCore const & refCore() const
Accessor for product ID and product getter.
Definition: RefVectorBase.h:66
keys_type const & keys() const
Accessor for vector of keys and pointers.
Definition: RefVectorBase.h:73

◆ productGetter()

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 120 of file RefVector.h.

120 { return refVector_.refCore().productGetter(); }
contents_type refVector_
Definition: RefVector.h:156
EDProductGetter const * productGetter() const
Definition: RefCore.h:81
RefCore const & refCore() const
Accessor for product ID and product getter.
Definition: RefVectorBase.h:66

◆ push_back()

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 67 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(), pat::TriggerEvent::algorithmConditions(), pat::TriggerEvent::algorithmObjects(), pat::TriggerEvent::algorithmRefs(), RecoMuonValidator::analyze(), TkConvValidator::analyze(), PhotonValidator::analyze(), MuonTrackValidator::analyze(), TrackingNtuple::analyze(), TrackGenAssociatorByChi2Impl::associateGenToReco(), JetTracksAssociationXtrpCalo::associateInputTracksToJet(), MuonToTrackingParticleAssociatorByHitsImpl::associateMuons(), TrackGenAssociatorByChi2Impl::associateRecoToGen(), reco::TrackToTrackingParticleAssociatorBaseImpl::associateRecoToSim(), MuonAssociatorByHits::associateRecoToSim(), reco::TrackToTrackingParticleAssociatorBaseImpl::associateSimToReco(), MuonAssociatorByHits::associateSimToReco(), EcalHaloAlgo::Calculate(), CSCHaloAlgo::Calculate(), JetPlusTrackProducerAA::calculateBGtracksJet(), reco::CastorCluster::CastorCluster(), reco::CastorTower::CastorTower(), pat::TriggerEvent::conditionAlgorithms(), pat::TriggerEvent::conditionObjects(), pat::TriggerEvent::conditionRefs(), L1HPSPFTauBuilder::convertToRefVector(), MultiTrackValidator::dqmAnalyze(), JetPlusTrackCorrector::excludeJta(), ElectronSeedProducer::filterClusters(), tautagtools::filteredTracks(), pat::TriggerEvent::filterObjects(), pat::TriggerEvent::filterPaths(), pat::TriggerEvent::filterRefs(), GenParticlesHelper::findDescendents(), GenParticlesHelper::findParticles(), GenParticlesHelper::findSisters(), EcalHaloAlgo::GetHaloClusterCandidateEB(), EcalHaloAlgo::GetHaloClusterCandidateEE(), HcalHaloAlgo::GetHaloClusterCandidateHB(), HcalHaloAlgo::GetHaloClusterCandidateHE(), 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(), pat::TriggerEvent::pathFilters(), pat::TriggerEvent::pathModules(), pat::TriggerEvent::pathObjects(), pat::TriggerEvent::pathRefs(), reco::PFTauDecayMode::pfMasterClones(), pat::TriggerEvent::physAlgorithms(), JetTracksAssociationDRVertex::produce(), JetTracksAssociationDRVertexAssigned::produce(), JetVetoedTracksAssociationDRVertex::produce(), JetTracksAssociationDRCalo::produce(), MuonAssociatorEDProducer::produce(), CastorFastTowerProducer::produce(), CastorFastClusterProducer::produce(), PFNuclearProducer::produce(), PFDisplacedTrackerVertexProducer::produce(), RecoTauPiZeroUnembedder::produce(), HLTTauMCProducer::produce(), CleanAndMergeProducer::produce(), JetPlusTrackProducer::produce(), CTPPSProtonProducer::produce(), CastorClusterProducer::produce(), CastorTowerProducer::produce(), MuonMCClassifier::produce(), MuonSimClassifier::produce(), HLTJetsCleanedFromLeadingLeptons< JetType >::produce(), JetFlavourClustering::produce(), JetPlusTrackCorrector::rebuildJta(), ProtonReconstructionAlgorithm::reconstructFromSingleRP(), RecoTrackRefSelector::select(), HitPixelLayersTPSelector::select(), reco::PFBlockElementTrack::setConversionRef(), ConeIsolationAlgorithm::tag(), and pat::TriggerEvent::techAlgorithms().

67 { refVector_.pushBack(ref.refCore(), ref.key()); }
contents_type refVector_
Definition: RefVector.h:156
void pushBack(RefCore const &product, KEY const &key)
Definition: RefVectorBase.h:81

◆ refVector()

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 96 of file RefVector.h.

96 { return refVector_; }
contents_type refVector_
Definition: RefVector.h:156

◆ reserve()

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 108 of file RefVector.h.

Referenced by MultiTrackValidator::dqmAnalyze(), and reco::PFCandidate::PFCandidate().

108 { refVector_.reserve(n); }
contents_type refVector_
Definition: RefVector.h:156
void reserve(size_type n)
Reserve space for vector.

◆ size()

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 102 of file RefVector.h.

Referenced by ntupleDataFormat._Collection::__iter__(), ntupleDataFormat._Collection::__len__(), GlobalHaloAlgo::AddtoBeamHaloEBEERechits(), GlobalHaloAlgo::AddtoBeamHaloHBHERechits(), reco::GsfElectron::ambiguousGsfTracksSize(), BTagPerformanceAnalyzerMC::analyze(), RecoMuonValidator::analyze(), HGCalShowerSeparation::analyze(), TkConvValidator::analyze(), PhotonValidator::analyze(), BeamHaloAnalyzer::analyze(), MuonTrackValidator::analyze(), TrackingNtuple::analyze(), TrackGenAssociatorByChi2Impl::associateRecoToGen(), TrackAssociatorByPositionImpl::associateRecoToSim(), TrackAssociatorByChi2Impl::associateRecoToSim(), MuonAssociatorByHitsHelper::associateRecoToSimIndices(), TrackAssociatorByPositionImpl::associateSimToReco(), MuonAssociatorByHitsHelper::associateSimToRecoIndices(), L1HPSPFTauBuilder::buildL1PFTau(), reco::JPTJet::chargedMultiplicity(), reco::IsolatedTauTagInfo::discriminator(), MultiTrackValidator::dqmAnalyze(), reco::JPTJet::elecMultiplicity(), pat::Jet::elecMultiplicity(), reco::PFCandidate::elementsInBlocks(), pat::GenericParticle::embedTracks(), edm::RefVector< std::vector< math::PtEtaPhiELorentzVectorD > >::end(), HGVHistoProducerAlgo::fill_caloparticle_histos(), EwkMuTauHistManager::fillHistograms(), cms::PileupJPTJetIdAlgo::fillJPTBlock(), TrackingNtuple::fillTrackingParticlesForSeeds(), edm::RefVector< std::vector< math::PtEtaPhiELorentzVectorD > >::fillView(), ElectronSeedProducer::filterClusters(), edm::RefVector< std::vector< math::PtEtaPhiELorentzVectorD > >::isAvailable(), main(), JetPlusTrackCorrector::matchTracks(), reco::JPTJet::muonMultiplicity(), TrackingVertex::nDaughterTracks(), TrackingVertex::nGenVertices(), TrackingVertex::nSourceTracks(), reco::CompositeRefCandidate::numberOfDaughters(), reco::EcalHaloData::NumberOfHaloSuperClusters(), reco::CSCHaloData::NumberOfHaloTracks(), reco::CompositeRefCandidate::numberOfMothers(), pat::GenericParticle::numberOfTracks(), JetPlusTrackCorrector::pionCorrection(), reco::JPTJet::print(), reco::JPTJet::printJet(), MuonAssociatorEDProducer::produce(), CleanAndMergeProducer::produce(), PFPhotonTranslator::produce(), CaloRecHitsBeamHaloCleaned::produce(), reco::BeamHaloSummaryProducer::produce(), reco::CastorTower::rechitsSize(), ElectronSeedGenerator::run(), reco::NuclearInteraction::seedsSize(), reco::CombinedTauTagInfo::signalTks_qsum(), RecoTrackRefSelector::size(), HitPixelLayersTPSelector::size(), reco::CastorCluster::towersSize(), MultiTrackValidator::tpDR(), and MultiTrackValidator::tpParametersAndSelection().

102 { return refVector_.size(); }
contents_type refVector_
Definition: RefVector.h:156
size_type size() const
Size of vector.
Definition: RefVectorBase.h:79

◆ swap()

template<typename C, typename T, typename F>
void edm::RefVector< C, T, F >::swap ( RefVector< C, T, F > &  other)
inlinenoexcept

Swap two vectors.

Definition at line 160 of file RefVector.h.

160  {
161  refVector_.swap(other.refVector_);
162  }
void swap(RefVectorBase< KEY > &other) noexcept
swap two vectors
contents_type refVector_
Definition: RefVector.h:156

Member Data Documentation

◆ refVector_

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