DQM
EcalPreshowerMonitorClient
src
EcalPreshowerMonitorClient.cc
Go to the documentation of this file.
1
#include "
DQM/EcalPreshowerMonitorClient/interface/EcalPreshowerMonitorClient.h
"
2
3
#include "
DQM/EcalPreshowerMonitorClient/interface/ESClient.h
"
4
#include "
DQM/EcalPreshowerMonitorClient/interface/ESIntegrityClient.h
"
5
#include "
DQM/EcalPreshowerMonitorClient/interface/ESPedestalClient.h
"
6
#include "
DQM/EcalPreshowerMonitorClient/interface/ESSummaryClient.h
"
7
8
#include "
FWCore/ParameterSet/interface/ConfigurationDescriptions.h
"
9
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
10
#include "
FWCore/ParameterSet/interface/ParameterSetDescription.h
"
11
12
#include "
FWCore/Framework/interface/MakerMacros.h
"
13
14
#include <iostream>
15
#include <memory>
16
#include <string>
17
#include <vector>
18
19
EcalPreshowerMonitorClient::EcalPreshowerMonitorClient
(
const
edm::ParameterSet
&ps)
20
: debug_(ps.getUntrackedParameter<
bool
>(
"debug"
)), verbose_(ps.getUntrackedParameter<
bool
>(
"verbose"
)), clients_() {
21
std::vector<std::string>
enabledClients
(ps.
getUntrackedParameter
<std::vector<std::string>>(
"enabledClients"
));
22
23
if
(
verbose_
) {
24
std::cout
<<
" Enabled Clients:"
;
25
for
(
unsigned
int
i
= 0;
i
<
enabledClients
.size();
i
++) {
26
std::cout
<<
" "
<<
enabledClients
[
i
];
27
}
28
std::cout
<< std::endl;
29
}
30
31
// Setup Clients
32
if
(
find
(
enabledClients
.begin(),
enabledClients
.end(),
"Integrity"
) !=
enabledClients
.end()) {
33
clients_
.push_back(
new
ESIntegrityClient
(ps));
34
}
35
36
if
(
find
(
enabledClients
.begin(),
enabledClients
.end(),
"Pedestal"
) !=
enabledClients
.end()) {
37
clients_
.push_back(
new
ESPedestalClient
(ps));
38
}
39
40
if
(
find
(
enabledClients
.begin(),
enabledClients
.end(),
"Summary"
) !=
enabledClients
.end()) {
41
clients_
.push_back(
new
ESSummaryClient
(ps));
42
}
43
}
44
45
EcalPreshowerMonitorClient::~EcalPreshowerMonitorClient
() {
46
if
(
verbose_
)
47
std::cout
<<
"Finish EcalPreshowerMonitorClient"
<< std::endl;
48
49
for
(
unsigned
int
i
= 0;
i
<
clients_
.size();
i
++) {
50
delete
clients_
[
i
];
51
}
52
}
53
54
/*static*/
55
void
EcalPreshowerMonitorClient::fillDescriptions
(
edm::ConfigurationDescriptions
&_descs) {
56
edm::ParameterSetDescription
desc
;
57
58
std::vector<std::string> clientsDefault;
59
clientsDefault.push_back(
"Integrity"
);
60
clientsDefault.push_back(
"Pedestal"
);
61
clientsDefault.push_back(
"Summary"
);
62
desc
.addUntracked<std::vector<std::string>>(
"enabledClients"
, clientsDefault);
63
desc
.addUntracked<
edm::FileInPath
>(
"LookupTable"
);
64
desc
.addUntracked<
std::string
>(
"prefixME"
,
"EcalPreshower"
);
65
desc
.addUntracked<
bool
>(
"fitPedestal"
,
true
);
66
desc
.addUntracked<
bool
>(
"cloneME"
,
true
);
67
desc
.addUntracked<
bool
>(
"verbose"
,
false
);
68
desc
.addUntracked<
bool
>(
"debug"
,
false
);
69
70
_descs.
addDefault
(
desc
);
71
}
72
73
void
EcalPreshowerMonitorClient::dqmEndJob
(
DQMStore::IBooker
&_ibooker,
DQMStore::IGetter
&_igetter) {
74
if
(
debug_
) {
75
std::cout
<<
"EcalPreshowerMonitorClient: endJob"
<< std::endl;
76
}
77
78
for
(
unsigned
int
i
= 0;
i
<
clients_
.size();
i
++) {
79
clients_
[
i
]->setup(_ibooker);
80
clients_
[
i
]->endJobAnalyze(_igetter);
81
}
82
}
83
84
void
EcalPreshowerMonitorClient::dqmEndLuminosityBlock
(
DQMStore::IBooker
&_ibooker,
85
DQMStore::IGetter
&_igetter,
86
const
edm::LuminosityBlock
&,
87
const
edm::EventSetup
&) {
88
for
(
unsigned
int
i
= 0;
i
<
clients_
.size();
i
++) {
89
clients_
[
i
]->setup(_ibooker);
90
clients_
[
i
]->endLumiAnalyze(_igetter);
91
}
92
}
93
94
// define this as a plug-in
95
DEFINE_FWK_MODULE
(
EcalPreshowerMonitorClient
);
EcalPreshowerMonitorClient::~EcalPreshowerMonitorClient
~EcalPreshowerMonitorClient() override
Definition:
EcalPreshowerMonitorClient.cc:45
ConfigurationDescriptions.h
electrons_cff.bool
bool
Definition:
electrons_cff.py:393
mps_fire.i
i
Definition:
mps_fire.py:428
EcalPreshowerMonitorClient::verbose_
bool verbose_
Definition:
EcalPreshowerMonitorClient.h:24
edm::LuminosityBlock
Definition:
LuminosityBlock.h:50
EcalPreshowerMonitorClient::dqmEndLuminosityBlock
void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, const edm::LuminosityBlock &, const edm::EventSetup &) override
Definition:
EcalPreshowerMonitorClient.cc:84
ESClient.h
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
EcalPreshowerMonitorClient::dqmEndJob
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
Definition:
EcalPreshowerMonitorClient.cc:73
EcalPreshowerMonitorClient.h
ESIntegrityClient.h
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition:
FindCaloHit.cc:19
ESSummaryClient.h
EcalPreshowerMonitorClient::debug_
bool debug_
Definition:
EcalPreshowerMonitorClient.h:23
edm::FileInPath
Definition:
FileInPath.h:64
MakerMacros.h
EcalPreshowerLocalMonitorClient_cfi.enabledClients
enabledClients
Definition:
EcalPreshowerLocalMonitorClient_cfi.py:6
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
EcalPreshowerMonitorClient
Definition:
EcalPreshowerMonitorClient.h:8
ParameterSetDescription.h
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
ESPedestalClient
Definition:
ESPedestalClient.h:14
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition:
ParameterSet.h:47
EcalPreshowerMonitorClient::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &)
Definition:
EcalPreshowerMonitorClient.cc:55
EcalPreshowerMonitorClient::clients_
std::vector< ESClient * > clients_
Definition:
EcalPreshowerMonitorClient.h:26
edm::EventSetup
Definition:
EventSetup.h:57
submitPVResolutionJobs.desc
string desc
Definition:
submitPVResolutionJobs.py:251
dqm::implementation::IGetter
Definition:
DQMStore.h:484
dqm::implementation::IBooker
Definition:
DQMStore.h:43
ESPedestalClient.h
ParameterSet.h
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition:
ConfigurationDescriptions.cc:99
EcalPreshowerMonitorClient::EcalPreshowerMonitorClient
EcalPreshowerMonitorClient(const edm::ParameterSet &)
Definition:
EcalPreshowerMonitorClient.cc:19
ESIntegrityClient
Definition:
ESIntegrityClient.h:9
ESSummaryClient
Definition:
ESSummaryClient.h:6
Generated for CMSSW Reference Manual by
1.8.16