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
 
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)
 
 ~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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
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::EDConsumerBase
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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)
 

Detailed Description

template<typename KeyRefProd, typename CVal>
class AssociationVector2ValueMap< KeyRefProd, CVal >

Definition at line 16 of file AssociationVector2ValueMap.h.

Member Typedef Documentation

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

Definition at line 20 of file AssociationVector2ValueMap.h.

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

Definition at line 23 of file AssociationVector2ValueMap.h.

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

Definition at line 21 of file AssociationVector2ValueMap.h.

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

Definition at line 22 of file AssociationVector2ValueMap.h.

Constructor & Destructor Documentation

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

Definition at line 35 of file AssociationVector2ValueMap.h.

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

Member Function Documentation

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

Definition at line 41 of file AssociationVector2ValueMap.h.

References AssociationVector2ValueMap< KeyRefProd, CVal >::av_, edm::helper::Filler< Map >::fill(), objects.autophobj::filler, edm::Event::getByToken(), mps_fire::i, edm::helper::Filler< Map >::insert(), eostools::move(), edm::Event::put(), findQualityFiles::size, and MuonErrorMatrixValues_cff::values.

Referenced by JSONExport.JsonExport::export(), HTMLExport.HTMLExport::export(), and HTMLExport.HTMLExportStatic::export().

41  {
42  using namespace edm;
43  using namespace std;
44  Handle<av_t> av;
45  evt.getByToken(av_, av);
46 
47  unique_ptr<vm_t> vm(new vm_t);
48  typename vm_t::Filler filler(*vm);
49  filler.fill();
50  size_t size = av->size();
51  vector<value_t> values;
52  values.reserve(size);
53  for(typename av_t::const_iterator i = av->begin(); i != av->end(); ++i) {
54  values.push_back(i->second);
55  }
56  filler.insert(av->keyProduct(), values.begin(), values.end());
57  evt.put(std::move(vm));
58 }
size
Write out results.
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:125
transient_vector_type::const_iterator const_iterator
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
helper::Filler< ValueMap< T > > Filler
Definition: ValueMap.h:169
HLT enums.
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

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