#include <ValueMap.h>
Public Member Functions | |
void | add (const Map &map) |
void | fill () |
Filler (Map &map) | |
template<typename H , typename I > | |
void | insert (const H &h, I begin, I end) |
Protected Attributes | |
Map & | map_ |
Private Types | |
typedef Map::id_offset_vector | id_offset_vector |
typedef std::vector< size_t > | index_vector |
typedef Map::offset | offset |
typedef std::map< ProductID, value_vector > | value_map |
typedef std::vector< typename Map::value_type > | value_vector |
Private Member Functions | |
void | throwAdd () const |
void | throwFillID (ProductID id) const |
void | throwFillSize () const |
Private Attributes | |
value_map | values_ |
Definition at line 22 of file ValueMap.h.
typedef Map::id_offset_vector edm::helper::Filler< Map >::id_offset_vector [private] |
Definition at line 28 of file ValueMap.h.
typedef std::vector<size_t> edm::helper::Filler< Map >::index_vector [private] |
Definition at line 24 of file ValueMap.h.
typedef Map::offset edm::helper::Filler< Map >::offset [private] |
Definition at line 27 of file ValueMap.h.
typedef std::map<ProductID, value_vector> edm::helper::Filler< Map >::value_map [private] |
Definition at line 26 of file ValueMap.h.
typedef std::vector<typename Map::value_type> edm::helper::Filler< Map >::value_vector [private] |
Definition at line 25 of file ValueMap.h.
edm::helper::Filler< Map >::Filler | ( | Map & | map | ) | [inline, explicit] |
Reimplemented in edm::Association< C >::Filler.
Definition at line 30 of file ValueMap.h.
void edm::helper::Filler< Map >::add | ( | const Map & | map | ) | [inline] |
Reimplemented in edm::Association< C >::Filler.
Definition at line 34 of file ValueMap.h.
Referenced by edm::ValueMap< reco::MuonMETCorrectionData >::add(), and edm::helper::Filler< Association< C > >::Filler().
{ if (map.empty()) return; typename id_offset_vector::const_iterator j = map.ids_.begin(); const typename id_offset_vector::const_iterator end = map.ids_.end(); size_t i = 0; const size_t size = map.values_.size(); // std::pair<ProductID, offset> id = *j; do { ProductID id = j->first; ++j; size_t max = (j == end ? size : j->second); typename value_map::iterator f = values_.find(id); if(f!=values_.end()) throwAdd(); value_vector & values = values_.insert(std::make_pair(id, value_vector())).first->second; while(i!=max) values.push_back( map.values_[i++] ); } while(j != end); }
void edm::helper::Filler< Map >::fill | ( | void | ) | [inline] |
Definition at line 62 of file ValueMap.h.
Referenced by edm::Association< C >::add(), edm::ValueMap< reco::MuonMETCorrectionData >::add(), PFLinker::fillValueMap(), HLTMuonIsoFilter::hltFilter(), PFCandidateMixer::mix(), pat::JetCorrFactorsProducer::produce(), CosmicsMuonIdProducer::produce(), DeDxEstimatorProducer::produce(), MCTrackMatcher::produce(), pat::PATVertexAssociationProducer::produce(), IsolationProducerForTracks::produce(), L2MuonIsolationProducer::produce(), MuonIdProducer::produce(), reco::PhysObjectMatcher< C1, C2, S, D, Q >::produce(), AssociationVector2ValueMap< KeyRefProd, CVal >::produce(), GoodSeedProducer::produce(), EgammaPhotonTkIsolationProducer::produce(), cms::MuonMETValueMapProducer::produce(), CandIsoDepositProducer::produce(), EgammaElectronTkIsolationProducer::produce(), L3MuonIsolationProducer::produce(), AlignmentPrescaler::produce(), GlobalTrackQualityProducer::produce(), L3MuonCombinedRelativeIsolationProducer::produce(), CandIsolatorFromDeposits::produce(), MuonMCClassifier::produce(), pat::HLTL1MuonMatcher::produce(), reco::modulesNew::Matcher< C1, C2, S, D >::produce(), GenTrackMatcher::produce(), AssociationMapOneToOne2Association< CKey, CVal >::produce(), MuIsoDepositProducer::produce(), CastorJetIDProducer::produce(), reco::modulesNew::MCTruthCompositeMatcher::produce(), TkAlCaOverlapTagger::produce(), ProduceIsolationMap::produce(), pat::TauJetCorrFactorsProducer::produce(), ElectronIDExternalProducer< algo >::produce(), cms::MuonTCMETValueMapProducer::produce(), MuonSelectionTypeValueMapProducer::produce(), PFElectronTranslator::produce(), RecoTauJetRegionProducer::produce(), PileupJetIdProducer::produce(), JetIDProducer::produce(), pat::PATTriggerEventProducer::produce(), EgammaElectronTkNumIsolationProducer::produce(), pat::L1MuonMatcher::produce(), EgammaPhotonTkNumIsolationProducer::produce(), TrackProducerWithSCAssociation::produce(), MuonTimingProducer::produce(), PhotonIDProducer::produce(), EnergyLossProducer::produce(), PFCandIsolatorFromDeposits::produce(), EgammaEcalRecHitIsolationProducer::produce(), MuonShowerInformationProducer::produce(), DeDxDiscriminatorProducer::produce(), DeDxEstimatorProducerPixelTripplet::produce(), pat::MatcherByPulls< T >::produce(), EgammaTowerIsolationProducer::produce(), ConversionTrackCandidateProducer::produce(), pat::HLTL1MuonMatcher::storeExtraInfo(), pat::L1MuonMatcher::storeExtraInfo(), TriggerMatcherToHLTDebug::storeValueMap(), pat::MatcherUsingTracks::storeValueMap(), MuIsolatorResultProducer< BT >::writeOutImpl(), and MuonMCClassifier::writeValueMap().
{ map_.clear(); offset off = 0; for(typename value_map::const_iterator i = values_.begin(); i != values_.end(); ++i) { ProductID id = i->first; map_.ids_.push_back(std::make_pair(id, off)); const value_vector & values = i->second; for(typename value_vector::const_iterator j = values.begin(); j != values.end(); ++j) { map_.values_.push_back( *j ); ++off; } } }
void edm::helper::Filler< Map >::insert | ( | const H & | h, |
I | begin, | ||
I | end | ||
) | [inline] |
Definition at line 53 of file ValueMap.h.
Referenced by EcalHaloAlgo::Calculate(), PFElectronTranslator::fillMVAValueMap(), GoodSeedProducer::fillPreIdRefValueMap(), PFElectronTranslator::fillSCRefValueMap(), PFLinker::fillValueMap(), HLTMuonIsoFilter::hltFilter(), PFCandidateMixer::mix(), pat::JetCorrFactorsProducer::produce(), CosmicsMuonIdProducer::produce(), DeDxEstimatorProducer::produce(), MCTrackMatcher::produce(), IsolationProducerForTracks::produce(), pat::PATVertexAssociationProducer::produce(), L2MuonIsolationProducer::produce(), MuonIdProducer::produce(), AssociationVector2ValueMap< KeyRefProd, CVal >::produce(), reco::PhysObjectMatcher< C1, C2, S, D, Q >::produce(), EgammaPhotonTkIsolationProducer::produce(), cms::MuonMETValueMapProducer::produce(), CandIsoDepositProducer::produce(), EgammaElectronTkIsolationProducer::produce(), L3MuonIsolationProducer::produce(), AlignmentPrescaler::produce(), GlobalTrackQualityProducer::produce(), L3MuonCombinedRelativeIsolationProducer::produce(), reco::modulesNew::Matcher< C1, C2, S, D >::produce(), pat::HLTL1MuonMatcher::produce(), MuonMCClassifier::produce(), CandIsolatorFromDeposits::produce(), GenTrackMatcher::produce(), AssociationMapOneToOne2Association< CKey, CVal >::produce(), MuIsoDepositProducer::produce(), CastorJetIDProducer::produce(), TkAlCaOverlapTagger::produce(), reco::modulesNew::MCTruthCompositeMatcher::produce(), ProduceIsolationMap::produce(), RecoTauJetRegionProducer::produce(), pat::TauJetCorrFactorsProducer::produce(), ElectronIDExternalProducer< algo >::produce(), cms::MuonTCMETValueMapProducer::produce(), MuonSelectionTypeValueMapProducer::produce(), PileupJetIdProducer::produce(), JetIDProducer::produce(), pat::PATTriggerEventProducer::produce(), EgammaElectronTkNumIsolationProducer::produce(), pat::L1MuonMatcher::produce(), EgammaPhotonTkNumIsolationProducer::produce(), TrackProducerWithSCAssociation::produce(), MuonTimingProducer::produce(), PhotonIDProducer::produce(), PFCandIsolatorFromDeposits::produce(), EnergyLossProducer::produce(), EgammaEcalRecHitIsolationProducer::produce(), MuonShowerInformationProducer::produce(), DeDxDiscriminatorProducer::produce(), DeDxEstimatorProducerPixelTripplet::produce(), pat::MatcherByPulls< T >::produce(), EgammaTowerIsolationProducer::produce(), ConversionTrackCandidateProducer::produce(), pat::HLTL1MuonMatcher::storeExtraInfo(), pat::L1MuonMatcher::storeExtraInfo(), pat::MatcherUsingTracks::storeValueMap(), TriggerMatcherToHLTDebug::storeValueMap(), MuIsolatorResultProducer< BT >::writeOutImpl(), and MuonMCClassifier::writeValueMap().
{ ProductID id = h.id(); size_t size = h->size(), sizeIt = end - begin; if(sizeIt!=size) throwFillSize(); typename value_map::const_iterator f = values_.find(id); if(f != values_.end()) throwFillID(id); value_vector & values = values_.insert(make_pair(id, value_vector(size))).first->second; std::copy(begin, end, values.begin()); }
void edm::helper::Filler< Map >::throwAdd | ( | ) | const [inline, private] |
Definition at line 91 of file ValueMap.h.
Referenced by edm::helper::Filler< Association< C > >::add().
{ Exception::throwThis(errors::InvalidReference, "ValueMap: trying to add entries for an already existing product\n"); }
void edm::helper::Filler< Map >::throwFillID | ( | ProductID | id | ) | const [inline, private] |
Definition at line 86 of file ValueMap.h.
Referenced by edm::helper::Filler< Association< C > >::insert().
{ Exception e(errors::InvalidReference); e << "index map has already been filled for id: " << id << "\n"; e.raise(); }
void edm::helper::Filler< Map >::throwFillSize | ( | ) | const [inline, private] |
Definition at line 81 of file ValueMap.h.
Referenced by edm::helper::Filler< Association< C > >::insert().
{ Exception::throwThis(errors::InvalidReference, "ValueMap::Filler: handle and reference " "collections should the same size\n"); }
Map& edm::helper::Filler< Map >::map_ [protected] |
Definition at line 77 of file ValueMap.h.
Referenced by edm::helper::Filler< Association< C > >::fill().
value_map edm::helper::Filler< Map >::values_ [private] |
Definition at line 80 of file ValueMap.h.
Referenced by edm::helper::Filler< Association< C > >::add(), edm::helper::Filler< Association< C > >::fill(), and edm::helper::Filler< Association< C > >::insert().