#include <Merger.h>
Public Member Functions | |
Merger (const edm::ParameterSet &) | |
constructor from parameter set | |
~Merger () | |
destructor | |
Private Types | |
typedef std::vector < edm::InputTag > | vtag |
vector of strings | |
Private Member Functions | |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
process an event | |
Private Attributes | |
vtag | src_ |
labels of the collections to be merged |
Merges an arbitrary number of collections into a single collection.
Template parameters:
typedef std::vector<edm::InputTag> Merger< InputCollection, OutputCollection, P >::vtag [private] |
Merger< InputCollection, OutputCollection, P >::Merger | ( | const edm::ParameterSet & | par | ) | [explicit] |
void Merger< InputCollection, OutputCollection, P >::produce | ( | edm::Event & | evt, |
const edm::EventSetup & | |||
) | [private, virtual] |
process an event
Implements edm::EDProducer.
Definition at line 57 of file Merger.h.
References trackerHits::c, clone(), coll, edm::Event::getByLabel(), h, edm::Event::put(), and asciidump::s.
{ std::auto_ptr<OutputCollection> coll( new OutputCollection ); for( vtag::const_iterator s = src_.begin(); s != src_.end(); ++ s ) { edm::Handle<InputCollection> h; evt.getByLabel( * s, h ); for( typename InputCollection::const_iterator c = h->begin(); c != h->end(); ++c ) { coll->push_back( P::clone( * c ) ); } } evt.put( coll ); }