#include <CopyProducer.h>
Public Member Functions | |
CopyProducer (const edm::ParameterSet &pset) | |
constructor from parameter set | |
virtual void | produce (edm::Event &evt, const edm::EventSetup &es) |
process an event | |
~CopyProducer () | |
destructor | |
Private Attributes | |
edm::InputTag | src_ |
labels of the collection to be converted |
Definition at line 25 of file CopyProducer.h.
reco::tautools::CopyProducer< Collection >::CopyProducer | ( | const edm::ParameterSet & | pset | ) | [inline, explicit] |
constructor from parameter set
Definition at line 28 of file CopyProducer.h.
:src_(pset.template getParameter<edm::InputTag>("src")) { produces<Collection>(); }
reco::tautools::CopyProducer< Collection >::~CopyProducer | ( | ) | [inline] |
virtual void reco::tautools::CopyProducer< Collection >::produce | ( | edm::Event & | evt, |
const edm::EventSetup & | es | ||
) | [inline, virtual] |
process an event
Implements edm::EDProducer.
Definition at line 35 of file CopyProducer.h.
References coll, filterCSVwithJSON::copy, edm::Event::getByLabel(), collect_tpl::input, edm::Event::put(), and reco::tautools::CopyProducer< Collection >::src_.
{ // Output collection std::auto_ptr<Collection> coll(new Collection()); typedef edm::View<typename Collection::value_type> CView; // Get input edm::Handle<CView> input; evt.getByLabel(src_, input); // Reserve space coll->reserve(input->size()); // Copy the input to the output std::copy(input->begin(), input->end(), std::back_inserter(*coll)); evt.put( coll ); }
edm::InputTag reco::tautools::CopyProducer< Collection >::src_ [private] |
labels of the collection to be converted
Definition at line 50 of file CopyProducer.h.
Referenced by reco::tautools::CopyProducer< Collection >::produce().