From f5e902461f9c1c767d3f8520dd4bb96a1ee8813e Mon Sep 17 00:00:00 2001 From: Marino Missiroli Date: Thu, 15 Dec 2022 18:02:38 +0100 Subject: [PATCH] removed PSMonitorClient harvester --- DQM/HLTEvF/plugins/PSMonitorClient.cc | 119 ------------------ .../clients/hlt_dqm_clientPB-live_cfg.py | 5 +- 2 files changed, 1 insertion(+), 123 deletions(-) delete mode 100644 DQM/HLTEvF/plugins/PSMonitorClient.cc diff --git a/DQM/HLTEvF/plugins/PSMonitorClient.cc b/DQM/HLTEvF/plugins/PSMonitorClient.cc deleted file mode 100644 index d8fb77ceca6ee..0000000000000 --- a/DQM/HLTEvF/plugins/PSMonitorClient.cc +++ /dev/null @@ -1,119 +0,0 @@ -// C++ headers -#include -#include - -// boost headers -#include - -// Root headers -#include - -// CMSSW headers -#include "FWCore/Framework/interface/Frameworkfwd.h" -#include "FWCore/Framework/interface/Event.h" -#include "FWCore/Framework/interface/Run.h" -#include "FWCore/Framework/interface/LuminosityBlock.h" -#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/ParameterSet/interface/ParameterSetDescription.h" -#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" -#include "FWCore/ParameterSet/interface/Registry.h" -#include "DQMServices/Core/interface/DQMStore.h" -#include "DQMServices/Core/interface/DQMEDHarvester.h" - -struct MEPSetData { - std::string name; - std::string folder; -}; - -class PSMonitorClient : public DQMEDHarvester { -public: - explicit PSMonitorClient(edm::ParameterSet const &); - ~PSMonitorClient() override = default; - - static void fillDescriptions(edm::ConfigurationDescriptions &descriptions); - static void fillMePSetDescription(edm::ParameterSetDescription &pset); - -private: - static MEPSetData getHistoPSet(edm::ParameterSet pset); - - std::string m_dqm_path; - - void dqmEndLuminosityBlock(DQMStore::IBooker &booker, - DQMStore::IGetter &getter, - edm::LuminosityBlock const &, - edm::EventSetup const &) override; - void dqmEndJob(DQMStore::IBooker &booker, DQMStore::IGetter &getter) override; - - void check(DQMStore::IBooker &booker, DQMStore::IGetter &getter); - - MEPSetData psColumnVSlumiPSet; -}; - -PSMonitorClient::PSMonitorClient(edm::ParameterSet const &config) - : m_dqm_path(config.getUntrackedParameter("dqmPath")), - psColumnVSlumiPSet(getHistoPSet(config.getParameter("me"))) {} - -MEPSetData PSMonitorClient::getHistoPSet(edm::ParameterSet pset) { - return MEPSetData{ - pset.getParameter("name"), - pset.getParameter("folder"), - }; -} - -void PSMonitorClient::fillMePSetDescription(edm::ParameterSetDescription &pset) { - pset.add("folder", "HLT/PSMonitoring"); - pset.add("name", "psColumnVSlumi"); -} - -void PSMonitorClient::dqmEndJob(DQMStore::IBooker &booker, DQMStore::IGetter &getter) { check(booker, getter); } - -void PSMonitorClient::dqmEndLuminosityBlock(DQMStore::IBooker &booker, - DQMStore::IGetter &getter, - edm::LuminosityBlock const &lumi, - edm::EventSetup const &setup) { - check(booker, getter); -} - -#include "FWCore/MessageLogger/interface/MessageLogger.h" -void PSMonitorClient::check(DQMStore::IBooker &booker, DQMStore::IGetter &getter) { - std::string folder = psColumnVSlumiPSet.folder; - std::string name = psColumnVSlumiPSet.name; - - getter.setCurrentFolder(folder); - MonitorElement *psColumnVSlumi = getter.get(psColumnVSlumiPSet.folder + "/" + psColumnVSlumiPSet.name); - // if no ME available, return - if (!psColumnVSlumi) { - edm::LogWarning("PSMonitorClient") << "no " << psColumnVSlumiPSet.name << " ME is available in " - << psColumnVSlumiPSet.folder << std::endl; - return; - } - - /* - TH2F* h = psColumnVSlumi->getTH2F(); - size_t nbinsX = psColumnVSlumi->getNbinsX(); - size_t nbinsY = psColumnVSlumi->getNbinsY(); - - for ( size_t ibinY=1; ibinY < nbinsY; ++ibinY ) - std::cout << h->GetXaxis()->GetBinLabel(ibinY) << std::endl; - for ( size_t ibinX=1; ibinX< nbinsX; ++ibinX ) - if ( psColumnVSlumi->getBinContent(ibinX) ) - std::cout << "ibinX: " << psColumnVSlumi->getBinContent(ibinX) << std::endl; - */ -} - -void PSMonitorClient::fillDescriptions(edm::ConfigurationDescriptions &descriptions) { - // The following says we do not know what parameters are allowed so do no validation - // Please change this to state exactly what you do use, even if it is no parameters - edm::ParameterSetDescription desc; - desc.addUntracked("dqmPath", "HLT/PSMonitoring"); - - edm::ParameterSetDescription mePSet; - fillMePSetDescription(mePSet); - desc.add("me", mePSet); - - descriptions.add("psMonitorClient", desc); -} - -//define this as a plug-in -#include "FWCore/Framework/interface/MakerMacros.h" -DEFINE_FWK_MODULE(PSMonitorClient); diff --git a/DQM/Integration/python/clients/hlt_dqm_clientPB-live_cfg.py b/DQM/Integration/python/clients/hlt_dqm_clientPB-live_cfg.py index add27a4f6de6c..4cf721d4f13de 100644 --- a/DQM/Integration/python/clients/hlt_dqm_clientPB-live_cfg.py +++ b/DQM/Integration/python/clients/hlt_dqm_clientPB-live_cfg.py @@ -83,8 +83,5 @@ ), ) -process.load('DQM.HLTEvF.psMonitorClient_cfi') -process.psChecker = process.psMonitorClient.clone() - print("Final Source settings:", process.source) -process.p = cms.EndPath( process.fastTimerServiceClient + process.throughputServiceClient + process.psColumnVsLumi + process.psChecker + process.dqmEnv + process.dqmSaver + process.dqmSaverPB ) +process.p = cms.EndPath( process.fastTimerServiceClient + process.throughputServiceClient + process.psColumnVsLumi + process.dqmEnv + process.dqmSaver + process.dqmSaverPB )