CMS 3D CMS Logo

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

#include <DataFormats/Common/interface/Ptr.h>

Public Types

typedef unsigned long key_type
 
typedef T value_type
 

Public Member Functions

T const * get () const
 Returns C++ pointer to the item. More...
 
bool hasProductCache () const
 
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 this Ptr is transient (i.e. not persistable). More...
 
key_type key () const
 
bool operator! () const
 Checks for null. More...
 
T const & operator* () const
 Dereference operator. More...
 
T const * operator-> () const
 Member dereference operator. More...
 
void const * product () const
 
EDProductGetter const * productGetter () const
 Accessor for product getter. More...
 
template<typename C >
 Ptr (Handle< C > const &handle, key_type itemKey, bool=true)
 
template<typename C >
 Ptr (OrphanHandle< C > const &handle, key_type itemKey, bool=true)
 
template<typename C >
 Ptr (C const *iProduct, key_type iItemKey, bool=true)
 
 Ptr (T const *item, key_type iItemKey)
 
template<typename C >
 Ptr (TestHandle< C > const &handle, key_type itemKey, bool=true)
 
 Ptr (ProductID const &productID, key_type itemKey, EDProductGetter const *prodGetter)
 
 Ptr (ProductID const &productID, T const *item, key_type item_key)
 
 Ptr (ProductID const &productID, T const *item, key_type item_key, bool transient)
 
 Ptr (ProductID const &iId)
 
 Ptr ()
 
template<typename U >
 Ptr (Ptr< U > const &iOther, typename boost::enable_if_c< boost::is_base_of< T, U >::value >::type *=0)
 
template<typename U >
 Ptr (Ptr< U > const &iOther, typename boost::enable_if_c< boost::is_base_of< U, T >::value >::type *=0)
 
RefCore const & refCore () const
 
 ~Ptr ()
 Destructor. More...
 

Static Public Member Functions

static short Class_Version ()
 

Private Member Functions

void getData_ (bool throwIfNotFound=true) const
 
template<typename C >
T const * getItem_ (C const *product, key_type iKey)
 

Private Attributes

RefCore core_
 
key_type key_
 

Friends

class PtrVectorBase
 

Detailed Description

template<typename T>
class edm::Ptr< T >

Description: Persistent 'pointer' to an item in a collection where the collection is in the edm::Event

Usage: <usage>

Definition at line 30 of file AssociationVector.h.

Member Typedef Documentation

template<typename T>
typedef unsigned long edm::Ptr< T >::key_type

Definition at line 45 of file Ptr.h.

template<typename T>
typedef T edm::Ptr< T >::value_type

Definition at line 46 of file Ptr.h.

Constructor & Destructor Documentation

template<typename T>
template<typename C >
edm::Ptr< T >::Ptr ( Handle< C > const &  handle,
key_type  itemKey,
bool  = true 
)
inline

Definition at line 50 of file Ptr.h.

50  :
51  core_(handle.id(), getItem_(handle.product(), itemKey), 0, false), key_(itemKey) {}
T const * getItem_(C const *product, key_type iKey)
Definition: Ptr.h:230
key_type key_
Definition: Ptr.h:225
RefCore core_
Definition: Ptr.h:224
template<typename T>
template<typename C >
edm::Ptr< T >::Ptr ( OrphanHandle< C > const &  handle,
key_type  itemKey,
bool  = true 
)
inline

Definition at line 55 of file Ptr.h.

55  :
56  core_(handle.id(), getItem_(handle.product(), itemKey), 0, false), key_(itemKey) {}
T const * getItem_(C const *product, key_type iKey)
Definition: Ptr.h:230
key_type key_
Definition: Ptr.h:225
RefCore core_
Definition: Ptr.h:224
template<typename T>
template<typename C >
edm::Ptr< T >::Ptr ( C const *  iProduct,
key_type  iItemKey,
bool  = true 
)
inline

Definition at line 71 of file Ptr.h.

71  :
72  core_(ProductID(), iProduct != 0 ? getItem_(iProduct,iItemKey) : 0, 0, true),
73  key_(iProduct != 0 ? iItemKey : key_traits<key_type>::value) {}
static const key_type value
Definition: traits.h:36
T const * getItem_(C const *product, key_type iKey)
Definition: Ptr.h:230
key_type key_
Definition: Ptr.h:225
RefCore core_
Definition: Ptr.h:224
template<typename T>
edm::Ptr< T >::Ptr ( T const *  item,
key_type  iItemKey 
)
inline

Definition at line 75 of file Ptr.h.

75  :
76  core_(ProductID(), item, nullptr, true),
77  key_(item != nullptr ? iItemKey : key_traits<key_type>::value) {}
static const key_type value
Definition: traits.h:36
key_type key_
Definition: Ptr.h:225
RefCore core_
Definition: Ptr.h:224
template<typename T>
template<typename C >
edm::Ptr< T >::Ptr ( TestHandle< C > const &  handle,
key_type  itemKey,
bool  = true 
)
inline

Definition at line 83 of file Ptr.h.

83  :
84  core_(handle.id(), getItem_(handle.product(), itemKey), 0, true), key_(itemKey) {}
T const * getItem_(C const *product, key_type iKey)
Definition: Ptr.h:230
key_type key_
Definition: Ptr.h:225
RefCore core_
Definition: Ptr.h:224
template<typename T>
edm::Ptr< T >::Ptr ( ProductID const &  productID,
key_type  itemKey,
EDProductGetter const *  prodGetter 
)
inline

Constructor for those users who do not have a product handle, but have a pointer to a product getter (such as the EventPrincipal). prodGetter will ususally be a pointer to the event principal.

Definition at line 89 of file Ptr.h.

89  :
90  core_(productID, 0, mustBeNonZero(prodGetter, "Ptr", productID), false), key_(itemKey) {
91  }
EDProductGetter const * mustBeNonZero(EDProductGetter const *prodGetter, std::string refType, ProductID const &productID)
key_type key_
Definition: Ptr.h:225
RefCore core_
Definition: Ptr.h:224
template<typename T>
edm::Ptr< T >::Ptr ( ProductID const &  productID,
T const *  item,
key_type  item_key 
)
inline

Constructor for use in the various X::fillView(...) functions or for extracting a persistent Ptr from a PtrVector. It is an error (not diagnosable at compile- or run-time) to call this constructor with a pointer to a T unless the pointed-to T object is already in a collection of type C stored in the Event. The given ProductID must be the id of the collection in the Event.

Definition at line 100 of file Ptr.h.

100  :
101  core_(productID, item, 0, false),
102  key_(item_key) {
103  }
key_type key_
Definition: Ptr.h:225
RefCore core_
Definition: Ptr.h:224
template<typename T>
edm::Ptr< T >::Ptr ( ProductID const &  productID,
T const *  item,
key_type  item_key,
bool  transient 
)
inline

Definition at line 105 of file Ptr.h.

105  :
106  core_(productID, item, nullptr, transient),
107  key_(item_key) {
108  }
key_type key_
Definition: Ptr.h:225
RefCore core_
Definition: Ptr.h:224
template<typename T>
edm::Ptr< T >::Ptr ( ProductID const &  iId)
inlineexplicit

Constructor that creates an invalid ("null") Ptr that is associated with a given product (denoted by that product's ProductID).

Definition at line 114 of file Ptr.h.

114  :
115  core_(iId, 0, 0, false),
117  { }
static const key_type value
Definition: traits.h:36
key_type key_
Definition: Ptr.h:225
RefCore core_
Definition: Ptr.h:224
template<typename T>
edm::Ptr< T >::Ptr ( )
inline

Definition at line 119 of file Ptr.h.

119  :
120  core_(),
122  {}
static const key_type value
Definition: traits.h:36
key_type key_
Definition: Ptr.h:225
RefCore core_
Definition: Ptr.h:224
template<typename T>
template<typename U >
edm::Ptr< T >::Ptr ( Ptr< U > const &  iOther,
typename boost::enable_if_c< boost::is_base_of< T, U >::value >::type = 0 
)
inline

Definition at line 125 of file Ptr.h.

125  :
126  core_(iOther.id(),
127  (iOther.hasProductCache() ? static_cast<T const*>(iOther.get()): static_cast<T const*>(0)),
128  iOther.productGetter(),
129  iOther.isTransient()),
130  key_(iOther.key()) {
131  //make sure a race condition didn't happen where between the call to hasProductCache() and
132  // productGetter() the object was gotten
133  if(iOther.hasProductCache() and not hasProductCache()) {
134  core_.setProductPtr(static_cast<T const*>(iOther.get()) );
135  }
136  }
void setProductPtr(void const *prodPtr) const
Definition: RefCore.h:58
key_type key_
Definition: Ptr.h:225
bool hasProductCache() const
Definition: Ptr.h:188
RefCore core_
Definition: Ptr.h:224
long double T
template<typename T>
template<typename U >
edm::Ptr< T >::Ptr ( Ptr< U > const &  iOther,
typename boost::enable_if_c< boost::is_base_of< U, T >::value >::type = 0 
)
inlineexplicit

Definition at line 140 of file Ptr.h.

140  :
141  core_(iOther.id(),
142  dynamic_cast<T const*>(iOther.get()),
143  0,
144  iOther.isTransient()),
145  key_(iOther.key()) {
146  }
key_type key_
Definition: Ptr.h:225
RefCore core_
Definition: Ptr.h:224
long double T
template<typename T>
edm::Ptr< T >::~Ptr ( )
inline

Destructor.

Definition at line 149 of file Ptr.h.

149 {}

Member Function Documentation

template<typename T>
static short edm::Ptr< T >::Class_Version ( )
inlinestatic

Definition at line 196 of file Ptr.h.

198 :
199 
template<typename T>
T const* edm::Ptr< T >::get ( ) const
inline

Returns C++ pointer to the item.

Definition at line 160 of file Ptr.h.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), PFEGammaAlgo::buildRefinedSuperCluster(), PFECALSuperClusterAlgo::buildSuperCluster(), util.rrapi.RRApi::columns(), rrapi.RRApi::columns(), PileupJetIdAlgo::computeIdVariables(), util.rrapi.RRApi::count(), rrapi.RRApi::count(), util.rrapi.RRApi::data(), rrapi.RRApi::data(), ElectronMVAEstimatorRun2Phys14NonTrig::fillMVAVariables(), ElectronMVAEstimatorRun2Spring15Trig::fillMVAVariables(), ElectronMVAEstimatorRun2Spring15NonTrig::fillMVAVariables(), ElectronMVAEstimatorRun2Spring16GeneralPurpose::fillMVAVariables(), ElectronMVAEstimatorRun2Spring16HZZ::fillMVAVariables(), ElectronMVAEstimatorRun2Phys14NonTrig::findCategory(), ElectronMVAEstimatorRun2Spring15Trig::findCategory(), ElectronMVAEstimatorRun2Spring15NonTrig::findCategory(), ElectronMVAEstimatorRun2Spring16GeneralPurpose::findCategory(), ElectronMVAEstimatorRun2Spring16HZZ::findCategory(), edm::FwdPtr< FFTJPTJet >::get(), pat::EventHypothesis::getAs(), reco::CaloJet::getCaloConstituent(), betterConfigParser.BetterConfigParser::getCompares(), MultipleAlgoIterator::getEt(), ReflectedIterator::getEt(), ParametrizedSubtractor::getEt(), MultipleAlgoIterator::getEta(), ReflectedIterator::getEta(), ParametrizedSubtractor::getEta(), betterConfigParser.BetterConfigParser::getGeneral(), reco::PFJet::getPFConstituent(), betterConfigParser.BetterConfigParser::getResultingSection(), PileUpSubtractor::ieta(), cms::SubEventGenJetProducer::inputTowers(), PileUpSubtractor::iphi(), TTClusterAssociationMap< T >::isCombinatoric(), TTClusterAssociationMap< T >::isGenuine(), MuonPFIsolationWithConeVeto::isInIsolationCone(), ElectronPFIsolationWithConeVeto::isInIsolationCone(), PhotonPFIsolationWithConeVeto::isInIsolationCone(), ElectronPFIsolationWithMapBasedVeto::isInIsolationCone(), PhotonPFIsolationWithMapBasedVeto::isInIsolationCone(), TTClusterAssociationMap< T >::isUnknown(), pat::MET::MET(), AntiElectronIDMVA6::MVAValue(), GsfEleCalPFClusterIsoCut::operator()(), pat::PATObject< ObjectType >::originalObject(), reco::PFClusterJet::pfCluster(), reco::RecoTauPiZero::print(), TTTrackAssociator< T >::produce(), EcalDigiSelector::produce(), SoftPFMuonTagInfoProducer::produce(), NoPileUpPFMEtDataProducer::produce(), pat::PATTauProducer::produce(), PFRecoTauChargedHadronProducer::produce(), util.rrapi.RRApi::report(), rrapi.RRApi::report(), rrapi.RRApi::reports(), util.rrapi.RRApi::reports(), BoostedDoubleSVProducer::setTracksPV(), util.rrapi.RRApi::tables(), rrapi.RRApi::tables(), util.rrapi.RRApi::tags(), rrapi.RRApi::tags(), util.rrapi.RRApi::templates(), rrapi.RRApi::templates(), toTrackRef(), reco::TrackJet::track(), GsfEleCalPFClusterIsoCut::value(), util.rrapi.RRApi::workspaces(), and rrapi.RRApi::workspaces().

160  {
161  return isNull() ? 0 : this->operator->();
162  }
T const * operator->() const
Member dereference operator.
Definition: Ptr.h:251
bool isNull() const
Checks for null.
Definition: Ptr.h:165
template<typename T>
void edm::Ptr< T >::getData_ ( bool  throwIfNotFound = true) const
inlineprivate

Definition at line 203 of file Ptr.h.

Referenced by edm::Ptr< T >::isAvailable(), edm::Ptr< T >::operator*(), and edm::Ptr< T >::operator->().

203  {
204  EDProductGetter const* getter = productGetter();
205  if(getter != nullptr) {
206  WrapperBase const* prod = getter->getIt(core_.id());
207  unsigned int iKey = key_;
208  if(prod == nullptr) {
209  prod = getter->getThinnedProduct(core_.id(), iKey);
210  if(prod == nullptr) {
211  if(throwIfNotFound) {
213  } else {
214  return;
215  }
216  }
217  }
218  void const* ad = nullptr;
219  prod->setPtr(typeid(T), iKey, ad);
220  core_.setProductPtr(ad);
221  }
222  }
void setProductPtr(void const *prodPtr) const
Definition: RefCore.h:58
EDProductGetter const * productGetter() const
Accessor for product getter.
Definition: Ptr.h:184
key_type key_
Definition: Ptr.h:225
void productNotFoundException(std::type_info const &type) const
Definition: RefCore.cc:141
RefCore core_
Definition: Ptr.h:224
ProductID id() const
Definition: RefCore.h:49
long double T
template<typename T >
template<typename C >
T const * edm::Ptr< T >::getItem_ ( C const *  product,
key_type  iKey 
)
private

Definition at line 230 of file Ptr.h.

References edm::detail::GetProduct< COLLECTION >::address().

230  {
231  assert (iProduct != 0);
232  typename C::const_iterator it = iProduct->begin();
233  std::advance(it,iKey);
234  T const* address = detail::GetProduct<C>::address(it);
235  return address;
236  }
static const element_type * address(const iter &i)
Definition: GetProduct.h:33
long double T
template<typename T>
bool edm::Ptr< T >::hasProductCache ( ) const
inline

Definition at line 188 of file Ptr.h.

Referenced by edm::FwdPtr< FFTJPTJet >::hasProductCache(), edm::Ptr< T >::isAvailable(), edm::Ptr< PileUpPFCandidate >::Ptr(), and edm::PtrVector< reco::FFTJPTJet >::push_back().

188 { return nullptr != core_.productPtr(); }
void const * productPtr() const
Definition: RefCore.h:52
RefCore core_
Definition: Ptr.h:224
template<typename T>
ProductID edm::Ptr< T >::id ( ) const
inline

Accessor for product ID.

Definition at line 181 of file Ptr.h.

Referenced by reco::tau::RecoTauPiZeroStripPlugin2::addCandsToStrip(), reco::tau::RecoTauPiZeroStripPlugin3::addCandsToStrip(), MuonTrajectoryCleaner::clean(), ConvertedPhotonProducer::cleanCollections(), pat::PATElectronProducer::fillElectron2(), edm::PtrVector< T >::fillView(), reco::PFCandidate::flag(), reco::CaloJet::getCaloConstituent(), reco::PFJet::getPFConstituent(), edm::FwdPtr< FFTJPTJet >::id(), PhoFull5x5SigmaIEtaIEtaValueMapCut::operator()(), GsfEleMVACut::operator()(), PhoMVACut::operator()(), PhoAnyPFIsoWithEAAndExpoScalingCut::operator()(), PhoAnyPFIsoWithEAAndExpoScalingEBCut::operator()(), PhoAnyPFIsoWithEAAndQuadScalingCut::operator()(), PhoAnyPFIsoWithEACut::operator()(), GsfEleDeltaBetaIsoCut::operator()(), reco::operator<<(), edm::AssociationVector< KeyRefProd, CVal, KeyRef, SizeType, KeyReferenceHelper >::operator[](), ClusterClusterMapping::overlap(), pat::helper::RefHelper< T >::parentOrNull(), reco::PFRecoTauChargedHadron::print(), PFMuonUntagger::produce(), pat::PATTrackAndVertexUnpacker::produce(), pat::PATPackedCandidateProducer::produce(), pat::helper::RefHelper< T >::recursiveLookup(), reco::tau::RecoTauConstructor::reserveTauChargedHadron(), ConvertedPhotonProducer::solveAmbiguity(), metsig::SignPFSpecificAlgo::useOriginalPtrs(), PhoFull5x5SigmaIEtaIEtaValueMapCut::value(), PhoMVACut::value(), GsfEleMVACut::value(), PhoAnyPFIsoWithEACut::value(), PhoAnyPFIsoWithEAAndExpoScalingEBCut::value(), PhoAnyPFIsoWithEAAndQuadScalingCut::value(), PhoAnyPFIsoWithEAAndExpoScalingCut::value(), GsfEleDeltaBetaIsoCut::value(), NoPileUpPFMEtDataProducer::~NoPileUpPFMEtDataProducer(), and RecoTauCleanerImpl< Prod >::~RecoTauCleanerImpl().

181 {return core_.id();}
RefCore core_
Definition: Ptr.h:224
ProductID id() const
Definition: RefCore.h:49
template<typename T >
bool edm::Ptr< T >::isAvailable ( ) const
inline
template<typename T>
bool edm::Ptr< T >::isNonnull ( ) const
inline

Checks for non-null.

Definition at line 169 of file Ptr.h.

Referenced by reco::tau::RecoTauConstructor::addTauChargedHadron(), heppy::IsolationComputer::addVetos(), B2GHadronicHLTValidation::analyze(), B2GSingleLeptonHLTValidation::analyze(), B2GDoubleLeptonHLTValidation::analyze(), HPSPFRecoTauAlgorithm::applyElectronRejection(), HPSPFRecoTauAlgorithm::applyMuonRejection(), reco::tau::RecoTauVertexAssociator::associatedVertex(), PFRecoTauAlgorithm::buildPFTau(), reco::FlavorHistoryEvent::cache(), ConversionProducer::checkTrackPair(), MVAJetPuId::computeIdVariables(), reco::tau::RecoTauConstructor::convertToPtr(), EGEnergyCorrector::CorrectedEnergyWithError(), PFRecoTauDiscriminationByFlight::discriminate(), PFRecoTauDiscriminationByNProngs::discriminate(), reco::CaloJet::getCaloConstituent(), ECFAdder::getECF(), reco::tau::RecoTauVertexAssociator::getLeadTrack(), reco::PFJet::getPFConstituent(), NjettinessAdder::getTau(), reco::FlavorHistory::hasMatchedJet(), reco::PFTau::hasMuonReference(), reco::FlavorHistory::hasParton(), reco::FlavorHistory::hasProgenitor(), reco::FlavorHistory::hasSister(), reco::FlavorHistory::hasSisterJet(), edm::FwdPtr< FFTJPTJet >::id(), pat::helper::RefHelper< T >::isAncestorOf(), MuonPFIsolationWithConeVeto::isInIsolationCone(), ElectronPFIsolationWithConeVeto::isInIsolationCone(), PhotonPFIsolationWithConeVeto::isInIsolationCone(), PhotonPFIsolationWithMapBasedVeto::isInIsolationCone(), edm::FwdPtr< FFTJPTJet >::isNonnull(), edm::Ptr< PileUpPFCandidate >::isNull(), heppy::IsolationComputer::isoSumNeutralsWeighted(), heppy::IsolationComputer::isoSumRaw(), edm::FwdPtr< FFTJPTJet >::key(), AntiElectronIDMVA5::MVAValue(), AntiElectronIDMVA6::MVAValue(), reco::PFCandidateFwdPtrFactory::operator()(), reco::tau::RecoTauElectronRejectionPlugin::operator()(), reco::tau::RecoTauImpactParameterSignificancePlugin::operator()(), reco::tau::RecoTauBuilderConePlugin::operator()(), reco::tau::PFRecoTauEnergyAlgorithmPlugin::operator()(), TopProjectorFwdPtrOverlap< Top, Bottom >::operator()(), reco::PFCandidate::overlap(), pat::helper::RefHelper< T >::parentOrSelf(), reco::PFClusterJet::pfCluster(), reco::PFRecoTauChargedHadron::print(), PseudoTopProducer::produce(), L1THLTTauMatching::produce(), L1HLTTauMatching::produce(), PFMuonUntagger::produce(), pat::PATJetUpdater::produce(), pat::PATTauProducer::produce(), pat::PATJetProducer::produce(), PFRecoTauChargedHadronProducer::produce(), pat::PATElectronProducer::produce(), JetFlavourClustering::produce(), pat::helper::RefHelper< T >::recursiveLookup(), edm::FwdPtr< FFTJPTJet >::refCore(), reco::tau::setChargedHadronP4(), reco::tau::RecoTauBuilderConePlugin::setTauQuantities(), TauIdMVAAuxiliaries::tau_leadTrackChi2(), and reco::TrackJet::track().

static const key_type value
Definition: traits.h:36
key_type key_
Definition: Ptr.h:225
template<typename T>
bool edm::Ptr< T >::isNull ( ) const
inline
template<typename T>
bool edm::Ptr< T >::isTransient ( ) const
inline

Checks if this Ptr is transient (i.e. not persistable).

Definition at line 178 of file Ptr.h.

Referenced by edm::FwdPtr< FFTJPTJet >::isTransient().

178 {return core_.isTransient();}
RefCore core_
Definition: Ptr.h:224
bool isTransient() const
Definition: RefCore.h:106
template<typename T>
key_type edm::Ptr< T >::key ( ) const
inline

Definition at line 186 of file Ptr.h.

Referenced by reco::tau::RecoTauPiZeroStripPlugin2::addCandsToStrip(), reco::tau::RecoTauPiZeroStripPlugin3::addCandsToStrip(), PFEGammaAlgo::attachPSClusters(), ConvertedPhotonProducer::cleanCollections(), reco::tau::RecoTauConstructor::convertToPtr(), reco::tau::disc::EMFraction(), edm::PtrVector< T >::fillView(), reco::PFCandidate::flag(), reco::CaloJet::getCaloConstituent(), reco::PFJet::getPFConstituent(), edm::FwdPtr< FFTJPTJet >::key(), EGPfIsolationModifierFromValueMaps::modifyObject(), EGFull5x5ShowerShapeModifierFromValueMaps::modifyObject(), EGExtraInfoModifierFromValueMaps< MapType, OutputType >::modifyObject(), PhoFull5x5SigmaIEtaIEtaValueMapCut::operator()(), PhoMVACut::operator()(), GsfEleMVACut::operator()(), PhoAnyPFIsoWithEAAndQuadScalingCut::operator()(), PhoAnyPFIsoWithEACut::operator()(), PhoAnyPFIsoWithEAAndExpoScalingCut::operator()(), PhoAnyPFIsoWithEAAndExpoScalingEBCut::operator()(), GsfEleDeltaBetaIsoCut::operator()(), reco::tau::RecoTauPhotonFilter::operator()(), TopProjectorFwdPtrOverlap< Top, Bottom >::operator()(), reco::FlavorHistory::operator<(), reco::operator<<(), operator<<(), reco::FlavorHistory::operator==(), reco::FlavorHistory::operator>(), edm::AssociationVector< KeyRefProd, CVal, KeyRef, SizeType, KeyReferenceHelper >::operator[](), ClusterClusterMapping::overlap(), reco::PFRecoTauChargedHadron::print(), PFMuonUntagger::produce(), pat::PATTrackAndVertexUnpacker::produce(), pat::PATPackedCandidateProducer::produce(), NoPileUpPFMEtDataProducer::produce(), TriggerMatcherToHLTDebug::produce(), edm::PtrVector< reco::FFTJPTJet >::push_back(), reco::tau::RecoTauConstructor::reserveTauChargedHadron(), EGExtraInfoModifierFromDB::setEvent(), ConvertedPhotonProducer::solveAmbiguity(), PhoFull5x5SigmaIEtaIEtaValueMapCut::value(), PhoMVACut::value(), GsfEleMVACut::value(), PhoAnyPFIsoWithEAAndExpoScalingCut::value(), PhoAnyPFIsoWithEACut::value(), PhoAnyPFIsoWithEAAndQuadScalingCut::value(), PhoAnyPFIsoWithEAAndExpoScalingEBCut::value(), GsfEleDeltaBetaIsoCut::value(), NoPileUpPFMEtDataProducer::~NoPileUpPFMEtDataProducer(), and RecoTauCleanerImpl< Prod >::~RecoTauCleanerImpl().

186 {return key_;}
key_type key_
Definition: Ptr.h:225
template<typename T>
bool edm::Ptr< T >::operator! ( ) const
inline

Checks for null.

Definition at line 171 of file Ptr.h.

171 {return isNull();}
bool isNull() const
Checks for null.
Definition: Ptr.h:165
template<typename T >
T const & edm::Ptr< T >::operator* ( ) const
inline

Dereference operator.

Definition at line 242 of file Ptr.h.

References edm::Ptr< T >::core_, edm::Ptr< T >::getData_(), and edm::RefCore::productPtr().

Referenced by edm::Ptr< PileUpPFCandidate >::~Ptr().

242  {
243  getData_();
244  return *reinterpret_cast<T const*>(core_.productPtr());
245  }
void getData_(bool throwIfNotFound=true) const
Definition: Ptr.h:203
void const * productPtr() const
Definition: RefCore.h:52
RefCore core_
Definition: Ptr.h:224
long double T
template<typename T >
T const * edm::Ptr< T >::operator-> ( ) const
inline

Member dereference operator.

Definition at line 251 of file Ptr.h.

References edm::Ptr< T >::core_, edm::Ptr< T >::getData_(), and edm::RefCore::productPtr().

Referenced by edm::Ptr< PileUpPFCandidate >::get(), and edm::Ptr< PileUpPFCandidate >::~Ptr().

251  {
252  getData_();
253  return reinterpret_cast<T const*>(core_.productPtr());
254  }
void getData_(bool throwIfNotFound=true) const
Definition: Ptr.h:203
void const * productPtr() const
Definition: RefCore.h:52
RefCore core_
Definition: Ptr.h:224
long double T
template<typename T>
void const* edm::Ptr< T >::product ( ) const
inline

Definition at line 193 of file Ptr.h.

193 {return 0;}
template<typename T>
EDProductGetter const* edm::Ptr< T >::productGetter ( ) const
inline

Accessor for product getter.

Definition at line 184 of file Ptr.h.

Referenced by edm::Ptr< PileUpPFCandidate >::getData_(), and edm::FwdPtr< FFTJPTJet >::productGetter().

184 {return core_.productGetter();}
RefCore core_
Definition: Ptr.h:224
EDProductGetter const * productGetter() const
Definition: RefCore.h:84
template<typename T>
RefCore const& edm::Ptr< T >::refCore ( ) const
inline

Friends And Related Function Documentation

template<typename T>
friend class PtrVectorBase
friend

Definition at line 42 of file Ptr.h.

Member Data Documentation

template<typename T>
RefCore edm::Ptr< T >::core_
private
template<typename T>
key_type edm::Ptr< T >::key_
private