1 #ifndef CommonTools_UtilAlgos_ProductFromFwdPtrProducer_h
2 #define CommonTools_UtilAlgos_ProductFromFwdPtrProducer_h
27 template <
class T,
class H = ProductFromFwdPtrFactory<T> >
33 produces< std::vector<T> > ();
43 std::auto_ptr< std::vector<T> > pOutput (
new std::vector<T> );
45 for (
typename std::vector<
edm::FwdPtr<T> >::const_iterator ibegin = hSrc->begin(),
47 i = ibegin;
i!= iend; ++
i ) {
50 pOutput->push_back( t );
54 iEvent.
put( pOutput );
bool getByToken(EDGetToken token, Handle< PROD > &result) const
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
~ProductFromFwdPtrProducer()
ProductFromFwdPtrProducer(edm::ParameterSet const ¶ms)
Produces a list of objects "by value" that correspond to the FwdPtr's from an input collection...
edm::EDGetTokenT< std::vector< edm::FwdPtr< T > > > srcToken_