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
|
#ifndef GeneratorInterface_RivetInterface_DQMRivetClient_H
#define GeneratorInterface_RivetInterface_DQMRivetClient_H
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/one/EDAnalyzer.h"
#include "DQMServices/Core/interface/DQMStore.h"
#include <set>
#include <string>
#include <vector>
#include <TH1.h>
class DQMRivetClient : public edm::one::EDAnalyzer<edm::one::SharedResources, edm::one::WatchRuns> {
public:
typedef dqm::legacy::DQMStore DQMStore;
typedef dqm::legacy::MonitorElement MonitorElement;
struct NormOption {
std::string name, normHistName;
};
DQMRivetClient(const edm::ParameterSet& pset);
~DQMRivetClient() override {}
void analyze(const edm::Event& event, const edm::EventSetup& eventSetup) override {}
void endJob() override;
void beginRun(const edm::Run& r, const edm::EventSetup& c) override {}
void endRun(const edm::Run& r, const edm::EventSetup& c) override;
struct LumiOption {
std::string name, normHistName;
double xsection;
};
struct ScaleFactorOption {
std::string name;
double scale;
};
void normalizeToIntegral(const std::string& startDir, const std::string& histName, const std::string& normHistName);
void normalizeToLumi(const std::string& startDir,
const std::string& histName,
const std::string& normHistName,
double xsection);
void scaleByFactor(const std::string& startDir, const std::string& histName, double factor);
private:
unsigned int verbose_;
DQMStore* theDQM;
std::vector<std::string> subDirs_;
std::string outputFileName_;
std::vector<NormOption> normOptions_;
std::vector<LumiOption> lumiOptions_;
std::vector<ScaleFactorOption> scaleOptions_;
};
#endif
|