CondTools
RPC
src
RPCStripNoisesRcdRead.cc
Go to the documentation of this file.
1
#include <string>
2
#include <map>
3
#include <vector>
4
5
#include "
FWCore/Framework/interface/EventSetup.h
"
6
#include "
FWCore/Framework/interface/EDAnalyzer.h
"
7
#include "
FWCore/Framework/interface/MakerMacros.h
"
8
#include "
FWCore/Framework/interface/Event.h
"
9
#include "
FWCore/Framework/interface/ESHandle.h
"
10
#include "
CondTools/RPC/interface/RPCDBSimSetUp.h
"
11
#include "
DataFormats/MuonDetId/interface/RPCDetId.h
"
12
#include "
CondFormats/RPCObjects/interface/RPCStripNoises.h
"
13
#include "
CondFormats/DataRecord/interface/RPCStripNoisesRcd.h
"
14
15
class
RPCStripNoisesRcdRead
:
public
edm::EDAnalyzer
{
16
public
:
17
RPCStripNoisesRcdRead
(
const
edm::ParameterSet
& iConfig);
18
~RPCStripNoisesRcdRead
()
override
;
19
void
analyze
(
const
edm::Event
& evt,
const
edm::EventSetup
& evtSetup)
override
;
20
};
21
22
RPCStripNoisesRcdRead::RPCStripNoisesRcdRead
(
const
edm::ParameterSet
& iConfig) {}
23
24
RPCStripNoisesRcdRead::~RPCStripNoisesRcdRead
() {}
25
26
void
RPCStripNoisesRcdRead::analyze
(
const
edm::Event
& evt,
const
edm::EventSetup
& evtSetup) {
27
edm::ESHandle<RPCStripNoises>
noiseRcd;
28
evtSetup.
get
<
RPCStripNoisesRcd
>().
get
(noiseRcd);
29
edm::LogInfo
(
"RPCStripNoisesReader"
) <<
"[RPCStripNoisesReader::analyze] End Reading RPCStripNoises"
<< std::endl;
30
31
std::vector<RPCStripNoises::NoiseItem> vnoise = noiseRcd->
getVNoise
();
32
std::vector<float> vcls = noiseRcd->
getCls
();
33
34
for
(
unsigned
int
n
= 0;
n
< vcls.size(); ++
n
) {
35
std::cout
<<
"Cls Value: "
<< vcls[
n
] << std::endl;
36
}
37
38
int
i
= 1;
39
for
(std::vector<RPCStripNoises::NoiseItem>::iterator it = vnoise.begin(); it != vnoise.end(); ++it) {
40
if
(
i
% 96 == 0)
41
std::cout
<<
"DetId: "
<< it->dpid <<
" "
<< it->time <<
" "
<< std::endl;
42
std::cout
<<
" Noise Value: "
<< (it->noise) <<
" "
<< (it->eff) << std::endl;
43
i
++;
44
}
45
}
46
47
//define this as a plug-in
48
DEFINE_FWK_MODULE
(
RPCStripNoisesRcdRead
);
RPCStripNoises::getVNoise
std::vector< NoiseItem > const & getVNoise() const
Definition:
RPCStripNoises.h:24
mps_fire.i
i
Definition:
mps_fire.py:428
dqmiodumpmetadata.n
n
Definition:
dqmiodumpmetadata.py:28
ESHandle.h
RPCDBSimSetUp.h
RPCStripNoisesRcdRead::analyze
void analyze(const edm::Event &evt, const edm::EventSetup &evtSetup) override
Definition:
RPCStripNoisesRcdRead.cc:26
RPCStripNoisesRcd
Definition:
RPCStripNoisesRcd.h:24
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
RPCStripNoisesRcd.h
EDAnalyzer.h
edm::LogInfo
Log< level::Info, false > LogInfo
Definition:
MessageLogger.h:125
edm::EDAnalyzer
Definition:
EDAnalyzer.h:28
MakerMacros.h
RPCStripNoisesRcdRead
Definition:
RPCStripNoisesRcdRead.cc:15
edm::EventSetup::get
T get() const
Definition:
EventSetup.h:87
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
edm::ESHandle
Definition:
DTSurvey.h:22
RPCDetId.h
RPCStripNoises::getCls
std::vector< float > const & getCls() const
Definition:
RPCStripNoises.h:25
edm::ParameterSet
Definition:
ParameterSet.h:47
Event.h
edm::EventSetup
Definition:
EventSetup.h:58
get
#define get
RPCStripNoisesRcdRead::~RPCStripNoisesRcdRead
~RPCStripNoisesRcdRead() override
Definition:
RPCStripNoisesRcdRead.cc:24
RPCStripNoises.h
EventSetup.h
edm::Event
Definition:
Event.h:73
RPCStripNoisesRcdRead::RPCStripNoisesRcdRead
RPCStripNoisesRcdRead(const edm::ParameterSet &iConfig)
Definition:
RPCStripNoisesRcdRead.cc:22
Generated for CMSSW Reference Manual by
1.8.16