#include <DataFormats/Common/interface/RefToBaseVector.h>
Definition at line 26 of file RefToBaseVector.h.
typedef holder_type::const_iterator edm::RefToBaseVector< T >::const_iterator |
Definition at line 32 of file RefToBaseVector.h.
typedef reftobase::BaseVectorHolder<T> edm::RefToBaseVector< T >::holder_type |
Definition at line 30 of file RefToBaseVector.h.
typedef T edm::RefToBaseVector< T >::member_type |
Definition at line 29 of file RefToBaseVector.h.
typedef holder_type::size_type edm::RefToBaseVector< T >::size_type |
Definition at line 31 of file RefToBaseVector.h.
typedef RefToBase<T> edm::RefToBaseVector< T >::value_type |
Definition at line 28 of file RefToBaseVector.h.
RefToBaseVector::RefToBaseVector | ( | ) | [inline] |
RefToBaseVector::RefToBaseVector | ( | RefToBaseVector< T > const & | iOther | ) | [inline] |
Definition at line 122 of file RefToBaseVector.h.
00122 : 00123 holder_(iOther.holder_ ? iOther.holder_->clone() : 0) 00124 { }
RefToBaseVector::RefToBaseVector | ( | REFV const & | iRef | ) | [inline, explicit] |
Definition at line 116 of file RefToBaseVector.h.
00116 : 00117 holder_(new reftobase::VectorHolder<T,REFV>(iRef)) 00118 { }
RefToBaseVector::RefToBaseVector | ( | Handle< C > const & | h | ) | [inline, explicit] |
Definition at line 284 of file RefToBaseVector.h.
00284 : 00285 holder_(new reftobase::VectorHolder<T, RefVector<C, typename refhelper::ValueTrait<C>::value, 00286 typename refhelper::FindTrait<C, T>::value> >(h.id())) { 00287 }
RefToBaseVector::RefToBaseVector | ( | Handle< View< T1 > > const & | h | ) | [inline, explicit] |
Definition at line 291 of file RefToBaseVector.h.
00291 : 00292 holder_(h->refVector().holder_->cloneEmpty()) { 00293 }
RefToBaseVector::RefToBaseVector | ( | boost::shared_ptr< reftobase::RefVectorHolderBase > | p | ) | [inline] |
RefToBaseVector::~RefToBaseVector | ( | ) | [inline] |
Definition at line 150 of file RefToBaseVector.h.
References edm::RefToBaseVector< T >::holder_.
00151 { 00152 delete holder_; 00153 }
RefToBaseVector< T >::value_type RefToBaseVector::at | ( | size_type | idx | ) | const [inline] |
Definition at line 158 of file RefToBaseVector.h.
References edm::reftobase::BaseVectorHolder< T >::at(), edm::RefToBaseVector< T >::holder_, and edm::errors::InvalidReference.
Referenced by edm::RefToBaseVector< T >::operator[]().
00159 { 00160 if ( holder_ == 0 ) 00161 throw edm::Exception( edm::errors::InvalidReference ) 00162 << "Trying to dereference null RefToBaseVector<T> in method: at(" << idx <<")\n"; 00163 return holder_->at( idx ); 00164 }
RefToBaseVector< T >::const_iterator RefToBaseVector::begin | ( | ) | const [inline] |
Definition at line 218 of file RefToBaseVector.h.
References edm::reftobase::BaseVectorHolder< T >::begin(), and edm::RefToBaseVector< T >::holder_.
Referenced by TrackAssociatorByHits::associateRecoToSim(), MuonAssociatorByHits::associateRecoToSim(), TrackAssociatorByChi2::associateRecoToSim(), MuonAssociatorByHits::associateSimToReco(), TrackAssociatorByChi2::associateSimToReco(), TrackAssociatorByHits::associateSimToReco(), edm::RefToBaseVector< T >::fillView(), edm::operator==(), and CandViewRefMerger::produce().
00219 { 00220 return holder_ ? holder_->begin() : const_iterator(); 00221 }
Definition at line 193 of file RefToBaseVector.h.
References edm::reftobase::BaseVectorHolder< T >::clear(), and edm::RefToBaseVector< T >::holder_.
bool RefToBaseVector::empty | ( | ) | const [inline] |
Definition at line 177 of file RefToBaseVector.h.
References edm::reftobase::BaseVectorHolder< T >::empty(), and edm::RefToBaseVector< T >::holder_.
RefToBaseVector< T >::const_iterator RefToBaseVector::end | ( | ) | const [inline] |
Definition at line 226 of file RefToBaseVector.h.
References edm::reftobase::BaseVectorHolder< T >::end(), and edm::RefToBaseVector< T >::holder_.
Referenced by TrackAssociatorByHits::associateRecoToSim(), MuonAssociatorByHits::associateRecoToSim(), TrackAssociatorByChi2::associateRecoToSim(), MuonAssociatorByHits::associateSimToReco(), TrackAssociatorByChi2::associateSimToReco(), TrackAssociatorByHits::associateSimToReco(), edm::RefToBaseVector< T >::fillView(), edm::operator==(), and CandViewRefMerger::produce().
00227 { 00228 return holder_ ? holder_->end() : const_iterator(); 00229 }
void RefToBaseVector::fillView | ( | std::vector< void const * > & | pointers | ) | const [inline] |
Definition at line 233 of file RefToBaseVector.h.
References edm::RefToBaseVector< T >::begin(), e, edm::RefToBaseVector< T >::end(), i, and edm::RefToBase< T >::isNull().
Referenced by edm::fillView().
00234 { 00235 pointers.reserve(this->size()); 00236 for (const_iterator i=begin(), e=end(); i!=e; ++i) { 00237 RefToBase<T> ref = * i; 00238 member_type const * address = ref.isNull() ? 0 : & * ref; 00239 pointers.push_back(address); 00240 } 00241 }
Definition at line 202 of file RefToBaseVector.h.
References edm::RefToBaseVector< T >::holder_, and edm::reftobase::BaseVectorHolder< T >::id().
bool edm::RefToBaseVector< T >::isAvailable | ( | ) | const [inline] |
Checks if collection is in memory or available in the Event.
No type checking is done.
Definition at line 71 of file RefToBaseVector.h.
00071 { return holder_->isAvailable(); }
bool edm::RefToBaseVector< T >::isInvalid | ( | ) | const [inline] |
Definition at line 54 of file RefToBaseVector.h.
Referenced by edm::operator==().
00054 { return holder_ == 0; }
bool edm::RefToBaseVector< T >::isValid | ( | void | ) | const [inline] |
RefToBaseVector< T > & RefToBaseVector::operator= | ( | RefToBaseVector< T > const & | iRHS | ) | [inline] |
Definition at line 135 of file RefToBaseVector.h.
References edm::RefToBaseVector< T >::swap(), and pyDBSRunClass::temp.
00135 { 00136 RefToBaseVector temp(iRHS); 00137 this->swap(temp); 00138 return *this; 00139 }
RefToBaseVector< T >::value_type RefToBaseVector::operator[] | ( | size_type | idx | ) | const [inline] |
Definition at line 169 of file RefToBaseVector.h.
References edm::RefToBaseVector< T >::at().
00170 { 00171 return at( idx ); 00172 }
const void * RefToBaseVector::product | ( | ) | const [inline] |
Definition at line 270 of file RefToBaseVector.h.
References edm::RefToBaseVector< T >::holder_, and edm::reftobase::BaseVectorHolder< T >::product().
EDProductGetter const * RefToBaseVector::productGetter | ( | ) | const [inline] |
Definition at line 210 of file RefToBaseVector.h.
References edm::RefToBaseVector< T >::holder_, and edm::reftobase::BaseVectorHolder< T >::productGetter().
00211 { 00212 return holder_ ? holder_->productGetter() : 0; 00213 }
Definition at line 256 of file RefToBaseVector.h.
References edm::RefToBase< T >::holder_, edm::RefToBaseVector< T >::holder_, p, and edm::reftobase::BaseVectorHolder< T >::push_back().
Referenced by MuonAssociatorByHits::associateRecoToSim(), TrackAssociatorBase::associateRecoToSim(), TrackAssociatorBase::associateSimToReco(), MuonAssociatorByHits::associateSimToReco(), helper::SelectionRefViewAdder< T >::operator()(), and pat::helper::TriggerMatchHelper::triggerMatchCandidates().
00256 { 00257 if ( holder_ == 0 ) { 00258 std::auto_ptr<reftobase::BaseVectorHolder<T> > p = r.holder_->makeVectorHolder(); 00259 holder_ = p.release(); 00260 } 00261 holder_->push_back( r.holder_ ); 00262 }
RefToBaseVector< T >::size_type RefToBaseVector::size | ( | void | ) | const [inline] |
Definition at line 185 of file RefToBaseVector.h.
References edm::RefToBaseVector< T >::holder_, and edm::reftobase::BaseVectorHolder< T >::size().
Referenced by TrackAssociatorByHits::associateRecoToSim(), MuonAssociatorByHits::associateRecoToSim(), TrackAssociatorByPosition::associateRecoToSim(), TrackAssociatorByPosition::associateSimToReco(), TrackAssociatorByHits::associateSimToReco(), and edm::operator==().
void RefToBaseVector::swap | ( | RefToBaseVector< T > & | other | ) | [inline] |
Definition at line 144 of file RefToBaseVector.h.
References edm::RefToBaseVector< T >::holder_, and std::swap().
Referenced by edm::RefToBaseVector< T >::operator=(), and edm::swap().
std::auto_ptr< reftobase::RefVectorHolderBase > RefToBaseVector::vectorHolder | ( | ) | const [inline] |
Definition at line 265 of file RefToBaseVector.h.
References edm::RefToBaseVector< T >::holder_, and edm::reftobase::BaseVectorHolder< T >::vectorHolder().
Referenced by edm::helpers::ViewFiller< RefToBaseVector< T > >::fill().
00265 { 00266 return holder_ ? holder_->vectorHolder() : std::auto_ptr<reftobase::RefVectorHolderBase>(); 00267 }
holder_type* edm::RefToBaseVector< T >::holder_ [private] |
Definition at line 73 of file RefToBaseVector.h.
Referenced by edm::RefToBaseVector< T >::at(), edm::RefToBaseVector< T >::begin(), edm::RefToBaseVector< T >::clear(), edm::RefToBaseVector< T >::empty(), edm::RefToBaseVector< T >::end(), edm::RefToBaseVector< T >::id(), edm::RefToBaseVector< reco::CaloCluster >::isAvailable(), edm::RefToBaseVector< reco::CaloCluster >::isInvalid(), edm::RefToBaseVector< reco::CaloCluster >::isValid(), edm::RefToBaseVector< T >::product(), edm::RefToBaseVector< T >::productGetter(), edm::RefToBaseVector< T >::push_back(), edm::RefToBaseVector< T >::size(), edm::RefToBaseVector< T >::swap(), edm::RefToBaseVector< T >::vectorHolder(), and edm::RefToBaseVector< T >::~RefToBaseVector().