3 #include <FWCore/ParameterSet/interface/ParameterSet.h>
4 #include <FWCore/Framework/interface/Event.h>
5 #include <FWCore/Framework/interface/EventSetup.h>
6 #include <FWCore/Framework/interface/ConsumesCollector.h>
7 #include <FWCore/Utilities/interface/InputTag.h>
8 #include <DataFormats/Common/interface/ValueMap.h>
9 #include <DataFormats/Common/interface/Ref.h>
11 #include <cp3_llbb/TreeWrapper/interface/TreeWrapper.h>
18 ids(tree[
"ids"].write<std::vector<std::map<std::string, bool>>>()) {
22 template <
class T>
void produce_id(
const edm::Ref<T>& ref) {
23 std::map<std::string, bool> ids_;
24 for (
auto& handle: m_id_maps) {
25 ids_.emplace(handle.first, (*(handle.second))[ref]);
30 virtual void consumes_id_tokens(
const edm::ParameterSet&, edm::ConsumesCollector&& collector)
final;
31 virtual void retrieves_id_tokens(
const edm::Event& event,
const edm::EventSetup& eventSetup)
final;
32 virtual void clean()
final {
35 std::vector<std::map<std::string, bool>>& ids;
38 std::vector<std::pair<std::string, edm::EDGetTokenT<edm::ValueMap<bool>>>> m_id_tokens;
39 std::vector<std::pair<std::string, edm::Handle<edm::ValueMap<bool>>>> m_id_maps;
Definition: Identifiable.h:14