CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes
AssociationMapOneToOne2Association< CKey, CVal > Class Template Reference

#include <AssociationMapOneToOne2Association.h>

Inheritance diagram for AssociationMapOneToOne2Association< CKey, CVal >:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 AssociationMapOneToOne2Association (const edm::ParameterSet &)
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducer () override
 
- Public Member Functions inherited from edm::ProducerBase
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
 
std::vector< bool > const & recordProvenanceList () 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)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
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
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Types

typedef edm::AssociationMap< edm::OneToOne< CKey, CVal > > am_t
 
typedef edm::Association< CVal > as_t
 

Private Member Functions

void produce (edm::Event &, const edm::EventSetup &) override
 

Private Attributes

edm::EDGetTokenT< am_tam_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

template<typename CKey, typename CVal>
class AssociationMapOneToOne2Association< CKey, CVal >

Definition at line 17 of file AssociationMapOneToOne2Association.h.

Member Typedef Documentation

◆ am_t

template<typename CKey , typename CVal >
typedef edm::AssociationMap<edm::OneToOne<CKey, CVal> > AssociationMapOneToOne2Association< CKey, CVal >::am_t
private

Definition at line 22 of file AssociationMapOneToOne2Association.h.

◆ as_t

template<typename CKey , typename CVal >
typedef edm::Association<CVal> AssociationMapOneToOne2Association< CKey, CVal >::as_t
private

Definition at line 23 of file AssociationMapOneToOne2Association.h.

Constructor & Destructor Documentation

◆ AssociationMapOneToOne2Association()

template<typename CKey , typename CVal >
AssociationMapOneToOne2Association< CKey, CVal >::AssociationMapOneToOne2Association ( const edm::ParameterSet cfg)

Definition at line 35 of file AssociationMapOneToOne2Association.h.

36  : am_(consumes<am_t>(cfg.template getParameter<edm::InputTag>("src"))) {
37  produces<as_t>();
38 }

Member Function Documentation

◆ produce()

template<typename CKey , typename CVal >
void AssociationMapOneToOne2Association< CKey, CVal >::produce ( edm::Event evt,
const edm::EventSetup  
)
overrideprivatevirtual

Implements edm::EDProducer.

Definition at line 41 of file AssociationMapOneToOne2Association.h.

41  {
42  using namespace edm;
43  using namespace std;
44  Handle<am_t> am;
45  evt.getByToken(am_, am);
46 
47  unique_ptr<as_t> as(new as_t);
48  typename as_t::Filler filler(*as);
49  filler.fill();
50  size_t size = am->size();
51  vector<int> indices;
52  indices.reserve(size);
53  for (typename am_t::const_iterator i = am->begin(); i != am->end(); ++i) {
54  indices.push_back(i->val.key());
55  }
56  filler.insert(am->refProd().key, indices.begin(), indices.end());
57  evt.put(std::move(as));
58 }

References trigObjTnPSource_cfi::filler, edm::Event::getByToken(), mps_fire::i, bTagCombinedSVVariables_cff::indices, eostools::move(), edm::Event::put(), and findQualityFiles::size.

Member Data Documentation

◆ am_

template<typename CKey , typename CVal >
edm::EDGetTokenT<am_t> AssociationMapOneToOne2Association< CKey, CVal >::am_
private

Definition at line 25 of file AssociationMapOneToOne2Association.h.

bTagCombinedSVVariables_cff.indices
indices
Definition: bTagCombinedSVVariables_cff.py:67
mps_fire.i
i
Definition: mps_fire.py:428
edm
HLT enums.
Definition: AlignableModifier.h:19
AssociationMapOneToOne2Association::as_t
edm::Association< CVal > as_t
Definition: AssociationMapOneToOne2Association.h:23
edm::Handle
Definition: AssociativeIterator.h:50
edm::Event::getByToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:531
edm::AssociationMap::const_iterator
friend struct const_iterator
Definition: AssociationMap.h:274
trigObjTnPSource_cfi.filler
filler
Definition: trigObjTnPSource_cfi.py:21
edm::Event::put
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
edm::ValueMap< int >::Filler
helper::Filler< ValueMap< int > > Filler
Definition: ValueMap.h:168
looper.cfg
cfg
Definition: looper.py:297
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
AssociationMapOneToOne2Association::am_
edm::EDGetTokenT< am_t > am_
Definition: AssociationMapOneToOne2Association.h:25
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443