32 "file",
edm::FileInPath(
"CalibTracker/SiStripCommon/data/SiStripDetInfo.dat"))},
34 edm::LogInfo(
"SiStripNoisesDQMService") <<
"[SiStripNoisesDQMService::SiStripNoisesDQMService]";
38 edm::LogInfo(
"SiStripNoisesDQMService") <<
"[SiStripNoisesDQMService::~SiStripNoisesDQMService]";
42 std::cout <<
"SiStripNoisesDQMService::readNoises" << std::endl;
51 uint32_t stripsPerApv = 128;
59 MEs.erase(std::remove_if(MEs.begin(),
62 return std::string::npos ==
ME->getName().find(
"CMSubNoisePerStrip__det__");
67 for (
const auto& detInfo :
reader.getAllData()) {
74 std::string MEname(
"CMSubNoisePerStrip__det__" + std::to_string(detInfo.first));
76 if (ime->getName() == MEname) {
85 TH1F*
histo = mE->getTH1F();
86 if (histo !=
nullptr) {
88 uint32_t nBinsX = histo->GetXaxis()->GetNbins();
90 if (nBinsX != stripsPerApv * (detInfo.second.nApvs)) {
91 std::cout <<
"ERROR: number of bin = " << nBinsX
92 <<
" != number of strips = " << stripsPerApv * (detInfo.second.nApvs) << std::endl;
97 for (uint32_t iBin = 1; iBin <= nBinsX; ++iBin) {
99 m_obj.
setData(histo->GetBinContent(iBin), theSiStripVector);
102 std::cout <<
"ERROR: histo = " << histo << std::endl;
105 std::cout <<
"ERROR: ME = " << mE << std::endl;
108 if (theSiStripVector.empty()) {
109 for (
unsigned short j = 0;
j < 128 * detInfo.second.nApvs; ++
j) {
114 if (!
m_obj.
put(detInfo.first, theSiStripVector))
115 edm::LogError(
"SiStripNoisesFakeESSource::produce ") <<
" detid already exists" << std::endl;
T getUntrackedParameter(std::string const &, T const &) const
dqm::legacy::MonitorElement MonitorElement
std::vector< uint16_t > InputVector
dqm::legacy::DQMStore DQMStore
#define DEFINE_FWK_MODULE(type)
void dqmEndJob(DQMStore::IBooker &booker, DQMStore::IGetter &getter) override
bool put(const uint32_t &detID, const InputVector &input)
~SiStripPopConNoisesHandlerFromDQM() override
SiStripPopConNoisesHandlerFromDQM(const edm::ParameterSet &iConfig)
dqm::harvesting::MonitorElement ME
std::string fullPath() const
SiStripNoises * getObj() const override
void setData(float noise_, InputVector &vped)
std::vector< MonitorElement * > getAllContents(std::string const &path, uint32_t runNumber=0, uint32_t lumi=0)