CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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::InputTag av_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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 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_(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  
)
overrideprivatevirtual

Implements edm::EDProducer.

Definition at line 41 of file AssociationVector2ValueMap.h.

References edm::helper::Filler< Map >::fill(), edm::Event::getByLabel(), i, edm::helper::Filler< Map >::insert(), edm::Event::put(), findQualityFiles::size, and makeHLTPrescaleTable::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.getByLabel(av_, av);
46 
47  auto_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(vm);
58 }
int i
Definition: DBlmapReader.cc:9
transient_vector_type::const_iterator const_iterator
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:94
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
helper::Filler< ValueMap< T > > Filler
Definition: ValueMap.h:157
tuple size
Write out results.

Member Data Documentation

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

Definition at line 25 of file AssociationVector2ValueMap.h.