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
AssociationMapOneToOne2Association< CKey, CVal > Class Template Reference

#include <AssociationMapOneToOne2Association.h>

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

Public Member Functions

 AssociationMapOneToOne2Association (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 &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

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 &)
 

Private Attributes

edm::InputTag am_
 

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
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

Detailed Description

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

Definition at line 17 of file AssociationMapOneToOne2Association.h.

Member Typedef Documentation

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

Definition at line 21 of file AssociationMapOneToOne2Association.h.

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

Definition at line 22 of file AssociationMapOneToOne2Association.h.

Constructor & Destructor Documentation

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

Definition at line 34 of file AssociationMapOneToOne2Association.h.

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

Member Function Documentation

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

Implements edm::EDProducer.

Definition at line 40 of file AssociationMapOneToOne2Association.h.

References edm::helper::Filler< Map >::fill(), edm::Event::getByLabel(), i, errorMatrix2Lands::indices, edm::helper::Filler< Map >::insert(), edm::Event::put(), and findQualityFiles::size.

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

40  {
41  using namespace edm;
42  using namespace std;
43  Handle<am_t> am;
44  evt.getByLabel(am_, am);
45 
46  auto_ptr<as_t> as(new as_t);
47  typename as_t::Filler filler(*as);
48  filler.fill();
49  size_t size = am->size();
50  vector<int> indices;
51  indices.reserve(size);
52  for(typename am_t::const_iterator i = am->begin(); i != am->end(); ++i) {
53  indices.push_back(i->val.key());
54  }
55  filler.insert(am->refProd().key, indices.begin(), indices.end());
56  evt.put(as);
57 }
int i
Definition: DBlmapReader.cc:9
friend struct const_iterator
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:85
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
helper::Filler< ValueMap< int > > Filler
Definition: ValueMap.h:157
tuple size
Write out results.

Member Data Documentation

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

Definition at line 24 of file AssociationMapOneToOne2Association.h.