#include <RefToBase.h>
Public Types | |
typedef T | value_type |
Public Member Functions | |
template<class REF > | |
REF | castTo () const |
cast to a concrete type | |
value_type const * | get () const |
bool | hasProductCache () const |
std::auto_ptr < reftobase::RefHolderBase > | holder () const |
ProductID | id () const |
bool | isAvailable () const |
bool | isNonnull () const |
Checks for non-null. | |
bool | isNull () const |
Checks for null. | |
size_t | key () const |
bool | operator! () const |
Checks for null. | |
bool | operator!= (RefToBase const &rhs) const |
value_type const & | operator* () const |
value_type const * | operator-> () const |
RefToBase const & | operator= (RefToBase const &rhs) |
bool | operator== (RefToBase const &rhs) const |
void const * | product () const |
EDProductGetter const * | productGetter () const |
RefToBase (RefToBase const &other) | |
RefToBase (Handle< View< T > > const &handle, size_t i) | |
template<typename C1 , typename T1 , typename F1 > | |
RefToBase (Ref< C1, T1, F1 > const &r) | |
RefToBase () | |
RefToBase (RefToBaseProd< T > const &r, size_t i) | |
template<typename C > | |
RefToBase (RefProd< C > const &r) | |
template<typename T1 > | |
RefToBase (RefToBase< T1 > const &r) | |
RefToBase (boost::shared_ptr< reftobase::RefHolderBase > p) | |
void | swap (RefToBase &other) |
~RefToBase () | |
Private Member Functions | |
value_type const * | getPtrImpl () const |
Private Attributes | |
reftobase::BaseHolder < value_type > * | holder_ |
Friends | |
class | RefToBase |
class | RefToBaseProd< T > |
class | RefToBaseVector< T > |
Definition at line 64 of file RefToBase.h.
typedef T edm::RefToBase< T >::value_type |
Definition at line 67 of file RefToBase.h.
edm::RefToBase< T >::RefToBase | ( | ) |
RefToBase::RefToBase | ( | RefToBase< T > const & | other | ) | [inline] |
Definition at line 131 of file RefToBase.h.
: holder_(other.holder_ ? other.holder_->clone() : 0) { }
RefToBase::RefToBase | ( | Ref< C1, T1, F1 > const & | r | ) | [inline, explicit] |
Definition at line 138 of file RefToBase.h.
: holder_(new reftobase::Holder<T,Ref<C1, T1, F1> >(iRef)) { }
RefToBase::RefToBase | ( | RefProd< C > const & | r | ) | [inline, explicit] |
Definition at line 145 of file RefToBase.h.
: holder_(new reftobase::Holder<T,RefProd<C> >(iRef)) { }
RefToBase::RefToBase | ( | RefToBaseProd< T > const & | r, |
size_t | i | ||
) | [inline] |
Definition at line 362 of file RefToBase.h.
Definition at line 368 of file RefToBase.h.
RefToBase::RefToBase | ( | RefToBase< T1 > const & | r | ) | [inline, explicit] |
Definition at line 152 of file RefToBase.h.
References relativeConstraints::value.
: holder_(new reftobase::IndirectHolder<T> ( boost::shared_ptr< edm::reftobase::RefHolderBase>(iRef.holder().release()) ) ) { // OUT: holder_( new reftobase::Holder<T,RefToBase<T1> >(iRef ) ) { // Forcing the conversion through IndirectHolder, // as Holder<T,RefToBase<T1>> would need dictionaries we will never have. // In this way we only need the IndirectHolder<T> and the RefHolder of the real type of the item // This might cause a small performance penalty. BOOST_STATIC_ASSERT( ( boost::is_base_of<T, T1>::value ) ); }
RefToBase::RefToBase | ( | boost::shared_ptr< reftobase::RefHolderBase > | p | ) | [inline] |
Definition at line 167 of file RefToBase.h.
RefToBase::~RefToBase | ( | ) | [inline] |
Definition at line 173 of file RefToBase.h.
{ delete holder_; }
REF RefToBase::castTo | ( | ) | const |
cast to a concrete type
Definition at line 236 of file RefToBase.h.
References edm::reftobase::RefHolder< REF >::getRef(), edm::errors::InvalidReference, AlCaRecoCosmics_cfg::name, and edm::Exception::throwThis().
Referenced by ElectronMcFakeValidator::analyze(), ZMuMuAnalyzer_cynematics::analyze(), GsfElectronDataAnalyzer::analyze(), ElectronMcSignalValidator::analyze(), ZMuMuAnalyzer::analyze(), GsfElectronMCFakeAnalyzer::analyze(), ElectronSeedAnalyzer::analyze(), GsfElectronMCAnalyzer::analyze(), GsfElectronFakeAnalyzer::analyze(), TrackerOnlyConversionProducer::buildCollection(), MuonTrajectoryCleaner::clean(), reco::JetSignalVertexCompatibilityAlgo::convert(), HLTElectronPixelMatchFilter::filter(), ZToMuMuFilter::filter(), reco::GsfElectronCore::GsfElectronCore(), HLTEgamma::MakeL1IsolatedElectrons(), HLTEgamma::MakeL1NonIsolatedElectrons(), pat::TriggerObject::origL1EmRef(), pat::TriggerObject::origL1EtMissRef(), pat::TriggerObject::origL1JetRef(), pat::TriggerObject::origL1MuonRef(), reco::PFTauDecayMode::pfMasterClones(), NuclearTrackCorrector::produce(), ElectronSeedProducer::produce(), GsfElectronCoreEcalDrivenProducer::produce(), GsfElectronAlgo::setCutBasedPreselectionFlag(), and reco::CaloTauTagInfo::setJetRef().
{ if (!holder_) { Exception::throwThis(errors::InvalidReference, "attempting to cast a null RefToBase;\n" "You should check for nullity before casting."); } reftobase::RefHolder<REF> concrete_holder; std::string hidden_ref_type; if (!holder_->fillRefIfMyTypeMatches(concrete_holder, hidden_ref_type)) { Exception::throwThis(errors::InvalidReference, "cast to type: ", typeid(REF).name(), "\nfrom type: ", hidden_ref_type.c_str(), " failed. Catch this exception in case you need to check" " the concrete reference type."); } return concrete_holder.getRef(); }
T const * RefToBase::get | ( | void | ) | const [inline] |
Definition at line 207 of file RefToBase.h.
Referenced by DimuonStatistics::analyze(), PFCheckHitPattern::analyze(), GlbMuQualityCutsAnalysis::analyze(), TestOutliers::analyze(), TkConvValidator::analyze(), TrackerOnlyConversionProducer::buildCollection(), edm::helper::RefConverter< RefToBase< T >, Ptr< T > >::convert(), PFCandCommonVertexFitterBase::fill(), reco::GenJet::genParticle(), reco::LeafRefCandidateT< T >::get(), reco::LeafCandidate::get(), reco::Candidate::get(), L6SLBCorrector::getBTagInfoIndex(), PrimaryVertexAnalyzer4PU::getSimEvents(), JetMaker::makeSpecific(), pat::MET::MET(), pat::TriggerObject::origObjCand(), PFCheckHitPattern::print(), pat::PATJetProducer::produce(), DimuonMCMatcher::produce(), edm::View< T >::ptrAt(), reco::CaloTauTagInfo::setJetRef(), pat::Tau::Tau(), pat::VertexAssociation::track(), reco::ConversionTrack::track(), and pat::Jet::tryImportSpecific().
{ return getPtrImpl(); }
T const * RefToBase::getPtrImpl | ( | ) | const [inline, private] |
Definition at line 335 of file RefToBase.h.
bool RefToBase::hasProductCache | ( | ) | const [inline] |
Definition at line 322 of file RefToBase.h.
{ return holder_->hasProductCache(); }
std::auto_ptr< reftobase::RefHolderBase > RefToBase::holder | ( | ) | const |
Definition at line 341 of file RefToBase.h.
{ return holder_->holder(); }
ProductID RefToBase::id | ( | void | ) | const [inline] |
Definition at line 215 of file RefToBase.h.
References edm::ProductID::id().
Referenced by VertexAssociatorByTracks::associateSimToReco(), edm::helper::RefConverter< RefToBase< T >, Ptr< T > >::convert(), pat::PATMuonProducer::fillMuon(), BTagPerformanceAnalyzerMC::getJetWithFlavour(), reco::JetSignalVertexCompatibilityAlgo::RefToBaseLess< T >::operator()(), BTagPerformanceAnalyzerOnData::JetRefCompare::operator()(), MuonAssociatorByHits::RefToBaseSort::operator()(), BTagPerformanceAnalyzerMC::JetRefCompare::operator()(), MatchJet::operator()(), edm::View< T >::ptrAt(), edm::RefToBaseProd< T >::RefToBaseProd(), and pat::helper::TriggerMatchHelper::triggerMatchObject().
bool edm::RefToBase< T >::isAvailable | ( | ) | const [inline] |
Checks if collection is in memory or available in the Event. No type checking is done.
Definition at line 110 of file RefToBase.h.
Referenced by edm::helper::RefConverter< RefToBase< T >, Ptr< T > >::convert(), edm::View< T >::ptrAt(), and pat::Jet::tryImportSpecific().
{ return holder_->isAvailable(); }
bool RefToBase::isNonnull | ( | ) | const [inline] |
Checks for non-null.
Definition at line 274 of file RefToBase.h.
Referenced by MuonAssociatorByHits::associateMuons(), TrackerOnlyConversionProducer::buildCollection(), TrackerOnlyConversionProducer::checkPhi(), VertexClassifier::evaluate(), TrackClassifier::evaluate(), RecoTracktoTP::matched(), TPtoRecoTrack::matchedA(), TPtoRecoTrack::matchedB(), UpdatedMuonInnerTrackRef::produce(), SoftLepton::refineJetAxis(), RecoTracktoTP::RT(), TPtoRecoTrack::RTA(), TPtoRecoTrack::RTB(), and pat::Jet::tryImportSpecific().
{ return !isNull(); }
bool RefToBase::isNull | ( | ) | const [inline] |
Checks for null.
Definition at line 265 of file RefToBase.h.
References ExpressReco_HICollisions_FallBack::id.
Referenced by ElectronSeedAnalyzer::analyze(), pat::helper::VertexingHelper::associate(), edm::RefToBaseVector< T >::fillView(), BTagPerformanceAnalyzerMC::getJetWithFlavour(), reco::GsfElectronCore::GsfElectronCore(), pat::VertexAssociation::hasTrack(), reco::CaloRecHitCandidate::overlap(), and HLTMuonTrackMassFilter::pairMatched().
{ return !id().isValid(); }
size_t RefToBase::key | ( | ) | const [inline] |
Definition at line 223 of file RefToBase.h.
References edm::errors::InvalidReference, and edm::Exception::throwThis().
Referenced by MuonTrackValidator::analyze(), HLTMonBTagIPSource::analyze(), HLTMonBTagMuSource::analyze(), VertexAssociatorByTracks::associateSimToReco(), PFDisplacedVertexFinder::commonTracks(), edm::helper::RefConverter< RefToBase< T >, Ptr< T > >::convert(), reco::JetSignalVertexCompatibilityAlgo::RefToBaseLess< T >::operator()(), reco::PFDisplacedVertexSeed::Compare::operator()(), BTagPerformanceAnalyzerOnData::JetRefCompare::operator()(), MuonAssociatorByHits::RefToBaseSort::operator()(), BTagPerformanceAnalyzerMC::JetRefCompare::operator()(), SoftLepton::TrackCompare::operator()(), PFDisplacedTrackerVertexProducer::produce(), DistortedPFCandProducer::produce(), edm::View< T >::ptrAt(), and pat::helper::TriggerMatchHelper::triggerMatchObject().
{ if ( holder_ == 0 ) Exception::throwThis(errors::InvalidReference, "attempting get key from null RefToBase;\n" "You should check for nullity before calling key()."); return holder_->key(); }
bool RefToBase::operator! | ( | ) | const [inline] |
bool RefToBase::operator!= | ( | RefToBase< T > const & | rhs | ) | const [inline] |
Definition at line 301 of file RefToBase.h.
{ return !(*this == rhs); }
T const & RefToBase::operator* | ( | ) | const [inline] |
Definition at line 191 of file RefToBase.h.
{ return *getPtrImpl(); }
T const * RefToBase::operator-> | ( | ) | const [inline] |
Definition at line 199 of file RefToBase.h.
{ return getPtrImpl(); }
RefToBase< T > const & RefToBase::operator= | ( | RefToBase< T > const & | rhs | ) | [inline] |
Definition at line 181 of file RefToBase.h.
References edm::RefToBase< T >::swap(), and cond::rpcobtemp::temp.
{ RefToBase<T> temp( iRHS); temp.swap(*this); return *this; }
bool RefToBase::operator== | ( | RefToBase< T > const & | rhs | ) | const [inline] |
Definition at line 291 of file RefToBase.h.
References edm::RefToBase< T >::holder_.
void const * RefToBase::product | ( | ) | const [inline] |
Definition at line 328 of file RefToBase.h.
Referenced by edm::RefToBaseProd< T >::RefToBaseProd().
{ return holder_->product(); }
EDProductGetter const * RefToBase::productGetter | ( | ) | const [inline] |
Definition at line 316 of file RefToBase.h.
{ return holder_->productGetter(); }
void RefToBase::swap | ( | RefToBase< T > & | other | ) | [inline] |
Definition at line 309 of file RefToBase.h.
References edm::RefToBase< T >::holder_, and edm::swap().
Referenced by edm::RefToBase< T >::operator=(), and edm::swap().
RefToBase::RefToBase [friend] |
Definition at line 116 of file RefToBase.h.
friend class RefToBaseProd< T > [friend] |
Definition at line 115 of file RefToBase.h.
friend class RefToBaseVector< T > [friend] |
Definition at line 114 of file RefToBase.h.
reftobase::BaseHolder<value_type>* edm::RefToBase< T >::holder_ [private] |
Definition at line 113 of file RefToBase.h.
Referenced by edm::RefToBase< TrajectorySeed >::isAvailable(), edm::RefToBase< T >::operator==(), edm::RefToBaseVector< T >::push_back(), edm::RefToBaseProd< T >::RefToBaseProd(), and edm::RefToBase< T >::swap().