DQM
SiStripMonitorSummary
plugins
SiStripMonitorCondDataOnDemandExample.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// Package: SiStripMonitorSummary
4
// Class : SiStripMonitorCondDataOnDemandExample
5
//
6
// Original Author: Evelyne Delmeire
7
//
8
9
#include "
FWCore/Framework/interface/ESHandle.h
"
10
#include "
FWCore/Framework/interface/Event.h
"
11
#include "
FWCore/Framework/interface/EventSetup.h
"
12
#include "
FWCore/Framework/interface/Run.h
"
13
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
14
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
15
#include "
FWCore/ServiceRegistry/interface/Service.h
"
16
17
#include "
DQM/SiStripMonitorSummary/interface/SiStripClassToMonitorCondData.h
"
18
#include "
SiStripMonitorCondDataOnDemandExample.h
"
19
20
#include "TH1F.h"
21
#include "TH2F.h"
22
#include "TProfile.h"
23
24
// std
25
#include <algorithm>
26
#include <cmath>
27
#include <cstdlib>
28
#include <numeric>
29
#include <string>
30
31
//
32
// ----- Constructor
33
//
34
SiStripMonitorCondDataOnDemandExample::SiStripMonitorCondDataOnDemandExample
(
edm::ParameterSet
const
&iConfig)
35
: conf_(iConfig) {}
36
// -----
37
38
//
39
// ----- Destructor
40
//
41
SiStripMonitorCondDataOnDemandExample::~SiStripMonitorCondDataOnDemandExample
() {}
42
// -----
43
44
//
45
// ----- beginRun
46
//
47
void
SiStripMonitorCondDataOnDemandExample::beginRun
(
edm::Run
const
&
run
,
edm::EventSetup
const
&eSetup) {
48
eventCounter_
= 0;
49
condDataMonitoring_
=
new
SiStripClassToMonitorCondData
(
conf_
);
50
condDataMonitoring_
->
beginRun
(
run
.run(), eSetup);
51
52
}
// beginRun
53
// -----
54
55
//
56
// ----- beginJob
57
//
58
void
SiStripMonitorCondDataOnDemandExample::beginJob
(
void
) {}
// beginJob
59
60
//
61
// ----- Analyze
62
//
63
void
SiStripMonitorCondDataOnDemandExample::analyze
(
edm::Event
const
&
iEvent
,
edm::EventSetup
const
&eSetup) {
64
// eventCounter_++;
65
66
// on demand type I : eventSetup and detId to be passed
67
// output : ME's corresponding to that detId
68
69
// if(eventCounter_==1){ condDataMonitoring_ ->
70
// getModMEsOnDemand(eSetup,369125542);}
71
72
// on demand type II : eventSetup, subdetector-type(TIB/TOB/TEC/TID),
73
// subdetector-side for TEC/TID (0 for TIB and
74
// TOB) layer_number (0=all layers)
75
76
// if(eventCounter_==2){ condDataMonitoring_ ->
77
// getLayerMEsOnDemand(eSetup,"TEC",0,1);} condDataMonitoring_ ->
78
// getModMEsOnDemand(eSetup,369125542);
79
condDataMonitoring_
->
getLayerMEsOnDemand
(eSetup,
"TEC"
, 2, 4);
80
81
}
// analyze
82
// -----
83
84
//
85
// ----- endRun
86
//
87
void
SiStripMonitorCondDataOnDemandExample::endRun
(
edm::Run
const
&
run
,
edm::EventSetup
const
&eSetup) {
88
condDataMonitoring_
->
endRun
(eSetup);
89
90
}
// endRun
91
// -----
92
93
//
94
// ----- endJob
95
//
96
void
SiStripMonitorCondDataOnDemandExample::endJob
(
void
) {}
// endJob
97
98
#include "
FWCore/Framework/interface/MakerMacros.h
"
99
DEFINE_FWK_MODULE
(
SiStripMonitorCondDataOnDemandExample
);
SiStripClassToMonitorCondData::beginRun
void beginRun(edm::RunNumber_t iRun, edm::EventSetup const &eSetup)
Definition:
SiStripClassToMonitorCondData.cc:111
SiStripMonitorCondDataOnDemandExample::eventCounter_
int eventCounter_
Definition:
SiStripMonitorCondDataOnDemandExample.h:43
MessageLogger.h
ESHandle.h
SiStripMonitorCondDataOnDemandExample::beginJob
void beginJob() override
Definition:
SiStripMonitorCondDataOnDemandExample.cc:58
edm::Run
Definition:
Run.h:45
SiStripMonitorCondDataOnDemandExample::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition:
SiStripMonitorCondDataOnDemandExample.cc:63
SiStripMonitorCondDataOnDemandExample::~SiStripMonitorCondDataOnDemandExample
~SiStripMonitorCondDataOnDemandExample() override
Definition:
SiStripMonitorCondDataOnDemandExample.cc:41
SiStripMonitorCondDataOnDemandExample::beginRun
void beginRun(edm::Run const &run, edm::EventSetup const &eSetup) override
Definition:
SiStripMonitorCondDataOnDemandExample.cc:47
SiStripMonitorCondDataOnDemandExample::SiStripMonitorCondDataOnDemandExample
SiStripMonitorCondDataOnDemandExample(const edm::ParameterSet &)
Definition:
SiStripMonitorCondDataOnDemandExample.cc:34
SiStripMonitorCondDataOnDemandExample
Definition:
SiStripMonitorCondDataOnDemandExample.h:30
SiStripMonitorCondDataOnDemandExample.h
SiStripMonitorCondDataOnDemandExample::conf_
edm::ParameterSet conf_
Definition:
SiStripMonitorCondDataOnDemandExample.h:44
SiStripClassToMonitorCondData
Definition:
SiStripClassToMonitorCondData.h:39
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
SiStripClassToMonitorCondData::endRun
void endRun(edm::EventSetup const &eSetup)
Definition:
SiStripClassToMonitorCondData.cc:294
Service.h
Run.h
SiStripClassToMonitorCondData::getLayerMEsOnDemand
void getLayerMEsOnDemand(edm::EventSetup const &eSetup, std::string requestedSubDetector, uint32_t requestedSide, uint32_t requestedLayer)
Definition:
SiStripClassToMonitorCondData.cc:221
edm::ParameterSet
Definition:
ParameterSet.h:36
Event.h
SiStripMonitorCondDataOnDemandExample::endJob
void endJob() override
Definition:
SiStripMonitorCondDataOnDemandExample.cc:96
iEvent
int iEvent
Definition:
GenABIO.cc:224
edm::EventSetup
Definition:
EventSetup.h:57
SiStripMonitorCondDataOnDemandExample::condDataMonitoring_
SiStripClassToMonitorCondData * condDataMonitoring_
Definition:
SiStripMonitorCondDataOnDemandExample.h:45
writedatasetfile.run
run
Definition:
writedatasetfile.py:27
SiStripClassToMonitorCondData.h
EventSetup.h
SiStripMonitorCondDataOnDemandExample::endRun
void endRun(edm::Run const &run, edm::EventSetup const &eSetup) override
Definition:
SiStripMonitorCondDataOnDemandExample.cc:87
ParameterSet.h
edm::Event
Definition:
Event.h:73
Generated for CMSSW Reference Manual by
1.8.16