From ceeb3126bc6f85fbce8a9ab6230fdf38d23c7808 Mon Sep 17 00:00:00 2001 From: Martin Grunewald Date: Fri, 13 Mar 2015 16:33:59 +0100 Subject: [PATCH] Fixes according to Andrea Bocci and Chris Jones --- .../interface/TriggerSummaryProducerAOD.h | 18 +++++++++--------- .../plugins/TriggerSummaryProducerAOD.cc | 10 +++++----- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/HLTrigger/HLTcore/interface/TriggerSummaryProducerAOD.h b/HLTrigger/HLTcore/interface/TriggerSummaryProducerAOD.h index cd765e850a16f..93c0fb3d1e8bd 100644 --- a/HLTrigger/HLTcore/interface/TriggerSummaryProducerAOD.h +++ b/HLTrigger/HLTcore/interface/TriggerSummaryProducerAOD.h @@ -68,29 +68,29 @@ namespace edm { struct InputTagHash { std::size_t operator()(const edm::InputTag& inputTag) const { std::hash Hash; - return Hash(inputTag.encode()); + // bit-wise xor + return Hash(inputTag.label()) ^ Hash(inputTag.instance()) ^ Hash(inputTag.process()); } }; - -struct GlobalTags { - GlobalTags(): filterTagsGlobal_(),collectionTagsGlobal_(){ } +struct GlobalInputTags { + GlobalInputTags(): filterTagsGlobal_(),collectionTagsGlobal_(){ } mutable tbb::concurrent_unordered_set filterTagsGlobal_; mutable tbb::concurrent_unordered_set collectionTagsGlobal_; }; -class TriggerSummaryProducerAOD : public edm::stream::EDProducer> { +class TriggerSummaryProducerAOD : public edm::stream::EDProducer> { public: - explicit TriggerSummaryProducerAOD(const edm::ParameterSet&, const GlobalTags *); + explicit TriggerSummaryProducerAOD(const edm::ParameterSet&, const GlobalInputTags *); ~TriggerSummaryProducerAOD(); static void fillDescriptions(edm::ConfigurationDescriptions & descriptions); virtual void produce(edm::Event&, const edm::EventSetup&) override; virtual void endStream() override; - static void globalEndJob(const GlobalTags *); + static void globalEndJob(const GlobalInputTags *); // additional - static std::unique_ptr initializeGlobalCache(edm::ParameterSet const&) { - return std::unique_ptr (new GlobalTags()); + static std::unique_ptr initializeGlobalCache(edm::ParameterSet const&) { + return std::unique_ptr (new GlobalInputTags()); }; template diff --git a/HLTrigger/HLTcore/plugins/TriggerSummaryProducerAOD.cc b/HLTrigger/HLTcore/plugins/TriggerSummaryProducerAOD.cc index 44d210ca649e8..fe1fd5140a72d 100644 --- a/HLTrigger/HLTcore/plugins/TriggerSummaryProducerAOD.cc +++ b/HLTrigger/HLTcore/plugins/TriggerSummaryProducerAOD.cc @@ -47,7 +47,7 @@ // // constructors and destructor // -TriggerSummaryProducerAOD::TriggerSummaryProducerAOD(const edm::ParameterSet& ps, const GlobalTags * gt) : +TriggerSummaryProducerAOD::TriggerSummaryProducerAOD(const edm::ParameterSet& ps, const GlobalInputTags * gt) : pn_(ps.getParameter("processName")), filterTagsEvent_(pn_!="*"), filterTagsStream_(pn_!="*"), @@ -544,20 +544,20 @@ void TriggerSummaryProducerAOD::endStream() { return; } -void TriggerSummaryProducerAOD::globalEndJob(const GlobalTags * globalTags) { +void TriggerSummaryProducerAOD::globalEndJob(const GlobalInputTags * globalInputTags) { using namespace std; using namespace edm; using namespace trigger; LogVerbatim("TriggerSummaryProducerAOD") << endl; - LogVerbatim("TriggerSummaryProducerAOD") << "TriggerSummaryProducerAOD::endJob - accumulated tags:" << endl; + LogVerbatim("TriggerSummaryProducerAOD") << "TriggerSummaryProducerAOD::globalEndJob - accumulated tags:" << endl; InputTagSet filterTags(false); InputTagSet collectionTags(false); - filterTags.insert(globalTags->filterTagsGlobal_.begin(),globalTags->filterTagsGlobal_.end()); - collectionTags.insert(globalTags->collectionTagsGlobal_.begin(),globalTags->collectionTagsGlobal_.end()); + filterTags.insert(globalInputTags->filterTagsGlobal_.begin(),globalInputTags->filterTagsGlobal_.end()); + collectionTags.insert(globalInputTags->collectionTagsGlobal_.begin(),globalInputTags->collectionTagsGlobal_.end()); const unsigned int nc(collectionTags.size()); const unsigned int nf(filterTags.size());