33 "file",
edm::FileInPath(
"CalibTracker/SiStripCommon/data/SiStripDetInfo.dat"))},
34 MEDir_{iConfig.getUntrackedParameter<
std::string>(
"ME_DIR",
"DQMData")} {
35 edm::LogInfo(
"SiStripPedestalsDQMService") <<
"[SiStripPedestalsDQMService::SiStripPedestalsDQMService]";
39 edm::LogInfo(
"SiStripPedestalsDQMService") <<
"[SiStripPedestalsDQMService::~SiStripPedestalsDQMService]";
43 std::cout <<
"SiStripPedestalsDQMService::readPedestals" << std::endl;
52 uint32_t stripsPerApv = 128;
60 MEs.erase(std::remove_if(
MEs.begin(),
63 return std::string::npos ==
ME->getName().find(
"PedsPerStrip__det__");
68 for (
const auto& detInfo :
reader.getAllData()) {
75 std::string MEname(
"PedsPerStrip__det__" + std::to_string(detInfo.first));
77 if (ime->getName() == MEname) {
87 TH1F*
histo = mE->getTH1F();
90 uint32_t nBinsX =
histo->GetXaxis()->GetNbins();
92 if (nBinsX != stripsPerApv * (detInfo.second.nApvs)) {
93 std::cout <<
"ERROR: number of bin = " << nBinsX
94 <<
" != number of strips = " << stripsPerApv * (detInfo.second.nApvs) << std::endl;
99 for (uint32_t iBin = 1; iBin <= nBinsX; ++iBin) {
107 std::cout <<
"ERROR: ME = " << mE << std::endl;
110 if (theSiStripVector.empty()) {
111 for (
unsigned short j = 0;
j < 128 * detInfo.second.nApvs; ++
j) {
116 if (!
m_obj.
put(detInfo.first, theSiStripVector))
117 edm::LogError(
"SiStripPedestalsFakeESSource::produce ") <<
" detid already exists" << std::endl;