From 2bbc26bba40075e011a6db34563022fa5da9a059 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Thu, 10 Jun 2021 09:00:33 -0500 Subject: [PATCH 01/14] Added TestServicesOnNonFrameworkThreadsAnalyzer --- FWCore/Integration/test/BuildFile.xml | 6 + ...stServicesOnNonFrameworkThreadsAnalyzer.cc | 116 ++++++++++++++++++ 2 files changed, 122 insertions(+) create mode 100644 FWCore/Integration/test/TestServicesOnNonFrameworkThreadsAnalyzer.cc diff --git a/FWCore/Integration/test/BuildFile.xml b/FWCore/Integration/test/BuildFile.xml index d0b88cd5df008..d90329120256f 100644 --- a/FWCore/Integration/test/BuildFile.xml +++ b/FWCore/Integration/test/BuildFile.xml @@ -427,6 +427,12 @@ + + + + + + diff --git a/FWCore/Integration/test/TestServicesOnNonFrameworkThreadsAnalyzer.cc b/FWCore/Integration/test/TestServicesOnNonFrameworkThreadsAnalyzer.cc new file mode 100644 index 0000000000000..17097946e502d --- /dev/null +++ b/FWCore/Integration/test/TestServicesOnNonFrameworkThreadsAnalyzer.cc @@ -0,0 +1,116 @@ +#include "FWCore/Framework/interface/stream/EDAnalyzer.h" +#include "FWCore/Framework/interface/MakerMacros.h" +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/ModuleContextSentry.h" +#include "FWCore/ServiceRegistry/interface/ServiceRegistry.h" +#include "FWCore/ServiceRegistry/interface/Service.h" + +#include "FWCore/Utilities/interface/RandomNumberGenerator.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include +#include +#include +#include +#include +#include + +#include "CLHEP/Random/RandFlat.h" + +namespace edmtest { + class TestServicesOnNonFrameworkThreadsAnalyzer : public edm::stream::EDAnalyzer<> { + public: + TestServicesOnNonFrameworkThreadsAnalyzer(edm::ParameterSet const&); + ~TestServicesOnNonFrameworkThreadsAnalyzer() final; + + void analyze(edm::Event const&, edm::EventSetup const&) final; + + private: + void runOnOtherThread(); + void shutdownThread(); + std::unique_ptr m_thread; + std::mutex m_mutex; + std::condition_variable m_condVar; + + bool m_managerThreadReady = false; + bool m_continueProcessing = false; + bool m_eventWorkDone = false; + + //context info + edm::ModuleCallingContext const* m_moduleCallingContext = nullptr; + edm::ServiceToken* m_serviceToken = nullptr; + edm::StreamID m_streamID; + std::exception_ptr m_except; + }; + + TestServicesOnNonFrameworkThreadsAnalyzer::TestServicesOnNonFrameworkThreadsAnalyzer(edm::ParameterSet const&) + : m_streamID(edm::StreamID::invalidStreamID()) { + m_thread = std::make_unique([this]() { this->runOnOtherThread(); }); + + m_mutex.lock(); + m_managerThreadReady = true; + m_continueProcessing = true; + } + + TestServicesOnNonFrameworkThreadsAnalyzer::~TestServicesOnNonFrameworkThreadsAnalyzer() { + if (m_thread) { + shutdownThread(); + } + } + + void TestServicesOnNonFrameworkThreadsAnalyzer::analyze(edm::Event const& iEvent, edm::EventSetup const&) { + m_eventWorkDone = false; + m_moduleCallingContext = iEvent.moduleCallingContext(); + edm::ServiceToken token = edm::ServiceRegistry::instance().presentToken(); + m_serviceToken = &token; + m_streamID = iEvent.streamID(); + { edm::LogSystem("FrameworkThread") << "new Event"; } + m_mutex.unlock(); + { + std::unique_lock lk(m_mutex); + m_condVar.notify_one(); + m_condVar.wait(lk, [this] { return this->m_eventWorkDone; }); + lk.release(); + } + edm::LogSystem("FrameworkThread") << " done"; + m_managerThreadReady = true; + if (m_except) { + std::rethrow_exception(m_except); + } + } + + void TestServicesOnNonFrameworkThreadsAnalyzer::runOnOtherThread() { + std::unique_lock lk(m_mutex); + + do { + m_condVar.wait(lk, [this] { return m_managerThreadReady; }); + if (m_continueProcessing) { + edm::ModuleCallingContext newContext(*m_moduleCallingContext); + edm::ModuleContextSentry sentry(&newContext, m_moduleCallingContext->parent()); + + edm::ServiceRegistry::Operate srSentry(*m_serviceToken); + try { + edm::Service rng; + edm::LogSystem("ModuleThread") << " ++running with rng " + << CLHEP::RandFlat::shootInt(&rng->getEngine(m_streamID), 10); + } catch (...) { + m_except = std::current_exception(); + } + } + m_eventWorkDone = true; + m_managerThreadReady = false; + lk.unlock(); + m_condVar.notify_one(); + lk.lock(); + } while (m_continueProcessing); + } + + void TestServicesOnNonFrameworkThreadsAnalyzer::shutdownThread() { + m_continueProcessing = false; + m_mutex.unlock(); + m_condVar.notify_one(); + m_thread->join(); + } + +} // namespace edmtest + +DEFINE_FWK_MODULE(edmtest::TestServicesOnNonFrameworkThreadsAnalyzer); From d8ff91cfee955e528337e36b3035f8207328f7da Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Thu, 10 Jun 2021 09:22:05 -0500 Subject: [PATCH 02/14] Removed unused methods from edm::service::MessageLogger Also moved a method only used internally to private section. --- FWCore/MessageService/interface/MessageLogger.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/FWCore/MessageService/interface/MessageLogger.h b/FWCore/MessageService/interface/MessageLogger.h index d90822251a937..f5d4c79e66d59 100644 --- a/FWCore/MessageService/interface/MessageLogger.h +++ b/FWCore/MessageService/interface/MessageLogger.h @@ -48,14 +48,9 @@ namespace edm { public: MessageLogger(ParameterSet const&, ActivityRegistry&); - void fillErrorObj(edm::ErrorObj& obj) const; - bool debugEnabled() const { return debugEnabled_; } - - static bool anyDebugEnabled() { return anyDebugEnabled_; } - + private: static void SummarizeInJobReport(); - private: void postBeginJob(); void preEndJob(); void postEndJob(); From 56d7540c01136a3b736c6d2125aff04afdbd678d Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Thu, 10 Jun 2021 09:27:17 -0500 Subject: [PATCH 03/14] Fix naming convention for SummarizeInJobReport method --- FWCore/MessageService/interface/MessageLogger.h | 2 +- FWCore/MessageService/src/MessageLogger.cc | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/FWCore/MessageService/interface/MessageLogger.h b/FWCore/MessageService/interface/MessageLogger.h index f5d4c79e66d59..a5c6a836f15db 100644 --- a/FWCore/MessageService/interface/MessageLogger.h +++ b/FWCore/MessageService/interface/MessageLogger.h @@ -49,7 +49,7 @@ namespace edm { MessageLogger(ParameterSet const&, ActivityRegistry&); private: - static void SummarizeInJobReport(); + static void summarizeInJobReport(); void postBeginJob(); void preEndJob(); diff --git a/FWCore/MessageService/src/MessageLogger.cc b/FWCore/MessageService/src/MessageLogger.cc index 72148b8e3438f..9d48d39ae6ab3 100644 --- a/FWCore/MessageService/src/MessageLogger.cc +++ b/FWCore/MessageService/src/MessageLogger.cc @@ -867,14 +867,14 @@ namespace edm { } void MessageLogger::postEndJob() { - SummarizeInJobReport(); // Put summary info into Job Rep // change log 10 + summarizeInJobReport(); // Put summary info into Job Rep // change log 10 MessageLoggerQ::MLqSUM(); // trigger summary info. // change log 9 } void MessageLogger::jobFailure() { MessageDrop* messageDrop = MessageDrop::instance(); messageDrop->setSinglet("jobFailure"); - SummarizeInJobReport(); // Put summary info into Job Rep // change log 10 + summarizeInJobReport(); // Put summary info into Job Rep // change log 10 MessageLoggerQ::MLqSUM(); // trigger summary info. // change log 9 } @@ -882,7 +882,7 @@ namespace edm { // Other methods // - void MessageLogger::SummarizeInJobReport() { + void MessageLogger::summarizeInJobReport() { if (fjrSummaryRequested_) { std::map* smp = new std::map(); MessageLoggerQ::MLqJRS(smp); From 7c2082a7f54715ad386cb41af166e59dda3762c5 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Thu, 10 Jun 2021 10:02:25 -0500 Subject: [PATCH 04/14] Moved edm::service::MessageLogger to plugins Also moved pset validation class as it is only used by MessageLogger. --- FWCore/MessageService/BuildFile.xml | 2 -- FWCore/MessageService/plugins/BuildFile.xml | 2 ++ FWCore/MessageService/{src => plugins}/MessageLogger.cc | 4 ++-- FWCore/MessageService/{interface => plugins}/MessageLogger.h | 0 .../{src => plugins}/MessageServicePSetValidation.cc | 2 +- .../{src => plugins}/MessageServicePSetValidation.h | 0 6 files changed, 5 insertions(+), 5 deletions(-) rename FWCore/MessageService/{src => plugins}/MessageLogger.cc (99%) rename FWCore/MessageService/{interface => plugins}/MessageLogger.h (100%) rename FWCore/MessageService/{src => plugins}/MessageServicePSetValidation.cc (99%) rename FWCore/MessageService/{src => plugins}/MessageServicePSetValidation.h (100%) diff --git a/FWCore/MessageService/BuildFile.xml b/FWCore/MessageService/BuildFile.xml index 775661fe8762f..d8c57c11ec52d 100644 --- a/FWCore/MessageService/BuildFile.xml +++ b/FWCore/MessageService/BuildFile.xml @@ -1,7 +1,5 @@ - - diff --git a/FWCore/MessageService/plugins/BuildFile.xml b/FWCore/MessageService/plugins/BuildFile.xml index 098d7cf5372f8..9d460cd3bbb41 100644 --- a/FWCore/MessageService/plugins/BuildFile.xml +++ b/FWCore/MessageService/plugins/BuildFile.xml @@ -1,4 +1,6 @@ + + diff --git a/FWCore/MessageService/src/MessageLogger.cc b/FWCore/MessageService/plugins/MessageLogger.cc similarity index 99% rename from FWCore/MessageService/src/MessageLogger.cc rename to FWCore/MessageService/plugins/MessageLogger.cc index 9d48d39ae6ab3..fba744bb0a01f 100644 --- a/FWCore/MessageService/src/MessageLogger.cc +++ b/FWCore/MessageService/plugins/MessageLogger.cc @@ -15,8 +15,8 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/MessageService/interface/MessageLogger.h" -#include "FWCore/MessageService/src/MessageServicePSetValidation.h" +#include "FWCore/MessageService/plugins/MessageLogger.h" +#include "FWCore/MessageService/plugins/MessageServicePSetValidation.h" #include "FWCore/MessageLogger/interface/MessageLoggerQ.h" #include "FWCore/MessageLogger/interface/MessageDrop.h" diff --git a/FWCore/MessageService/interface/MessageLogger.h b/FWCore/MessageService/plugins/MessageLogger.h similarity index 100% rename from FWCore/MessageService/interface/MessageLogger.h rename to FWCore/MessageService/plugins/MessageLogger.h diff --git a/FWCore/MessageService/src/MessageServicePSetValidation.cc b/FWCore/MessageService/plugins/MessageServicePSetValidation.cc similarity index 99% rename from FWCore/MessageService/src/MessageServicePSetValidation.cc rename to FWCore/MessageService/plugins/MessageServicePSetValidation.cc index 823aa76330833..d11dd7d2b271f 100644 --- a/FWCore/MessageService/src/MessageServicePSetValidation.cc +++ b/FWCore/MessageService/plugins/MessageServicePSetValidation.cc @@ -17,7 +17,7 @@ // user include files -#include "FWCore/MessageService/src/MessageServicePSetValidation.h" +#include "FWCore/MessageService/plugins/MessageServicePSetValidation.h" using namespace edm; using namespace edm::service; diff --git a/FWCore/MessageService/src/MessageServicePSetValidation.h b/FWCore/MessageService/plugins/MessageServicePSetValidation.h similarity index 100% rename from FWCore/MessageService/src/MessageServicePSetValidation.h rename to FWCore/MessageService/plugins/MessageServicePSetValidation.h From 7740e96e55780e2228cbbc5e720c7d9fe48ef786 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Thu, 10 Jun 2021 10:05:40 -0500 Subject: [PATCH 05/14] Updated include guards --- FWCore/MessageService/plugins/MessageLogger.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/FWCore/MessageService/plugins/MessageLogger.h b/FWCore/MessageService/plugins/MessageLogger.h index a5c6a836f15db..0dc51bcd8a845 100644 --- a/FWCore/MessageService/plugins/MessageLogger.h +++ b/FWCore/MessageService/plugins/MessageLogger.h @@ -1,12 +1,12 @@ -#ifndef FWCore_MessageService_MessageLogger_h -#define FWCore_MessageService_MessageLogger_h +#ifndef FWCore_MessageService_service_MessageLogger_h +#define FWCore_MessageService_service_MessageLogger_h // -*- C++ -*- // -// Package: Services +// Package: MessageService // Class : MessageLogger // -/**\class MessageLogger MessageLogger.h FWCore/MessageService/interface/MessageLogger.h +/**\class edm::service::MessageLogger MessageLogger.h FWCore/MessageService/plugins/MessageLogger.h Description: @@ -188,4 +188,4 @@ namespace edm { } // namespace edm -#endif // FWCore_MessageService_MessageLogger_h +#endif // FWCore_MessageService_service_MessageLogger_h From 9e3c0d8bdf63d3791345fa7a99226e85470a1727 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Thu, 10 Jun 2021 13:05:45 -0500 Subject: [PATCH 06/14] Added a user callable edm::MessageLogger Service interface This allows properly setting up the MessageLogger for a non-framework controlled thread. --- FWCore/Integration/test/BuildFile.xml | 1 + ...stServicesOnNonFrameworkThreadsAnalyzer.cc | 3 ++ .../interface/edm_MessageLogger.h | 41 +++++++++++++++++++ FWCore/MessageLogger/src/edm_MessageLogger.cc | 10 +++++ .../MessageService/plugins/MessageLogger.cc | 23 +++++++++++ FWCore/MessageService/plugins/MessageLogger.h | 6 ++- FWCore/MessageService/plugins/Module.cc | 7 +++- 7 files changed, 87 insertions(+), 4 deletions(-) create mode 100644 FWCore/MessageLogger/interface/edm_MessageLogger.h create mode 100644 FWCore/MessageLogger/src/edm_MessageLogger.cc diff --git a/FWCore/Integration/test/BuildFile.xml b/FWCore/Integration/test/BuildFile.xml index d90329120256f..eeae5101ce41b 100644 --- a/FWCore/Integration/test/BuildFile.xml +++ b/FWCore/Integration/test/BuildFile.xml @@ -431,6 +431,7 @@ + diff --git a/FWCore/Integration/test/TestServicesOnNonFrameworkThreadsAnalyzer.cc b/FWCore/Integration/test/TestServicesOnNonFrameworkThreadsAnalyzer.cc index 17097946e502d..16569fb429b9c 100644 --- a/FWCore/Integration/test/TestServicesOnNonFrameworkThreadsAnalyzer.cc +++ b/FWCore/Integration/test/TestServicesOnNonFrameworkThreadsAnalyzer.cc @@ -7,6 +7,7 @@ #include "FWCore/Utilities/interface/RandomNumberGenerator.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "FWCore/MessageLogger/interface/edm_MessageLogger.h" #include #include #include @@ -90,6 +91,8 @@ namespace edmtest { edm::ServiceRegistry::Operate srSentry(*m_serviceToken); try { edm::Service rng; + edm::Service ml; + ml->setThreadContext(*m_moduleCallingContext); edm::LogSystem("ModuleThread") << " ++running with rng " << CLHEP::RandFlat::shootInt(&rng->getEngine(m_streamID), 10); } catch (...) { diff --git a/FWCore/MessageLogger/interface/edm_MessageLogger.h b/FWCore/MessageLogger/interface/edm_MessageLogger.h new file mode 100644 index 0000000000000..225dafd2cb4d4 --- /dev/null +++ b/FWCore/MessageLogger/interface/edm_MessageLogger.h @@ -0,0 +1,41 @@ +#ifndef FWCore_MessageService_MessageLogger_h +#define FWCore_MessageService_MessageLogger_h + +// -*- C++ -*- +// +// Package: MessageService +// Class : MessageLogger +// +/**\class edm::MessageLogger MessageLogger.h FWCore/MessageService/plugins/MessageLogger.h + + Description: Abstract interface for MessageLogger Service + + Usage: + + +*/ +// + +// system include files + +// user include files + +// forward declarations + +namespace edm { + class ModuleCallingContext; + + class MessageLogger { + public: + virtual ~MessageLogger(); + + virtual void setThreadContext(ModuleCallingContext const&) = 0; + + protected: + MessageLogger() = default; + + }; // MessageLogger + +} // namespace edm + +#endif // FWCore_MessageService_MessageLogger_h diff --git a/FWCore/MessageLogger/src/edm_MessageLogger.cc b/FWCore/MessageLogger/src/edm_MessageLogger.cc new file mode 100644 index 0000000000000..544216a0a477b --- /dev/null +++ b/FWCore/MessageLogger/src/edm_MessageLogger.cc @@ -0,0 +1,10 @@ +// +// MessageLogger.cc +// CMSSW +// +// Created by Chris Jones on 6/10/21. +// + +#include "FWCore/MessageLogger/interface/edm_MessageLogger.h" + +edm::MessageLogger::~MessageLogger() = default; diff --git a/FWCore/MessageService/plugins/MessageLogger.cc b/FWCore/MessageService/plugins/MessageLogger.cc index fba744bb0a01f..b64eeb094c2bb 100644 --- a/FWCore/MessageService/plugins/MessageLogger.cc +++ b/FWCore/MessageService/plugins/MessageLogger.cc @@ -325,6 +325,29 @@ namespace edm { nonModule_errorEnabled = messageDrop->errorEnabled; } // ctor + void MessageLogger::setThreadContext(ModuleCallingContext const& iModContext) { + //need to know if we are in a global or stream context + auto top = iModContext.getTopModuleCallingContext(); + assert(nullptr != top); + if (ParentContext::Type::kGlobal == top->type()) { + auto globalContext = iModContext.getGlobalContext(); + auto tran = globalContext->transition(); + if (tran == GlobalContext::Transition::kBeginLuminosityBlock or + tran == GlobalContext::Transition::kEndLuminosityBlock) { + establishModule(lumiInfoBegin_ + globalContext->luminosityBlockIndex(), + iModContext, + s_globalTransitionNames[static_cast(tran)]); + } else { + establishModule( + runInfoBegin_ + globalContext->runIndex(), iModContext, s_globalTransitionNames[static_cast(tran)]); + } + } else { + auto stream = iModContext.getStreamContext(); + establishModule( + stream->streamID().value(), iModContext, s_streamTransitionNames[static_cast(stream->transition())]); + } + } + // // Shared helper routines for establishing module name and enabling behavior // diff --git a/FWCore/MessageService/plugins/MessageLogger.h b/FWCore/MessageService/plugins/MessageLogger.h index 0dc51bcd8a845..012275f9c5468 100644 --- a/FWCore/MessageService/plugins/MessageLogger.h +++ b/FWCore/MessageService/plugins/MessageLogger.h @@ -33,7 +33,7 @@ #include "DataFormats/Provenance/interface/EventID.h" #include "FWCore/MessageLogger/interface/ELseverityLevel.h" -#include "FWCore/MessageLogger/interface/ErrorObj.h" +#include "FWCore/MessageLogger/interface/edm_MessageLogger.h" #include "FWCore/ServiceRegistry/interface/ActivityRegistry.h" #include "FWCore/Utilities/interface/thread_safety_macros.h" @@ -44,10 +44,12 @@ namespace edm { class ParameterSet; namespace service { - class MessageLogger { + class MessageLogger : public edm::MessageLogger { public: MessageLogger(ParameterSet const&, ActivityRegistry&); + void setThreadContext(ModuleCallingContext const&) final; + private: static void summarizeInJobReport(); diff --git a/FWCore/MessageService/plugins/Module.cc b/FWCore/MessageService/plugins/Module.cc index b87b8de1184ec..9612d882097d8 100644 --- a/FWCore/MessageService/plugins/Module.cc +++ b/FWCore/MessageService/plugins/Module.cc @@ -1,11 +1,14 @@ #include "FWCore/PluginManager/interface/PresenceMacros.h" -#include "FWCore/MessageService/interface/MessageLogger.h" +#include "FWCore/MessageService/plugins/MessageLogger.h" #include "FWCore/MessageService/interface/SingleThreadMSPresence.h" #include "FWCore/ServiceRegistry/interface/ServiceMaker.h" #pragma GCC visibility push(hidden) using edm::service::MessageLogger; using edm::service::SingleThreadMSPresence; -DEFINE_FWK_SERVICE(MessageLogger); + +using MessageLoggerMaker = edm::serviceregistry::AllArgsMaker; +DEFINE_FWK_SERVICE_MAKER(MessageLogger, MessageLoggerMaker); + DEFINE_FWK_PRESENCE(SingleThreadMSPresence); #pragma GCC visibility pop From 291ce4e244d6d78e7d30f27aa4ee2052407ed19f Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Thu, 10 Jun 2021 13:25:10 -0500 Subject: [PATCH 07/14] Added unit test using TestServicesOnNonFrameworkThreadsAnalyzer --- FWCore/Integration/test/BuildFile.xml | 3 ++- FWCore/Integration/test/moduleThread_test_cfg.py | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 FWCore/Integration/test/moduleThread_test_cfg.py diff --git a/FWCore/Integration/test/BuildFile.xml b/FWCore/Integration/test/BuildFile.xml index eeae5101ce41b..b3e42d7ee356d 100644 --- a/FWCore/Integration/test/BuildFile.xml +++ b/FWCore/Integration/test/BuildFile.xml @@ -434,7 +434,8 @@ - + + diff --git a/FWCore/Integration/test/moduleThread_test_cfg.py b/FWCore/Integration/test/moduleThread_test_cfg.py new file mode 100644 index 0000000000000..7404c8d2f9dfe --- /dev/null +++ b/FWCore/Integration/test/moduleThread_test_cfg.py @@ -0,0 +1,15 @@ +import FWCore.ParameterSet.Config as cms + +process = cms.Process("Test") + +process.source = cms.Source("EmptySource") + +process.maxEvents.input = 10 + +process.test = cms.EDAnalyzer("edmtest::TestServicesOnNonFrameworkThreadsAnalyzer") + +process.p = cms.EndPath(process.test) + +process.add_(cms.Service("RandomNumberGeneratorService", + test = cms.PSet(initialSeed = cms.untracked.uint32(12345)) +)) From 0a17d4b2d3430a9b0938e2bf2819d72e79359612 Mon Sep 17 00:00:00 2001 From: Christopher Jones Date: Thu, 10 Jun 2021 14:43:46 -0500 Subject: [PATCH 08/14] Removed unneeded include from FWCore/MessageService --- HLTrigger/special/plugins/HLTCountNumberOfObject.h | 2 -- HLTrigger/special/plugins/HLTTrackWithHits.h | 2 -- L1Trigger/TrackFindingTMTT/plugins/TMTrackProducer.cc | 1 - .../MuonAssociators/plugins/TriggerMatcherToHLTDebug.cc | 1 - 4 files changed, 6 deletions(-) diff --git a/HLTrigger/special/plugins/HLTCountNumberOfObject.h b/HLTrigger/special/plugins/HLTCountNumberOfObject.h index e56ea0b75e94f..535ef62f96968 100644 --- a/HLTrigger/special/plugins/HLTCountNumberOfObject.h +++ b/HLTrigger/special/plugins/HLTCountNumberOfObject.h @@ -17,8 +17,6 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/MessageService/interface/MessageLogger.h" - #include "HLTrigger/HLTcore/interface/HLTFilter.h" #include "DataFormats/HLTReco/interface/TriggerFilterObjectWithRefs.h" #include "HLTrigger/HLTcore/interface/defaultModuleLabel.h" diff --git a/HLTrigger/special/plugins/HLTTrackWithHits.h b/HLTrigger/special/plugins/HLTTrackWithHits.h index 8344d0a70f317..4d1edb120d65b 100644 --- a/HLTrigger/special/plugins/HLTTrackWithHits.h +++ b/HLTrigger/special/plugins/HLTTrackWithHits.h @@ -17,8 +17,6 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/MessageService/interface/MessageLogger.h" - #include "HLTrigger/HLTcore/interface/HLTFilter.h" #include "DataFormats/HLTReco/interface/TriggerFilterObjectWithRefs.h" #include "DataFormats/TrackReco/interface/Track.h" diff --git a/L1Trigger/TrackFindingTMTT/plugins/TMTrackProducer.cc b/L1Trigger/TrackFindingTMTT/plugins/TMTrackProducer.cc index 95515b3594aef..e47691281030c 100644 --- a/L1Trigger/TrackFindingTMTT/plugins/TMTrackProducer.cc +++ b/L1Trigger/TrackFindingTMTT/plugins/TMTrackProducer.cc @@ -13,7 +13,6 @@ #include "L1Trigger/TrackFindingTMTT/interface/Array2D.h" #include "L1Trigger/TrackFindingTMTT/interface/PrintL1trk.h" -#include "FWCore/MessageService/interface/MessageLogger.h" #include "FWCore/Framework/interface/ESHandle.h" #include diff --git a/MuonAnalysis/MuonAssociators/plugins/TriggerMatcherToHLTDebug.cc b/MuonAnalysis/MuonAssociators/plugins/TriggerMatcherToHLTDebug.cc index cd9c584cd38b9..a4da0f6908154 100644 --- a/MuonAnalysis/MuonAssociators/plugins/TriggerMatcherToHLTDebug.cc +++ b/MuonAnalysis/MuonAssociators/plugins/TriggerMatcherToHLTDebug.cc @@ -54,7 +54,6 @@ #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/MakerMacros.h" #include "FWCore/Common/interface/TriggerNames.h" -#include "FWCore/MessageService/interface/MessageLogger.h" #include "FWCore/Utilities/interface/InputTag.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" From 0a965ce784b29c774a0b5a3f3124521a5c85f473 Mon Sep 17 00:00:00 2001 From: Christopher Jones Date: Thu, 10 Jun 2021 16:15:35 -0500 Subject: [PATCH 09/14] clang does not like final on destructors --- .../test/TestServicesOnNonFrameworkThreadsAnalyzer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FWCore/Integration/test/TestServicesOnNonFrameworkThreadsAnalyzer.cc b/FWCore/Integration/test/TestServicesOnNonFrameworkThreadsAnalyzer.cc index 16569fb429b9c..1084cea88ffcf 100644 --- a/FWCore/Integration/test/TestServicesOnNonFrameworkThreadsAnalyzer.cc +++ b/FWCore/Integration/test/TestServicesOnNonFrameworkThreadsAnalyzer.cc @@ -21,7 +21,7 @@ namespace edmtest { class TestServicesOnNonFrameworkThreadsAnalyzer : public edm::stream::EDAnalyzer<> { public: TestServicesOnNonFrameworkThreadsAnalyzer(edm::ParameterSet const&); - ~TestServicesOnNonFrameworkThreadsAnalyzer() final; + ~TestServicesOnNonFrameworkThreadsAnalyzer() override; void analyze(edm::Event const&, edm::EventSetup const&) final; From eb972f54acaf6acb84f00c532e565d50edda2cd1 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Fri, 11 Jun 2021 06:49:49 -0500 Subject: [PATCH 10/14] Better include guard naming Co-authored-by: Andrea Bocci --- FWCore/MessageService/plugins/MessageLogger.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FWCore/MessageService/plugins/MessageLogger.h b/FWCore/MessageService/plugins/MessageLogger.h index 012275f9c5468..c5e3841a594dd 100644 --- a/FWCore/MessageService/plugins/MessageLogger.h +++ b/FWCore/MessageService/plugins/MessageLogger.h @@ -1,5 +1,5 @@ -#ifndef FWCore_MessageService_service_MessageLogger_h -#define FWCore_MessageService_service_MessageLogger_h +#ifndef FWCore_MessageService_plugins_MessageLogger_h +#define FWCore_MessageService_plugins_MessageLogger_h // -*- C++ -*- // From 64e6fde1354b692301520eb095bc7d3a4395e60a Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Fri, 11 Jun 2021 06:50:42 -0500 Subject: [PATCH 11/14] drop include path when file is in same directory Co-authored-by: Andrea Bocci --- FWCore/MessageService/plugins/MessageLogger.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FWCore/MessageService/plugins/MessageLogger.cc b/FWCore/MessageService/plugins/MessageLogger.cc index b64eeb094c2bb..b6057ac5665cf 100644 --- a/FWCore/MessageService/plugins/MessageLogger.cc +++ b/FWCore/MessageService/plugins/MessageLogger.cc @@ -15,8 +15,8 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/MessageService/plugins/MessageLogger.h" -#include "FWCore/MessageService/plugins/MessageServicePSetValidation.h" +#include "MessageLogger.h" +#include "MessageServicePSetValidation.h" #include "FWCore/MessageLogger/interface/MessageLoggerQ.h" #include "FWCore/MessageLogger/interface/MessageDrop.h" From beadab179316cbd86b86f287344046a4e4ab336e Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Fri, 11 Jun 2021 11:22:47 -0500 Subject: [PATCH 12/14] Make comment consistent with guard names Co-authored-by: Matti Kortelainen --- FWCore/MessageService/plugins/MessageLogger.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FWCore/MessageService/plugins/MessageLogger.h b/FWCore/MessageService/plugins/MessageLogger.h index c5e3841a594dd..f4cc573f66b28 100644 --- a/FWCore/MessageService/plugins/MessageLogger.h +++ b/FWCore/MessageService/plugins/MessageLogger.h @@ -190,4 +190,4 @@ namespace edm { } // namespace edm -#endif // FWCore_MessageService_service_MessageLogger_h +#endif // FWCore_MessageService_plugins_MessageLogger_h From e6135ca492487cf8c0dd2acd82c7c13def6cf074 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Fri, 11 Jun 2021 11:23:15 -0500 Subject: [PATCH 13/14] Get header from same directory Co-authored-by: Matti Kortelainen --- FWCore/MessageService/plugins/Module.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FWCore/MessageService/plugins/Module.cc b/FWCore/MessageService/plugins/Module.cc index 9612d882097d8..122c677679be4 100644 --- a/FWCore/MessageService/plugins/Module.cc +++ b/FWCore/MessageService/plugins/Module.cc @@ -1,5 +1,5 @@ #include "FWCore/PluginManager/interface/PresenceMacros.h" -#include "FWCore/MessageService/plugins/MessageLogger.h" +#include "MessageLogger.h" #include "FWCore/MessageService/interface/SingleThreadMSPresence.h" #include "FWCore/ServiceRegistry/interface/ServiceMaker.h" From 54aa65d032eeb538438e2014b43ca0026455e88a Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Sat, 12 Jun 2021 08:05:29 -0500 Subject: [PATCH 14/14] include from same directory Co-authored-by: Matti Kortelainen --- FWCore/MessageService/plugins/MessageServicePSetValidation.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FWCore/MessageService/plugins/MessageServicePSetValidation.cc b/FWCore/MessageService/plugins/MessageServicePSetValidation.cc index d11dd7d2b271f..9e6e3b229ea78 100644 --- a/FWCore/MessageService/plugins/MessageServicePSetValidation.cc +++ b/FWCore/MessageService/plugins/MessageServicePSetValidation.cc @@ -17,7 +17,7 @@ // user include files -#include "FWCore/MessageService/plugins/MessageServicePSetValidation.h" +#include "MessageServicePSetValidation.h" using namespace edm; using namespace edm::service;