|
| PackedPFCandidateRefMixer (const edm::ParameterSet &iConfig) |
|
virtual void | produce (edm::Event &iEvent, const edm::EventSetup &iSetup) override |
|
virtual | ~PackedPFCandidateRefMixer () |
|
| EDProducer ()=default |
|
| EDProducerBase () |
|
ModuleDescription const & | moduleDescription () const |
|
| ~EDProducerBase () override |
|
void | callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func) |
|
std::vector< edm::ProductResolverIndex > const & | indiciesForPutProducts (BranchType iBranchType) const |
|
| ProducerBase () |
|
std::vector< edm::ProductResolverIndex > const & | putTokenIndexToProductResolverIndex () const |
|
void | registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &) |
|
std::function< void(BranchDescription const &)> | registrationCallback () const |
| used by the fwk to register list of products More...
|
|
void | resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel) |
|
virtual | ~ProducerBase () noexcept(false) |
|
std::vector< ConsumesInfo > | consumesInfo () const |
|
void | convertCurrentProcessAlias (std::string const &processName) |
| Convert "@currentProcess" in InputTag process names to the actual current process name. More...
|
|
| EDConsumerBase () |
|
| EDConsumerBase (EDConsumerBase const &)=delete |
|
| EDConsumerBase (EDConsumerBase &&)=default |
|
ProductResolverIndexAndSkipBit | indexFrom (EDGetToken, BranchType, TypeID const &) const |
|
void | itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
|
void | itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
|
std::vector< ProductResolverIndexAndSkipBit > const & | itemsToGetFrom (BranchType iType) const |
|
void | labelsForToken (EDGetToken iToken, Labels &oLabels) const |
|
void | modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const |
|
EDConsumerBase const & | operator= (EDConsumerBase const &)=delete |
|
EDConsumerBase & | operator= (EDConsumerBase &&)=default |
|
bool | registeredToConsume (ProductResolverIndex, bool, BranchType) const |
|
bool | registeredToConsumeMany (TypeID const &, BranchType) const |
|
void | updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet) |
|
virtual | ~EDConsumerBase () noexcept(false) |
|
|
typedef CacheContexts< T... > | CacheTypes |
|
typedef CacheTypes::GlobalCache | GlobalCache |
|
typedef AbilityChecker< T... > | HasAbility |
|
typedef CacheTypes::LuminosityBlockCache | LuminosityBlockCache |
|
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache > | LuminosityBlockContext |
|
typedef CacheTypes::LuminosityBlockSummaryCache | LuminosityBlockSummaryCache |
|
typedef CacheTypes::RunCache | RunCache |
|
typedef RunContextT< RunCache, GlobalCache > | RunContext |
|
typedef CacheTypes::RunSummaryCache | RunSummaryCache |
|
typedef EDProducerAdaptorBase | ModuleType |
|
using | ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >> |
|
typedef ProductRegistryHelper::TypeLabelList | TypeLabelList |
|
typedef ProductLabels | Labels |
|
static const std::string & | baseType () |
|
static void | fillDescriptions (ConfigurationDescriptions &descriptions) |
|
static void | prevalidate (ConfigurationDescriptions &descriptions) |
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | consumes (edm::InputTag const &tag) |
|
EDGetToken | consumes (const TypeToGet &id, edm::InputTag const &tag) |
|
template<BranchType B> |
EDGetToken | consumes (TypeToGet const &id, edm::InputTag const &tag) |
|
ConsumesCollector | consumesCollector () |
| Use a ConsumesCollector to gather consumes information from helper functions. More...
|
|
template<typename ProductType , BranchType B = InEvent> |
void | consumesMany () |
|
void | consumesMany (const TypeToGet &id) |
|
template<BranchType B> |
void | consumesMany (const TypeToGet &id) |
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | mayConsume (edm::InputTag const &tag) |
|
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
|
template<BranchType B> |
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
|
Definition at line 50 of file PackedPFCandidateRefMixer.cc.
References DEFINE_FWK_MODULE, Exception, edm::helper::Filler< Map >::fill(), objects.autophobj::filler, runEdmFileComparison::found, edm::Event::getByToken(), mps_fire::i, edm::Ref< C, T, F >::id(), edm::helper::Filler< Map >::insert(), edm::Ref< C, T, F >::key(), eostools::move(), gen::n, MillePedeFileConverter_cfg::out, packedPFCandidateRefMixer_cfi::pf, pf2pcs_, packedPFCandidateRefMixer_cfi::pf2pf, pf2pf_, pf_, edm::Event::put(), and edm::refToPtr().
Referenced by ~PackedPFCandidateRefMixer().
53 std::vector<edm::Handle<edm::Association<pat::PackedCandidateCollection>>> pf2pcs(
pf2pcs_.size());
56 for (
unsigned int i = 0,
n = pf2pcs.size();
i <
n; ++
i) {
59 std::vector<reco::CandidatePtr> outptrs;
60 outptrs.reserve(pf->size());
61 for (
unsigned int i = 0, n = pf->size();
i <
n; ++
i) {
63 const auto & newpfRef = (*pf2pf)[oldpfRef];
65 for (
const auto & pf2pc : pf2pcs) {
66 if (pf2pc->contains(newpfRef.id())) {
67 outptrs.push_back(
refToPtr((*pf2pc)[newpfRef]));
73 edm::LogPrint(
"PackedPFCandidateRefMixer") <<
"oldpfRef: " << oldpfRef.id() <<
" / " << oldpfRef.key() <<
"\n";
74 edm::LogPrint(
"PackedPFCandidateRefMixer") <<
"newpfRef: " << newpfRef.id() <<
" / " << newpfRef.key() <<
"\n";
75 edm::LogPrint(
"PackedPFCandidateRefMixer") <<
"and I have " << pf2pcs.size() <<
" rekey maps." <<
"\n";
76 for (
const auto & pf2pc : pf2pcs) {
77 edm::LogPrint(
"PackedPFCandidateRefMixer") <<
"this map has keys in: " <<
"\n";
78 for (
const auto & pair : pf2pc->ids()) {
edm::LogPrint(
"PackedPFCandidateRefMixer") <<
"\t" << pair.first <<
"\n"; }
80 throw cms::Exception(
"LogicError") <<
"A packed candidate has refs that we don't understand\n";
85 filler.insert(pf, outptrs.begin(), outptrs.end());
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Ptr< typename C::value_type > refToPtr(Ref< C, typename C::value_type, refhelper::FindUsingAdvance< C, typename C::value_type > > const &ref)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< std::vector< reco::PFCandidate > > pf_
edm::EDGetTokenT< edm::ValueMap< reco::PFCandidateRef > > pf2pf_
std::vector< edm::EDGetTokenT< edm::Association< pat::PackedCandidateCollection > > > pf2pcs_