CondTools
SiStrip
plugins
SiStripPedestalsReader.cc
Go to the documentation of this file.
1
#include "
CondTools/SiStrip/plugins/SiStripPedestalsReader.h
"
2
3
using namespace
std
;
4
using namespace
cms
;
5
6
SiStripPedestalsReader::SiStripPedestalsReader
(
const
edm::ParameterSet
& iConfig)
7
: printdebug_(iConfig.getUntrackedParameter<uint32_t>(
"printDebug"
, 1)), pedestalsToken_(esConsumes()) {}
8
9
SiStripPedestalsReader::~SiStripPedestalsReader
() {}
10
11
void
SiStripPedestalsReader::analyze
(
const
edm::Event
&
e
,
const
edm::EventSetup
& iSetup) {
12
const
auto
& pedestals = iSetup.
getData
(
pedestalsToken_
);
13
edm::LogInfo
(
"SiStripPedestalsReader"
) <<
"[SiStripPedestalsReader::analyze] End Reading SiStripPedestals"
14
<< std::endl;
15
16
std::vector<uint32_t> detid;
17
pedestals.getDetIds(detid);
18
edm::LogInfo
(
"Number of detids "
) << detid.size() << std::endl;
19
20
if
(
printdebug_
)
21
for
(
size_t
id
= 0;
id
< detid.size() &&
id
<
printdebug_
;
id
++) {
22
SiStripPedestals::Range
range
= pedestals.getRange(detid[
id
]);
23
24
int
strip
= 0;
25
for
(
int
it = 0; it < (
range
.second -
range
.first) * 8 / 10; it++) {
26
edm::LogInfo
(
"SiStripPedestalsReader"
)
27
<<
"detid "
<< detid[
id
] <<
" \t"
28
<<
" strip "
<<
strip
++ <<
" \t"
<< pedestals.getPed(it,
range
) <<
" \t"
<< std::endl;
29
}
30
}
31
}
FastTimerService_cff.range
range
Definition:
FastTimerService_cff.py:34
SiStripPedestals::Range
std::pair< ContainerIterator, ContainerIterator > Range
Definition:
SiStripPedestals.h:51
SiStripPedestalsReader::SiStripPedestalsReader
SiStripPedestalsReader(const edm::ParameterSet &)
Definition:
SiStripPedestalsReader.cc:6
digitizers_cfi.strip
strip
Definition:
digitizers_cfi.py:19
edm::LogInfo
Log< level::Info, false > LogInfo
Definition:
MessageLogger.h:125
edm::ParameterSet
Definition:
ParameterSet.h:47
SiStripPedestalsReader::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition:
SiStripPedestalsReader.cc:11
edm::EventSetup
Definition:
EventSetup.h:57
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition:
EventSetup.h:120
SiStripPedestalsReader.h
std
Definition:
JetResolutionObject.h:76
SiStripPedestalsReader::~SiStripPedestalsReader
~SiStripPedestalsReader() override
Definition:
SiStripPedestalsReader.cc:9
triggerObjects_cff.id
id
Definition:
triggerObjects_cff.py:31
SiStripPedestalsReader::printdebug_
uint32_t printdebug_
Definition:
SiStripPedestalsReader.h:33
edm::Event
Definition:
Event.h:73
SiStripPedestalsReader::pedestalsToken_
edm::ESGetToken< SiStripPedestals, SiStripPedestalsRcd > pedestalsToken_
Definition:
SiStripPedestalsReader.h:34
cms
Namespace of DDCMS conversion namespace.
Definition:
ProducerAnalyzer.cc:21
MillePedeFileConverter_cfg.e
e
Definition:
MillePedeFileConverter_cfg.py:37
Generated for CMSSW Reference Manual by
1.8.16