1 #ifndef CollectionCombiner_H
2 #define CollectionCombiner_H
28 template <
typename Collection>
43 template <
typename Collection>
46 produces<Collection>();
47 for (
unsigned int i=0;
i<
labels.size();++
i)
48 collectionTokens.push_back(consumes<Collection>(
labels.at(
i)));
50 template <
typename Collection>
53 template <
typename Collection>
56 unsigned int i=0,i_max=
labels.size();
58 std::auto_ptr<Collection> merged(
new Collection());
60 iEvent.
getByToken(collectionTokens[i], handle);
61 merged->insert(merged->end(), handle->begin(), handle->end());
T getParameter(std::string const &) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< edm::EDGetTokenT< Collection > > collectionTokens
virtual void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
CollectionCombiner(const edm::ParameterSet &)
std::vector< edm::InputTag > labels