#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 & | 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 66 of file RefToBase.h.
typedef T edm::RefToBase< T >::value_type |
Definition at line 69 of file RefToBase.h.
edm::RefToBase< T >::RefToBase | ( | ) |
Definition at line 136 of file RefToBase.h.
: holder_(other.holder_ ? other.holder_->clone() : 0) { }
RefToBase::RefToBase | ( | Ref< C1, T1, F1 > const & | r | ) | [inline, explicit] |
Definition at line 143 of file RefToBase.h.
RefToBase::RefToBase | ( | RefProd< C > const & | r | ) | [inline, explicit] |
Definition at line 150 of file RefToBase.h.
RefToBase::RefToBase | ( | RefToBaseProd< T > const & | r, |
size_t | i | ||
) | [inline] |
Definition at line 367 of file RefToBase.h.
Definition at line 373 of file RefToBase.h.
RefToBase::RefToBase | ( | RefToBase< T1 > const & | r | ) | [inline, explicit] |
Definition at line 157 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 172 of file RefToBase.h.
RefToBase::~RefToBase | ( | ) | [inline] |
Definition at line 178 of file RefToBase.h.
{ delete holder_; }
REF RefToBase::castTo | ( | ) | const |
cast to a concrete type
Definition at line 241 of file RefToBase.h.
References edm::reftobase::RefHolder< REF >::getRef(), edm::errors::InvalidReference, mergeVDriftHistosByStation::name, and edm::Exception::throwThis().
Referenced by ElectronMcFakeValidator::analyze(), GsfElectronDataAnalyzer::analyze(), ZMuMuAnalyzer_cynematics::analyze(), ElectronMcSignalValidator::analyze(), ZMuMuAnalyzer::analyze(), GsfElectronMCFakeAnalyzer::analyze(), ElectronSeedAnalyzer::analyze(), GsfElectronMCAnalyzer::analyze(), GsfElectronFakeAnalyzer::analyze(), ConversionProducer::buildCollection(), MuonTrajectoryCleaner::clean(), reco::JetSignalVertexCompatibilityAlgo::convert(), ZToMuMuFilter::filter(), reco::GsfElectronCore::GsfElectronCore(), HLTElectronPixelMatchFilter::hltFilter(), HLTEgamma::MakeL1IsolatedElectrons(), HLTEgamma::MakeL1NonIsolatedElectrons(), pat::TriggerObject::origL1EmRef(), pat::TriggerObject::origL1EtMissRef(), pat::TriggerObject::origL1JetRef(), pat::TriggerObject::origL1MuonRef(), reco::PFTauDecayMode::pfMasterClones(), NuclearTrackCorrector::produce(), ElectronSeedProducer::produce(), EgammaHLTGsfTrackVarProducer::produce(), GsfElectronCoreEcalDrivenProducer::produceEcalDrivenCore(), 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 212 of file RefToBase.h.
Referenced by DimuonStatistics::analyze(), PFCheckHitPattern::analyze(), PhotonValidator::analyze(), GlbMuQualityCutsAnalysis::analyze(), IsolatedTracksNxN::analyze(), TestOutliers::analyze(), TkConvValidator::analyze(), ConversionProducer::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(), SelectReplacementCandidates::getRawIDsAdvanced(), 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 340 of file RefToBase.h.
bool RefToBase::hasProductCache | ( | ) | const [inline] |
Definition at line 327 of file RefToBase.h.
{ return holder_->hasProductCache(); }
std::auto_ptr< reftobase::RefHolderBase > RefToBase::holder | ( | ) | const |
Definition at line 346 of file RefToBase.h.
{ return holder_->holder(); }
ProductID RefToBase::id | ( | void | ) | const [inline] |
Definition at line 220 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(), ConversionTools::matchesConversion(), 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 112 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 279 of file RefToBase.h.
Referenced by MuonAssociatorByHits::associateMuons(), ConversionProducer::buildCollection(), ConversionProducer::checkPhi(), VertexClassifier::evaluate(), TrackClassifier::evaluate(), SelectReplacementCandidates::getRawIDsAdvanced(), RecoTracktoTP::matched(), TPtoRecoTrack::matchedA(), TPtoRecoTrack::matchedB(), reco::tau::RecoTauPiZeroStripPlugin2::operator()(), reco::tau::RecoTauEnergyRecoveryPlugin::operator()(), 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 270 of file RefToBase.h.
Referenced by ElectronSeedAnalyzer::analyze(), pat::helper::VertexingHelper::associate(), edm::RefToBaseVector< T >::fillView(), BTagPerformanceAnalyzerMC::getJetWithFlavour(), reco::GsfElectronCore::GsfElectronCore(), pat::VertexAssociation::hasTrack(), ConversionTools::matchesConversion(), reco::CaloRecHitCandidate::overlap(), HLTMuonTrackMassFilter::pairMatched(), and reco::tau::qcuts::trkLongitudinalImpactParameterWrtTrack().
{ return !id().isValid(); }
size_t RefToBase::key | ( | ) | const [inline] |
Definition at line 228 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(), ConversionTools::matchesConversion(), reco::PFDisplacedVertexSeed::Compare::operator()(), reco::JetSignalVertexCompatibilityAlgo::RefToBaseLess< T >::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 edm::RefToBase< T >::operator!= | ( | RefToBase< T > const & | rhs | ) | const |
T const & RefToBase::operator* | ( | ) | const [inline] |
Definition at line 196 of file RefToBase.h.
{ return *getPtrImpl(); }
T const * RefToBase::operator-> | ( | ) | const [inline] |
Definition at line 204 of file RefToBase.h.
{ return getPtrImpl(); }
RefToBase& edm::RefToBase< T >::operator= | ( | RefToBase< T > const & | rhs | ) |
bool edm::RefToBase< T >::operator== | ( | RefToBase< T > const & | rhs | ) | const |
void const * RefToBase::product | ( | ) | const [inline] |
Definition at line 333 of file RefToBase.h.
Referenced by edm::RefToBaseProd< T >::RefToBaseProd().
{ return holder_->product(); }
EDProductGetter const * RefToBase::productGetter | ( | ) | const [inline] |
Definition at line 321 of file RefToBase.h.
{ return holder_->productGetter(); }
void edm::RefToBase< T >::swap | ( | RefToBase< T > & | other | ) |
Referenced by edm::swap().
RefToBase::RefToBase [friend] |
Definition at line 121 of file RefToBase.h.
friend class RefToBaseProd< T > [friend] |
Definition at line 120 of file RefToBase.h.
friend class RefToBaseVector< T > [friend] |
Definition at line 119 of file RefToBase.h.
reftobase::BaseHolder<value_type>* edm::RefToBase< T >::holder_ [private] |
Definition at line 118 of file RefToBase.h.
Referenced by edm::RefToBase< TrajectorySeed >::isAvailable(), edm::RefToBaseVector< T >::push_back(), and edm::RefToBaseProd< T >::RefToBaseProd().