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
|
#ifndef ESTimingTask_H
#define ESTimingTask_H
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include "CondFormats/ESObjects/interface/ESGain.h"
#include "DataFormats/EcalDigi/interface/EcalDigiCollections.h"
#include "DQMServices/Core/interface/DQMEDAnalyzer.h"
#include "TF1.h"
#include "TH1F.h"
#include "DQMServices/Core/interface/DQMStore.h"
double fitf(double *x, double *par);
class ESTimingTask : public DQMEDAnalyzer {
public:
ESTimingTask(const edm::ParameterSet &ps);
~ESTimingTask() override;
private:
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
void analyze(const edm::Event &, const edm::EventSetup &) override;
void set(const edm::EventSetup &es);
// ----------member data ---------------------------
edm::EDGetTokenT<ESDigiCollection> digilabel_;
std::string prefixME_;
MonitorElement *hTiming_[2][2];
MonitorElement *h2DTiming_;
edm::ESGetToken<ESGain, ESGainRcd> esgainToken_;
edm::ESHandle<ESGain> esgain_;
TF1 *fit_;
TH1F *htESP_;
TH1F *htESM_;
int runNum_, eCount_;
Double_t wc_, n_;
};
#endif
|