1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
#ifndef DQMOFFLINE_L1TRIGGER_L1TEFFICIENCYHARVESTING_H
#define DQMOFFLINE_L1TRIGGER_L1TEFFICIENCYHARVESTING_H
/**
* \file L1TEfficiencyHarvesting.h
*
* \author J. Pela, C. Battilana
*
*/
// system include files
#include <memory>
#include <unistd.h>
// user include files
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/LuminosityBlock.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "DQMServices/Core/interface/DQMStore.h"
#include "DQMServices/Core/interface/DQMEDHarvester.h"
#include <vector>
namespace dqmoffline {
namespace l1t {
//
// Efficiency helper class declaration
//
class L1TEfficiencyPlotHandler {
public:
typedef dqm::legacy::DQMStore DQMStore;
typedef dqm::legacy::MonitorElement MonitorElement;
L1TEfficiencyPlotHandler(const edm::ParameterSet &ps, std::string plotName);
L1TEfficiencyPlotHandler(const L1TEfficiencyPlotHandler &handler);
~L1TEfficiencyPlotHandler() {}
// book efficiency histo
void book(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter);
// compute efficiency
void computeEfficiency(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter);
private:
std::string numeratorDir_;
std::string denominatorDir_;
std::string outputDir_;
std::string plotName_;
std::string numeratorSuffix_;
std::string denominatorSuffix_;
MonitorElement *h_efficiency_;
};
typedef std::vector<L1TEfficiencyPlotHandler> L1TEfficiencyPlotHandlerCollection;
//
// DQM class declaration
//
class L1TEfficiencyHarvesting : public DQMEDHarvester {
public:
L1TEfficiencyHarvesting(const edm::ParameterSet &ps); // Constructor
~L1TEfficiencyHarvesting() override; // Destructor
protected:
void dqmEndJob(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter) override;
private:
bool verbose_;
L1TEfficiencyPlotHandlerCollection plotHandlers_;
};
} // namespace l1t
} // namespace dqmoffline
#endif
|