Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DQM: Switch to edm::stream for DQMEDAnalyzer #28813

Merged
merged 5 commits into from
Mar 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Calibration/EcalCalibAlgos/interface/ECALpedestalPCLworker.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,8 @@ class ECALpedestalPCLworker : public DQMEDAnalyzer {
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions);

private:
void beginJob() override;
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
void analyze(const edm::Event &, const edm::EventSetup &) override;
void endJob() override;

edm::EDGetTokenT<EBDigiCollection> digiTokenEB_;
edm::EDGetTokenT<EEDigiCollection> digiTokenEE_;
Expand Down
4 changes: 0 additions & 4 deletions Calibration/EcalCalibAlgos/src/ECALpedestalPCLworker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,6 @@ void ECALpedestalPCLworker::analyze(const edm::Event& iEvent, const edm::EventSe
} // ee digis
}

void ECALpedestalPCLworker::beginJob() {}

void ECALpedestalPCLworker::endJob() {}

void ECALpedestalPCLworker::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
edm::ParameterSetDescription desc;
desc.setUnknown();
Expand Down
6 changes: 2 additions & 4 deletions DQM/CSCMonitorModule/plugins/CSCMonitorModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,9 @@
#include <set>

/// DQM Framework stuff
#include <FWCore/Framework/interface/EDAnalyzer.h>
#include <FWCore/ParameterSet/interface/ParameterSet.h>

#include <DQMServices/Core/interface/DQMStore.h>
#include <DQMServices/Core/interface/DQMEDAnalyzer.h>
#include <DQMServices/Core/interface/DQMOneEDAnalyzer.h>

#include <FWCore/ServiceRegistry/interface/Service.h>
#include <FWCore/Framework/interface/ESHandle.h>
Expand Down Expand Up @@ -72,7 +70,7 @@ static const unsigned int MAX_DMB_SLOT = 10;
* @class CSCMonitorModule
* @brief Common CSC DQM Module that uses CSCDQM Framework
*/
class CSCMonitorModule : public DQMEDAnalyzer, public cscdqm::MonitorObjectProvider {
class CSCMonitorModule : public DQMOneEDAnalyzer<>, public cscdqm::MonitorObjectProvider {
/**
* Global stuff
*/
Expand Down
2 changes: 0 additions & 2 deletions DQM/EcalPreshowerMonitorModule/interface/ESFEDIntegrityTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ class ESFEDIntegrityTask : public DQMEDAnalyzer {
/// Analyze
void analyze(const edm::Event& e, const edm::EventSetup& c) override;

void endJob() override;

private:
int ievt_;

Expand Down
7 changes: 2 additions & 5 deletions DQM/EcalPreshowerMonitorModule/interface/ESOccupancyTask.h
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
#ifndef ESOccupancyTask_H
#define ESOccupancyTask_H

#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "DQMServices/Core/interface/DQMOneEDAnalyzer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"

#include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"

#include "DQMServices/Core/interface/DQMEDAnalyzer.h"
#include "DQMServices/Core/interface/DQMStore.h"

class ESOccupancyTask : public DQMEDAnalyzer {
class ESOccupancyTask : public DQMOneEDAnalyzer<> {
public:
ESOccupancyTask(const edm::ParameterSet& ps);
~ESOccupancyTask() override {}
Expand Down
1 change: 0 additions & 1 deletion DQM/EcalPreshowerMonitorModule/interface/ESPedestalTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class ESPedestalTask : public DQMEDAnalyzer {
private:
void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
void analyze(const edm::Event&, const edm::EventSetup&) override;
void endJob(void) override;

edm::EDGetTokenT<ESDigiCollection> digitoken_;
edm::FileInPath lookup_;
Expand Down
3 changes: 0 additions & 3 deletions DQM/EcalPreshowerMonitorModule/interface/ESRawDataTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ class ESRawDataTask : public DQMEDAnalyzer {
/// Analyze
void analyze(const edm::Event& e, const edm::EventSetup& c) override;

/// EndJob
void endJob(void) override;

/// Setup
void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;

Expand Down
3 changes: 0 additions & 3 deletions DQM/EcalPreshowerMonitorModule/interface/ESTrendTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ class ESTrendTask : public DQMEDAnalyzer {
// Analyze
void analyze(const edm::Event& e, const edm::EventSetup& c) override;

// EndJob
void endJob(void) override;

// BeginRun
void dqmBeginRun(const edm::Run& r, const edm::EventSetup& c) override;

Expand Down
2 changes: 0 additions & 2 deletions DQM/EcalPreshowerMonitorModule/src/ESFEDIntegrityTask.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ void ESFEDIntegrityTask::bookHistograms(DQMStore::IBooker& iBooker, Run const&,
meESFedsNonFatal_ = iBooker.book1D(histo, histo, 56, 520, 576);
}

void ESFEDIntegrityTask::endJob(void) { LogInfo("ESFEDIntegrityTask") << "analyzed " << ievt_ << " events"; }

void ESFEDIntegrityTask::analyze(const Event& e, const EventSetup& c) {
ievt_++;

Expand Down
2 changes: 0 additions & 2 deletions DQM/EcalPreshowerMonitorModule/src/ESPedestalTask.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ void ESPedestalTask::bookHistograms(DQMStore::IBooker& iBooker, Run const&, Even
}
}

void ESPedestalTask::endJob(void) { LogInfo("ESPedestalTask") << "analyzed " << ievt_ << " events"; }

void ESPedestalTask::analyze(const edm::Event& e, const edm::EventSetup& iSetup) {
ievt_++;
runNum_ = e.id().run();
Expand Down
2 changes: 0 additions & 2 deletions DQM/EcalPreshowerMonitorModule/src/ESRawDataTask.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ void ESRawDataTask::bookHistograms(DQMStore::IBooker& iBooker, Run const&, Event
meOrbitNumberDiff_->setAxisTitle("Num of Events", 2);
}

void ESRawDataTask::endJob(void) { LogInfo("ESRawDataTask") << "analyzed " << ievt_ << " events"; }

void ESRawDataTask::analyze(const Event& e, const EventSetup& c) {
ievt_++;
runNum_ = e.id().run();
Expand Down
2 changes: 0 additions & 2 deletions DQM/EcalPreshowerMonitorModule/src/ESTrendTask.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ void ESTrendTask::bookHistograms(DQMStore::IBooker& iBooker, Run const&, EventSe
hESFiberErrTrendHr_->setAxisTitle("ES Fiber Err / hour", 2);
}

void ESTrendTask::endJob(void) { LogInfo("ESTrendTask") << "analyzed " << ievt_ << " events"; }

void ESTrendTask::analyze(const Event& e, const EventSetup& c) {
ievt_++;

Expand Down
6 changes: 2 additions & 4 deletions DQM/Physics/src/SingleTopTChannelLeptonDQM.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
#include <string>
#include <vector>

#include "FWCore/Framework/interface/Event.h"
#include "DQMServices/Core/interface/DQMStore.h"
#include "DQMServices/Core/interface/DQMOneEDAnalyzer.h"

#include "DataFormats/JetReco/interface/Jet.h"
#include "DQM/Physics/interface/TopDQMHelpers.h"
Expand Down Expand Up @@ -241,7 +240,6 @@ namespace SingleTopTChannelLepton {
#include "DataFormats/BeamSpot/interface/BeamSpot.h"
#include "DataFormats/VertexReco/interface/Vertex.h"
#include "DataFormats/Common/interface/TriggerResults.h"
#include "DQMServices/Core/interface/DQMEDAnalyzer.h"

/**
\class SingleTopTChannelLeptonDQM SingleTopTChannelLeptonDQM.h
Expand Down Expand Up @@ -277,7 +275,7 @@ namespace SingleTopTChannelLepton {
/// define MonitorEnsembple to be used
// using SingleTopTChannelLepton::MonitorEnsemble;

class SingleTopTChannelLeptonDQM : public DQMEDAnalyzer {
class SingleTopTChannelLeptonDQM : public DQMOneEDAnalyzer<> {
public:
/// default constructor
SingleTopTChannelLeptonDQM(const edm::ParameterSet& cfg);
Expand Down
6 changes: 2 additions & 4 deletions DQM/Physics/src/SingleTopTChannelLeptonDQM_miniAOD.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
#ifndef SINGLETOPTCHANNELLEPTONDQM_MINIAOD
#define SINGLETOPTCHANNELLEPTONDQM_MINIAOD

#include "DQMServices/Core/interface/DQMOneEDAnalyzer.h"
#include <string>
#include <vector>
#include "FWCore/Utilities/interface/EDGetToken.h"
#include "FWCore/Framework/interface/Event.h"
#include "DQMServices/Core/interface/DQMStore.h"

#include "DataFormats/JetReco/interface/Jet.h"
#include "DQM/Physics/interface/TopDQMHelpers.h"
Expand Down Expand Up @@ -182,9 +181,8 @@ namespace SingleTopTChannelLepton_miniAOD {
#include "DataFormats/BeamSpot/interface/BeamSpot.h"
#include "DataFormats/VertexReco/interface/Vertex.h"
#include "DataFormats/Common/interface/TriggerResults.h"
#include "DQMServices/Core/interface/DQMEDAnalyzer.h"

class SingleTopTChannelLeptonDQM_miniAOD : public DQMEDAnalyzer {
class SingleTopTChannelLeptonDQM_miniAOD : public DQMOneEDAnalyzer<> {
public:
/// default constructor
SingleTopTChannelLeptonDQM_miniAOD(const edm::ParameterSet& cfg);
Expand Down
8 changes: 3 additions & 5 deletions DQM/Physics/src/TopDiLeptonOfflineDQM.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
#ifndef TOPDILEPTONOFFLINEDQM
#define TOPDILEPTONOFFLINEDQM

#include "DQMServices/Core/interface/DQMOneEDAnalyzer.h"

#include <string>
#include <vector>

#include "FWCore/Framework/interface/Event.h"
#include "DQMServices/Core/interface/DQMStore.h"

#include "DataFormats/Math/interface/deltaR.h"
#include "DataFormats/JetReco/interface/Jet.h"
#include "DQM/Physics/interface/TopDQMHelpers.h"
Expand Down Expand Up @@ -253,7 +252,6 @@ namespace TopDiLeptonOffline {
#include "DataFormats/BeamSpot/interface/BeamSpot.h"
#include "DataFormats/VertexReco/interface/Vertex.h"
#include "DataFormats/Common/interface/TriggerResults.h"
#include "DQMServices/Core/interface/DQMEDAnalyzer.h"

/**
\class TopDiLeptonOfflineDQM TopDiLeptonOfflineDQM.h
Expand Down Expand Up @@ -295,7 +293,7 @@ namespace TopDiLeptonOffline {
/// define MonitorEnsembple to be used
// using TopDiLeptonOffline::MonitorEnsemble;

class TopDiLeptonOfflineDQM : public DQMEDAnalyzer {
class TopDiLeptonOfflineDQM : public DQMOneEDAnalyzer<> {
public:
/// default constructor
TopDiLeptonOfflineDQM(const edm::ParameterSet& cfg);
Expand Down
7 changes: 2 additions & 5 deletions DQM/Physics/src/TopSingleLeptonDQM.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
#ifndef TOPSINGLELEPTONDQM
#define TOPSINGLELEPTONDQM

#include "DQMServices/Core/interface/DQMOneEDAnalyzer.h"
#include <string>
#include <vector>

#include "FWCore/Framework/interface/Event.h"
#include "DQMServices/Core/interface/DQMStore.h"

#include "DataFormats/JetReco/interface/Jet.h"
#include "DQM/Physics/interface/TopDQMHelpers.h"
#include "DataFormats/Common/interface/ValueMap.h"
Expand Down Expand Up @@ -223,7 +221,6 @@ namespace TopSingleLepton {
#include "DataFormats/BeamSpot/interface/BeamSpot.h"
#include "DataFormats/VertexReco/interface/Vertex.h"
#include "DataFormats/Common/interface/TriggerResults.h"
#include "DQMServices/Core/interface/DQMEDAnalyzer.h"

/**
\class TopSingleLeptonDQM TopSingleLeptonDQM.h
Expand Down Expand Up @@ -266,7 +263,7 @@ namespace TopSingleLepton {
/// define MonitorEnsembple to be used
// using TopSingleLepton::MonitorEnsemble;

class TopSingleLeptonDQM : public DQMEDAnalyzer {
class TopSingleLeptonDQM : public DQMOneEDAnalyzer<> {
public:
/// default constructor
TopSingleLeptonDQM(const edm::ParameterSet& cfg);
Expand Down
6 changes: 2 additions & 4 deletions DQM/Physics/src/TopSingleLeptonDQM_miniAOD.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
#ifndef TOPSINGLELEPTONDQM_MINIAOD
#define TOPSINGLELEPTONDQM_MINIAOD

#include "DQMServices/Core/interface/DQMOneEDAnalyzer.h"
#include <string>
#include <vector>
#include "FWCore/Utilities/interface/EDGetToken.h"
#include "FWCore/Framework/interface/Event.h"
#include "DQMServices/Core/interface/DQMStore.h"

#include "DataFormats/JetReco/interface/Jet.h"
#include "DQM/Physics/interface/TopDQMHelpers.h"
Expand Down Expand Up @@ -182,9 +181,8 @@ namespace TopSingleLepton_miniAOD {
#include "DataFormats/BeamSpot/interface/BeamSpot.h"
#include "DataFormats/VertexReco/interface/Vertex.h"
#include "DataFormats/Common/interface/TriggerResults.h"
#include "DQMServices/Core/interface/DQMEDAnalyzer.h"

class TopSingleLeptonDQM_miniAOD : public DQMEDAnalyzer {
class TopSingleLeptonDQM_miniAOD : public DQMOneEDAnalyzer<> {
public:
/// default constructor
TopSingleLeptonDQM_miniAOD(const edm::ParameterSet& cfg);
Expand Down
4 changes: 2 additions & 2 deletions DQM/SiStripCommon/test/plugins/testTkHistoMap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// user include files
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "DQMServices/Core/interface/DQMEDAnalyzer.h"
#include "DQMServices/Core/interface/DQMOneEDAnalyzer.h"

#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"
Expand Down Expand Up @@ -35,7 +35,7 @@
// class declaration
//

class testTkHistoMap : public DQMEDAnalyzer {
class testTkHistoMap : public DQMOneEDAnalyzer<> {
public:
explicit testTkHistoMap(const edm::ParameterSet&);
~testTkHistoMap();
Expand Down
7 changes: 2 additions & 5 deletions DQM/TrackingMonitor/interface/LogMessageMonitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
#include <memory>

// user include files
#include "DQMServices/Core/interface/DQMOneEDAnalyzer.h"
#include "FWCore/Utilities/interface/EDGetToken.h"
#include "FWCore/Framework/interface/ConsumesCollector.h"
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/EDAnalyzer.h"

#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/EventSetup.h"
Expand All @@ -32,11 +32,8 @@
#include "FWCore/ParameterSet/interface/ParameterSet.h"

#include "FWCore/ServiceRegistry/interface/Service.h"
#include "DQMServices/Core/interface/DQMStore.h"
#include "FWCore/MessageLogger/interface/ErrorSummaryEntry.h"

#include <DQMServices/Core/interface/DQMEDAnalyzer.h>

#include <vector>
#include <string>
#include <map>
Expand All @@ -49,7 +46,7 @@ class GetLumi;
// class declaration
//

class LogMessageMonitor : public DQMEDAnalyzer {
class LogMessageMonitor : public DQMOneEDAnalyzer<> {
public:
explicit LogMessageMonitor(const edm::ParameterSet&);
~LogMessageMonitor() override;
Expand Down
2 changes: 0 additions & 2 deletions DQM/TrackingMonitor/interface/TrackEfficiencyMonitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ class TrackEfficiencyMonitor : public DQMEDAnalyzer {
typedef reco::TrackCollection TrackCollection;
explicit TrackEfficiencyMonitor(const edm::ParameterSet&);
~TrackEfficiencyMonitor() override;
void beginJob(void) override;
void endJob(void) override;
void analyze(const edm::Event&, const edm::EventSetup&) override;

void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
Expand Down
1 change: 0 additions & 1 deletion DQM/TrackingMonitor/interface/dEdxAnalyzer.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ class dEdxAnalyzer : public DQMEDAnalyzer {
static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);

void analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) override;
void endJob() override;
double mass(double P, double I);

void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
Expand Down
18 changes: 0 additions & 18 deletions DQM/TrackingMonitor/src/TrackEfficiencyMonitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -272,11 +272,6 @@ void TrackEfficiencyMonitor::bookHistograms(DQMStore::IBooker& ibooker,
StandaloneMuonPtEtaPhiHighPt->setAxisTitle("");
}

//-----------------------------------------------------------------------------------
void TrackEfficiencyMonitor::beginJob(void)
//-----------------------------------------------------------------------------------
{}

//-----------------------------------------------------------------------------------
void TrackEfficiencyMonitor::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup)
//-----------------------------------------------------------------------------------
Expand Down Expand Up @@ -366,19 +361,6 @@ void TrackEfficiencyMonitor::analyze(const edm::Event& iEvent, const edm::EventS
delete theNavigation;
}

//-----------------------------------------------------------------------------------
void TrackEfficiencyMonitor::endJob(void)
//-----------------------------------------------------------------------------------
{
bool outputMEsInRootFile = conf_.getParameter<bool>("OutputMEsInRootFile");
std::string outputFileName = conf_.getParameter<std::string>("OutputFileName");
if (outputMEsInRootFile) {
dqmStore_->save(outputFileName);
}

//if ( theNavigation ) delete theNavigation;
}

//-----------------------------------------------------------------------------------
void TrackEfficiencyMonitor::testTrackerTracks(edm::Handle<reco::TrackCollection> tkTracks,
edm::Handle<reco::TrackCollection> staTracks,
Expand Down
9 changes: 0 additions & 9 deletions DQM/TrackingMonitor/src/dEdxAnalyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,6 @@ dEdxAnalyzer::~dEdxAnalyzer() {
delete genTriggerEventFlag_;
}

// ------------ method called once each job just after ending the event loop ------------
void dEdxAnalyzer::endJob() {
bool outputMEsInRootFile = conf_.getParameter<bool>("OutputMEsInRootFile");
std::string outputFileName = conf_.getParameter<std::string>("OutputFileName");
if (outputMEsInRootFile) {
dqmStore_->save(outputFileName);
}
}

/*
// -- BeginRun
//---------------------------------------------------------------------------------//
Expand Down
2 changes: 0 additions & 2 deletions DQMOffline/Hcal/interface/CaloTowersAnalyzer.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ class CaloTowersAnalyzer : public DQMEDAnalyzer {
~CaloTowersAnalyzer() override;

void analyze(edm::Event const &, edm::EventSetup const &) override;
void beginJob() override;
void endJob() override;
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override;

Expand Down
Loading