26 std::vector<edm::EDGetTokenT<edm::View<reco::Candidate> > >
collections_;
33 jetColToken_(consumes<std::vector<
T> >( iConfig.getParameter<edm::
InputTag>(
"jetCollection") )),
34 writeEmptyCollection_(iConfig.getParameter<bool>(
"writeEmptyCollection"))
37 std::vector<edm::InputTag> filtersDecTags = iConfig.
getParameter<std::vector<edm::InputTag> >(
"triggeringCollections");
38 for(std::vector<edm::InputTag>::const_iterator
inputTag=filtersDecTags.begin();
43 produces<std::vector<T> >();
53 std::unique_ptr<std::vector<T> > outJets(
new std::vector<T>());
55 bool filterDecision=
false;
60 if(tmpCol->size()!=0) {
67 if (writeEmptyCollection_) iEvent.
put(
std::move(outJets));
72 iEvent.
getByToken( jetColToken_, jetColHandle );
75 for(
size_t ij=0;ij<jetColHandle->size();ij++) {
76 outJets->push_back( (*jetColHandle)[ij] );
T getParameter(std::string const &) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
JetCollectionReducerT(const edm::ParameterSet &iConfig)
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
JetCollectionReducerT< reco::PFJet > PFJetCollectionReducer
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
bool writeEmptyCollection_
std::vector< edm::EDGetTokenT< edm::View< reco::Candidate > > > collections_
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
virtual ~JetCollectionReducerT()
edm::EDGetTokenT< std::vector< T > > jetColToken_
JetCollectionReducerT< pat::Jet > PATJetCollectionReducer