Skip to content

Commit

Permalink
HLTTauDQM: renamed IWrapper -> HistoWrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
slehti committed Jun 22, 2020
1 parent 75cdd2f commit e93a6d3
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 25 deletions.
4 changes: 2 additions & 2 deletions DQMOffline/Trigger/interface/HLTTauDQML1Plotter.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#define HLTTauDQML1Plotter_h

#include "DQMOffline/Trigger/interface/HLTTauDQMPlotter.h"
#include "DQMOffline/Trigger/interface/IWrapper.h"
#include "DQMOffline/Trigger/interface/HistoWrapper.h"

#include "FWCore/Utilities/interface/InputTag.h"

Expand All @@ -26,7 +26,7 @@ class HLTTauDQML1Plotter : private HLTTauDQMPlotter {

using HLTTauDQMPlotter::isValid;

void bookHistograms(IWrapper &iWrapper, DQMStore::IBooker &iBooker);
void bookHistograms(HistoWrapper &iWrapper, DQMStore::IBooker &iBooker);
void analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup, const HLTTauDQMOfflineObjects& refC);

private:
Expand Down
4 changes: 2 additions & 2 deletions DQMOffline/Trigger/interface/HLTTauDQMOfflineSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "DQMServices/Core/interface/DQMEDAnalyzer.h"

//Plotters
#include "DQMOffline/Trigger/interface/IWrapper.h"
#include "DQMOffline/Trigger/interface/HistoWrapper.h"
#include "DQMOffline/Trigger/interface/HLTTauDQML1Plotter.h"
#include "DQMOffline/Trigger/interface/HLTTauDQMPathPlotter.h"
#include "DQMOffline/Trigger/interface/HLTTauDQMPathSummaryPlotter.h"
Expand Down Expand Up @@ -50,7 +50,7 @@ class HLTTauDQMOfflineSource : public DQMEDAnalyzer {
const double ptMax_, highPtMax_, l1MatchDr_, hltMatchDr_;
const std::string dqmBaseFolder_;

IWrapper *iWrapper;
HistoWrapper *iWrapper;

HLTConfigProvider HLTCP_;

Expand Down
4 changes: 2 additions & 2 deletions DQMOffline/Trigger/interface/HLTTauDQMPathPlotter.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "DQMOffline/Trigger/interface/HLTTauDQMPlotter.h"
#include "DQMOffline/Trigger/interface/HLTTauDQMPath.h"
#include "DQMOffline/Trigger/interface/IWrapper.h"
#include "DQMOffline/Trigger/interface/HistoWrapper.h"

namespace edm {
class Event;
Expand Down Expand Up @@ -36,7 +36,7 @@ class HLTTauDQMPathPlotter : private HLTTauDQMPlotter {

using HLTTauDQMPlotter::isValid;

void bookHistograms(IWrapper & iWrapper, DQMStore::IBooker &iBooker);
void bookHistograms(HistoWrapper & iWrapper, DQMStore::IBooker &iBooker);

void analyze(const edm::TriggerResults &triggerResults,
const trigger::TriggerEvent &triggerEvent,
Expand Down
4 changes: 2 additions & 2 deletions DQMOffline/Trigger/interface/HLTTauDQMPathSummaryPlotter.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#define HLTTauDQMPathSummaryPlotter_h

#include "DQMOffline/Trigger/interface/HLTTauDQMPlotter.h"
#include "DQMOffline/Trigger/interface/IWrapper.h"
#include "DQMOffline/Trigger/interface/HistoWrapper.h"

#include <vector>

Expand All @@ -26,7 +26,7 @@ class HLTTauDQMPathSummaryPlotter : private HLTTauDQMPlotter {
using HLTTauDQMPlotter::isValid;

void setPathObjects(const std::vector<const HLTTauDQMPath*>& pathObjects) { pathObjects_ = pathObjects; }
void bookHistograms(IWrapper &iWrapper, DQMStore::IBooker &iBooker);
void bookHistograms(HistoWrapper &iWrapper, DQMStore::IBooker &iBooker);

void analyze(const edm::TriggerResults& triggerResults,
const trigger::TriggerEvent& triggerEvent,
Expand Down
4 changes: 2 additions & 2 deletions DQMOffline/Trigger/interface/HLTTauDQMTagAndProbePlotter.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "DQMOffline/Trigger/interface/HLTTauDQMPlotter.h"
#include "DQMOffline/Trigger/interface/HLTTauDQMPath.h"
#include "DQMOffline/Trigger/interface/IWrapper.h"
#include "DQMOffline/Trigger/interface/HistoWrapper.h"

//#include "CommonTools/TriggerUtils/interface/GenericTriggerEventFlag.h"
#include "FWCore/Common/interface/TriggerNames.h"
Expand All @@ -30,7 +30,7 @@ class HLTTauDQMTagAndProbePlotter : private HLTTauDQMPlotter {

using HLTTauDQMPlotter::isValid;

void bookHistograms(IWrapper &iWrapper, DQMStore::IBooker &iBooker, edm::Run const &iRun, edm::EventSetup const &iSetup);
void bookHistograms(HistoWrapper &iWrapper, DQMStore::IBooker &iBooker, edm::Run const &iRun, edm::EventSetup const &iSetup);

void analyze(edm::Event const &iEvent,
const edm::TriggerResults &triggerResults,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __IWrapper__
#define __IWrapper__
#ifndef __HistoWrapper__
#define __HistoWrapper__

#include "FWCore/ParameterSet/interface/ParameterSet.h"

Expand All @@ -10,10 +10,10 @@ typedef dqm::legacy::MonitorElement MonitorElement;

enum PL {kEverything, kVital};

class IWrapper {
class HistoWrapper {
public:
IWrapper(const edm::ParameterSet&);
~IWrapper();
HistoWrapper(const edm::ParameterSet&);
~HistoWrapper();

MonitorElement* book1D(DQMStore::IBooker& iBooker, TString const &name, TString const &title, int const nchX, double const lowX, double const highX, int level = kEverything);
MonitorElement* book2D(DQMStore::IBooker& iBooker, TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int level = kEverything);
Expand Down
2 changes: 1 addition & 1 deletion DQMOffline/Trigger/plugins/HLTTauDQMOfflineSource.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ HLTTauDQMOfflineSource::HLTTauDQMOfflineSource(const edm::ParameterSet& ps)
edm::ParameterSet matching = ps.getParameter<edm::ParameterSet>("Matching");
doRefAnalysis_ = matching.getUntrackedParameter<bool>("doMatching");

iWrapper = new IWrapper(ps);
iWrapper = new HistoWrapper(ps);

if (ps.exists("L1Plotter") && !ps.exists("TagAndProbe")) {
l1Plotter_ = std::make_unique<HLTTauDQML1Plotter>(ps.getUntrackedParameter<edm::ParameterSet>("L1Plotter"),
Expand Down
2 changes: 1 addition & 1 deletion DQMOffline/Trigger/src/HLTTauDQML1Plotter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ HLTTauDQML1Plotter::HLTTauDQML1Plotter(const edm::ParameterSet& ps,
configValid_ = true;
}

void HLTTauDQML1Plotter::bookHistograms(IWrapper &iWrapper, DQMStore::IBooker &iBooker) {
void HLTTauDQML1Plotter::bookHistograms(HistoWrapper &iWrapper, DQMStore::IBooker &iBooker) {
if (!configValid_)
return;

Expand Down
2 changes: 1 addition & 1 deletion DQMOffline/Trigger/src/HLTTauDQMPathPlotter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ HLTTauDQMPathPlotter::HLTTauDQMPathPlotter(const std::string& pathName,

#include <algorithm>
//void HLTTauDQMPathPlotter::bookHistograms(DQMStore::IBooker& iBooker) {
void HLTTauDQMPathPlotter::bookHistograms(IWrapper & iWrapper, DQMStore::IBooker &iBooker) {
void HLTTauDQMPathPlotter::bookHistograms(HistoWrapper & iWrapper, DQMStore::IBooker &iBooker) {
if (!isValid())
return;

Expand Down
2 changes: 1 addition & 1 deletion DQMOffline/Trigger/src/HLTTauDQMPathSummaryPlotter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ HLTTauDQMPathSummaryPlotter::HLTTauDQMPathSummaryPlotter(const edm::ParameterSet

HLTTauDQMPathSummaryPlotter::~HLTTauDQMPathSummaryPlotter() = default;

void HLTTauDQMPathSummaryPlotter::bookHistograms(IWrapper &iWrapper, DQMStore::IBooker &iBooker) {
void HLTTauDQMPathSummaryPlotter::bookHistograms(HistoWrapper &iWrapper, DQMStore::IBooker &iBooker) {
if (!isValid() || pathObjects_.empty())
return;

Expand Down
2 changes: 1 addition & 1 deletion DQMOffline/Trigger/src/HLTTauDQMTagAndProbePlotter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ HLTTauDQMTagAndProbePlotter::HLTTauDQMTagAndProbePlotter(const edm::ParameterSet
}

#include <algorithm>
void HLTTauDQMTagAndProbePlotter::bookHistograms(IWrapper& iWrapper, DQMStore::IBooker &iBooker,
void HLTTauDQMTagAndProbePlotter::bookHistograms(HistoWrapper& iWrapper, DQMStore::IBooker &iBooker,
edm::Run const& iRun,
edm::EventSetup const& iSetup) {
if (!isValid())
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
#include "DQMOffline/Trigger/interface/IWrapper.h"
#include "DQMOffline/Trigger/interface/HistoWrapper.h"

IWrapper::IWrapper(const edm::ParameterSet& pset){
HistoWrapper::HistoWrapper(const edm::ParameterSet& pset){
plotlevel = (PL)pset.getUntrackedParameter<int>("PlotLevel", int(kEverything));
cAllHistograms = 0;
cPlottedHistograms = 0;
}

IWrapper::~IWrapper(){
HistoWrapper::~HistoWrapper(){
std::string s_pl = "kEverything";
if(plotlevel == 1) s_pl = "kVital";
std::cout << "Plot level " << plotlevel << " " << s_pl << std::endl;
std::cout << "Plotting " << cPlottedHistograms << " out of " << cAllHistograms << std::endl;
}

MonitorElement* IWrapper::book1D(DQMStore::IBooker& iBooker, TString const &name, TString const &title, int const nchX, double const lowX, double const highX, int level){
MonitorElement* HistoWrapper::book1D(DQMStore::IBooker& iBooker, TString const &name, TString const &title, int const nchX, double const lowX, double const highX, int level){
cAllHistograms++;
if(level >= plotlevel){
cPlottedHistograms++;
Expand All @@ -23,7 +23,7 @@ MonitorElement* IWrapper::book1D(DQMStore::IBooker& iBooker, TString const &name
return 0;
}

MonitorElement* IWrapper::book2D(DQMStore::IBooker& iBooker, TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int level){
MonitorElement* HistoWrapper::book2D(DQMStore::IBooker& iBooker, TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int level){
cAllHistograms++;
if(level >= plotlevel){
cPlottedHistograms++;
Expand Down

0 comments on commit e93a6d3

Please sign in to comment.