24 std::vector<edm::EDGetTokenT<edm::View<reco::Candidate>>>
collections_;
30 writeEmptyCollection_(iConfig.getParameter<
bool>(
"writeEmptyCollection")) {
31 std::vector<edm::InputTag> filtersDecTags = iConfig.
getParameter<std::vector<edm::InputTag>>(
"triggeringCollections");
32 for (std::vector<edm::InputTag>::const_iterator
inputTag = filtersDecTags.begin();
inputTag != filtersDecTags.end();
37 produces<std::vector<T>>();
43 std::unique_ptr<std::vector<T>> outJets(
new std::vector<T>());
45 bool filterDecision =
false;
48 filter != collections_.end();
51 if (!tmpCol->empty()) {
52 filterDecision =
true;
57 if (!filterDecision) {
58 if (writeEmptyCollection_)
64 iEvent.getByToken(jetColToken_, jetColHandle);
67 for (
size_t ij = 0; ij < jetColHandle->size(); ij++) {
68 outJets->push_back((*jetColHandle)[ij]);
void produce(edm::StreamID id, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
T getParameter(std::string const &) const
#define DEFINE_FWK_MODULE(type)
JetCollectionReducerT(const edm::ParameterSet &iConfig)
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
JetCollectionReducerT< reco::PFJet > PFJetCollectionReducer
bool writeEmptyCollection_
std::vector< edm::EDGetTokenT< edm::View< reco::Candidate > > > collections_
edm::EDGetTokenT< std::vector< T > > jetColToken_
JetCollectionReducerT< pat::Jet > PATJetCollectionReducer
~JetCollectionReducerT() override