40 template <
class PATObjectType>
45 const std::vector<edm::EDGetTokenT<TriggerObjectStandAloneMatch>>
matchesTokens_;
66 template <
class PATObjectType>
69 srcToken_(consumes<
edm::
View<PATObjectType>>(src_)),
73 produces<std::vector<PATObjectType>>();
76 template <
class PATObjectType>
80 auto output = std::make_unique<std::vector<PATObjectType>>();
85 edm::LogError(
"missingInputSource") <<
"Input source with InputTag " << src_.encode() <<
" not in event.";
93 std::set<TriggerObjectStandAloneRef> cachedRefs;
94 for (
size_t iMatch = 0; iMatch < matchesTokens_.size(); ++iMatch) {
96 iEvent.getByToken(matchesTokens_.at(iMatch), match);
97 if (!match.isValid()) {
99 <<
"Input match with InputTag " << matches_.at(iMatch).encode() <<
" not in event.";
103 if (trigRef.isNonnull() && trigRef.isAvailable()) {
104 if (cachedRefs.insert(trigRef).second) {
105 cand.addTriggerObjectMatch(*trigRef);
PATTriggerMatchEmbedder(const edm::ParameterSet &iConfig)
PATTriggerMatchEmbedder< Jet > PATTriggerMatchJetEmbedder
PATTriggerMatchEmbedder< Tau > PATTriggerMatchTauEmbedder
void produce(edm::StreamID, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
Log< level::Error, false > LogError
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 >
PATTriggerMatchEmbedder< Electron > PATTriggerMatchElectronEmbedder
PATTriggerMatchEmbedder< Muon > PATTriggerMatchMuonEmbedder
const edm::EDGetTokenT< edm::View< PATObjectType > > srcToken_
PATTriggerMatchEmbedder< Photon > PATTriggerMatchPhotonEmbedder
const std::vector< edm::InputTag > matches_
#define DEFINE_FWK_MODULE(type)
~PATTriggerMatchEmbedder() override
const std::vector< edm::EDGetTokenT< TriggerObjectStandAloneMatch > > matchesTokens_
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
PATTriggerMatchEmbedder< MET > PATTriggerMatchMETEmbedder