CMS 3D CMS Logo

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

#include <AssociationVector2ValueMap.h>

Inheritance diagram for AssociationVector2ValueMap< KeyRefProd, CVal >:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 AssociationVector2ValueMap (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
 
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::AssociationVector< KeyRefProd, CVal > av_t
 
typedef av_t::CKey collection_t
 
typedef CVal::value_type value_t
 
typedef edm::ValueMap< value_tvm_t
 

Private Member Functions

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

Private Attributes

edm::EDGetTokenT< av_tav_
 

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 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>
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<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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 KeyRefProd, typename CVal>
class AssociationVector2ValueMap< KeyRefProd, CVal >

Definition at line 16 of file AssociationVector2ValueMap.h.

Member Typedef Documentation

◆ av_t

template<typename KeyRefProd , typename CVal >
typedef edm::AssociationVector<KeyRefProd, CVal> AssociationVector2ValueMap< KeyRefProd, CVal >::av_t
private

Definition at line 21 of file AssociationVector2ValueMap.h.

◆ collection_t

template<typename KeyRefProd , typename CVal >
typedef av_t::CKey AssociationVector2ValueMap< KeyRefProd, CVal >::collection_t
private

Definition at line 24 of file AssociationVector2ValueMap.h.

◆ value_t

template<typename KeyRefProd , typename CVal >
typedef CVal::value_type AssociationVector2ValueMap< KeyRefProd, CVal >::value_t
private

Definition at line 22 of file AssociationVector2ValueMap.h.

◆ vm_t

template<typename KeyRefProd , typename CVal >
typedef edm::ValueMap<value_t> AssociationVector2ValueMap< KeyRefProd, CVal >::vm_t
private

Definition at line 23 of file AssociationVector2ValueMap.h.

Constructor & Destructor Documentation

◆ AssociationVector2ValueMap()

template<typename KeyRefProd , typename CVal >
AssociationVector2ValueMap< KeyRefProd, CVal >::AssociationVector2ValueMap ( const edm::ParameterSet cfg)

Definition at line 36 of file AssociationVector2ValueMap.h.

37  : av_(consumes<av_t>(cfg.template getParameter<edm::InputTag>("src"))) {
38  produces<vm_t>();
39 }

Member Function Documentation

◆ produce()

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

Implements edm::EDProducer.

Definition at line 42 of file AssociationVector2ValueMap.h.

42  {
43  using namespace edm;
44  using namespace std;
45  Handle<av_t> av;
46  evt.getByToken(av_, av);
47 
48  unique_ptr<vm_t> vm(new vm_t);
49  typename vm_t::Filler filler(*vm);
50  filler.fill();
51  size_t size = av->size();
52  vector<value_t> values;
53  values.reserve(size);
54  for (typename av_t::const_iterator i = av->begin(); i != av->end(); ++i) {
55  values.push_back(i->second);
56  }
57  filler.insert(av->keyProduct(), values.begin(), values.end());
58  evt.put(std::move(vm));
59 }

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

Member Data Documentation

◆ av_

template<typename KeyRefProd , typename CVal >
edm::EDGetTokenT<av_t> AssociationVector2ValueMap< KeyRefProd, CVal >::av_
private

Definition at line 26 of file AssociationVector2ValueMap.h.

mps_fire.i
i
Definition: mps_fire.py:355
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::Handle
Definition: AssociativeIterator.h:50
AssociationVector2ValueMap::vm_t
edm::ValueMap< value_t > vm_t
Definition: AssociationVector2ValueMap.h:23
contentValuesCheck.values
values
Definition: contentValuesCheck.py:38
edm::Event::getByToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:528
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:132
edm::AssociationVector::const_iterator
transient_vector_type::const_iterator const_iterator
Definition: AssociationVector.h:106
edm::ValueMap::Filler
helper::Filler< ValueMap< T > > Filler
Definition: ValueMap.h:168
AssociationVector2ValueMap::av_
edm::EDGetTokenT< av_t > av_
Definition: AssociationVector2ValueMap.h:26
looper.cfg
cfg
Definition: looper.py:297
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443