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
|
#ifndef ESTrendTask_H
#define ESTrendTask_H
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "DataFormats/EcalRawData/interface/EcalRawDataCollections.h"
#include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
#include "DQMServices/Core/interface/DQMEDAnalyzer.h"
#include "TProfile.h"
#include "DQMServices/Core/interface/DQMStore.h"
class ESTrendTask : public DQMEDAnalyzer {
public:
// Constructor
ESTrendTask(const edm::ParameterSet& ps);
// Destructor
~ESTrendTask() override {}
protected:
void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
// Analyze
void analyze(const edm::Event& e, const edm::EventSetup& c) override;
// BeginRun
void dqmBeginRun(const edm::Run& r, const edm::EventSetup& c) override;
// Update time check
void updateTime(const edm::Event&);
// Shift bins of TProfile to the right
void shift2Right(TProfile* p, int bins = 1);
// Shift bins of TProfile to the left
void shift2Left(TProfile* p, int bins = 1);
private:
int ievt_;
std::string prefixME_;
edm::EDGetTokenT<ESRecHitCollection> rechittoken_;
edm::EDGetTokenT<ESRawDataCollection> dccCollections_;
MonitorElement* hESRecHitTrend_[2][2];
MonitorElement* hESSLinkErrTrend_;
MonitorElement* hESFiberErrTrend_;
MonitorElement* hESRecHitTrendHr_[2][2];
MonitorElement* hESSLinkErrTrendHr_;
MonitorElement* hESFiberErrTrendHr_;
long int start_time_;
long int current_time_;
long int last_time_;
};
#endif
|