1 #ifndef UtilAlgos_Merger_h
2 #define UtilAlgos_Merger_h
28 template<
typename InputCollection,
29 typename OutputCollection = InputCollection,
42 typedef std::vector<edm::EDGetTokenT<InputCollection> >
vtoken;
47 template<
typename InputCollection,
typename OutputCollection,
typename P>
49 srcToken_( edm::
vector_transform(par.
template getParameter<std::vector<edm::InputTag> >(
"src" ), [this](edm::InputTag
const &
tag){
return consumes<InputCollection>(
tag);} ) ) {
50 produces<OutputCollection>();
53 template<
typename InputCollection,
typename OutputCollection,
typename P>
57 template<
typename InputCollection,
typename OutputCollection,
typename P>
59 std::auto_ptr<OutputCollection>
coll(
new OutputCollection );
60 for(
typename vtoken::const_iterator
s = srcToken_.begin();
s != srcToken_.end(); ++
s ) {
63 for(
typename InputCollection::const_iterator
c = h->begin();
c != h->end(); ++
c ) {
bool getByToken(EDGetToken token, Handle< PROD > &result) const
auto vector_transform(std::vector< InputType > const &input, Function predicate) -> std::vector< typename std::remove_cv< typename std::remove_reference< decltype(predicate(input.front()))>::type >::type >
std::vector< edm::EDGetTokenT< InputCollection > > vtoken
vector of strings
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
virtual void produce(edm::Event &, const edm::EventSetup &) override
process an event
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Merger(const edm::ParameterSet &)
constructor from parameter set
vtoken srcToken_
labels of the collections to be merged