#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(), pat::JetCorrFactorsProducer::produce(), CosmicsMuonIdProducer::produce(), MCTrackMatcher::produce(), DeDxEstimatorProducer::produce(), pat::PATVertexAssociationProducer::produce(), IsolationProducerForTracks::produce(), SoftElectronCandProducer::produce(), L2MuonIsolationProducer::produce(), MuonIdProducer::produce(), reco::PhysObjectMatcher< C1, C2, S, D, Q >::produce(), AssociationVector2ValueMap< KeyRefProd, CVal >::produce(), GoodSeedProducer::produce(), EgammaPhotonTkIsolationProducer::produce(), cms::MuonMETValueMapProducer::produce(), EgammaElectronTkIsolationProducer::produce(), CandIsoDepositProducer::produce(), L3MuonIsolationProducer::produce(), AlignmentPrescaler::produce(), GlobalTrackQualityProducer::produce(), L3MuonCombinedRelativeIsolationProducer::produce(), GenTrackMatcher::produce(), CandIsolatorFromDeposits::produce(), reco::modulesNew::Matcher< C1, C2, S, D >::produce(), AssociationMapOneToOne2Association< CKey, CVal >::produce(), MuIsoDepositProducer::produce(), ProduceIsolationMap::produce(), CastorJetIDProducer::produce(), reco::modulesNew::MCTruthCompositeMatcher::produce(), TkAlCaOverlapTagger::produce(), ElectronIDExternalProducer< algo >::produce(), pat::TauJetCorrFactorsProducer::produce(), cms::MuonTCMETValueMapProducer::produce(), MuonSelectionTypeValueMapProducer::produce(), PFElectronTranslator::produce(), RecoTauJetRegionProducer::produce(), JetIDProducer::produce(), EgammaElectronTkNumIsolationProducer::produce(), pat::PATTriggerEventProducer::produce(), TrackProducerWithSCAssociation::produce(), EgammaPhotonTkNumIsolationProducer::produce(), MuonTimingProducer::produce(), PhotonIDProducer::produce(), EgammaEcalRecHitIsolationProducer::produce(), EnergyLossProducer::produce(), MuonShowerInformationProducer::produce(), DeDxDiscriminatorProducer::produce(), DeDxEstimatorProducerPixelTripplet::produce(), ConversionTrackCandidateProducer::produce(), EgammaTowerIsolationProducer::produce(), and MuIsolatorResultProducer< BT >::writeOutImpl().
{ 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(), CosmicsMuonIdProducer::produce(), pat::JetCorrFactorsProducer::produce(), DeDxEstimatorProducer::produce(), MCTrackMatcher::produce(), IsolationProducerForTracks::produce(), pat::PATVertexAssociationProducer::produce(), MuonIdProducer::produce(), L2MuonIsolationProducer::produce(), SoftElectronCandProducer::produce(), reco::PhysObjectMatcher< C1, C2, S, D, Q >::produce(), AssociationVector2ValueMap< KeyRefProd, CVal >::produce(), cms::MuonMETValueMapProducer::produce(), EgammaPhotonTkIsolationProducer::produce(), L3MuonIsolationProducer::produce(), CandIsoDepositProducer::produce(), EgammaElectronTkIsolationProducer::produce(), L3MuonCombinedRelativeIsolationProducer::produce(), GlobalTrackQualityProducer::produce(), AlignmentPrescaler::produce(), reco::modulesNew::Matcher< C1, C2, S, D >::produce(), CandIsolatorFromDeposits::produce(), GenTrackMatcher::produce(), MuIsoDepositProducer::produce(), AssociationMapOneToOne2Association< CKey, CVal >::produce(), TkAlCaOverlapTagger::produce(), reco::modulesNew::MCTruthCompositeMatcher::produce(), CastorJetIDProducer::produce(), ProduceIsolationMap::produce(), RecoTauJetRegionProducer::produce(), MuonSelectionTypeValueMapProducer::produce(), cms::MuonTCMETValueMapProducer::produce(), pat::TauJetCorrFactorsProducer::produce(), ElectronIDExternalProducer< algo >::produce(), pat::PATTriggerEventProducer::produce(), EgammaElectronTkNumIsolationProducer::produce(), JetIDProducer::produce(), MuonTimingProducer::produce(), EgammaPhotonTkNumIsolationProducer::produce(), TrackProducerWithSCAssociation::produce(), EnergyLossProducer::produce(), EgammaEcalRecHitIsolationProducer::produce(), PhotonIDProducer::produce(), DeDxEstimatorProducerPixelTripplet::produce(), DeDxDiscriminatorProducer::produce(), MuonShowerInformationProducer::produce(), EgammaTowerIsolationProducer::produce(), ConversionTrackCandidateProducer::produce(), and MuIsolatorResultProducer< BT >::writeOutImpl().
{ 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().