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)) {}
8
9
SiStripPedestalsReader::~SiStripPedestalsReader
() {}
10
11
void
SiStripPedestalsReader::analyze
(
const
edm::Event
&
e
,
const
edm::EventSetup
& iSetup) {
12
edm::ESHandle<SiStripPedestals>
SiStripPedestals_;
13
iSetup.
get
<
SiStripPedestalsRcd
>().
get
(SiStripPedestals_);
14
edm::LogInfo
(
"SiStripPedestalsReader"
) <<
"[SiStripPedestalsReader::analyze] End Reading SiStripPedestals"
15
<< std::endl;
16
17
std::vector<uint32_t> detid;
18
SiStripPedestals_->
getDetIds
(detid);
19
edm::LogInfo
(
"Number of detids "
) << detid.size() << std::endl;
20
21
if
(
printdebug_
)
22
for
(
size_t
id
= 0;
id
< detid.size() &&
id
<
printdebug_
;
id
++) {
23
SiStripPedestals::Range
range
= SiStripPedestals_->
getRange
(detid[
id
]);
24
25
int
strip
= 0;
26
for
(
int
it = 0; it < (
range
.second -
range
.first) * 8 / 10; it++) {
27
edm::LogInfo
(
"SiStripPedestalsReader"
)
28
<<
"detid "
<< detid[
id
] <<
" \t"
29
<<
" strip "
<<
strip
++ <<
" \t"
<< SiStripPedestals_->
getPed
(it,
range
) <<
" \t"
<< std::endl;
30
}
31
}
32
}
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
SiStripPedestals::getDetIds
void getDetIds(std::vector< uint32_t > &DetIds_) const
Definition:
SiStripPedestals.cc:38
digitizers_cfi.strip
strip
Definition:
digitizers_cfi.py:19
edm::LogInfo
Definition:
MessageLogger.h:254
SiStripPedestalsRcd
Definition:
SiStripCondDataRecords.h:44
edm::EventSetup::get
T get() const
Definition:
EventSetup.h:73
edm::ESHandle< SiStripPedestals >
SiStripPedestals::getRange
const Range getRange(const uint32_t &detID) const
Definition:
SiStripPedestals.cc:28
edm::ParameterSet
Definition:
ParameterSet.h:36
SiStripPedestalsReader::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition:
SiStripPedestalsReader.cc:11
edm::EventSetup
Definition:
EventSetup.h:57
get
#define get
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
SiStripPedestals::getPed
float getPed(const uint16_t &strip, const Range &range) const
Definition:
SiStripPedestals.cc:51
edm::Event
Definition:
Event.h:73
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