34 MEDir_{iConfig.getUntrackedParameter<
std::string>(
"ME_DIR",
"DQMData")} {
35 edm::LogInfo(
"SiStripNoisesDQMService") <<
"[SiStripNoisesDQMService::SiStripNoisesDQMService]";
39 edm::LogInfo(
"SiStripNoisesDQMService") <<
"[SiStripNoisesDQMService::~SiStripNoisesDQMService]";
43 std::cout <<
"SiStripNoisesDQMService::readNoises" << std::endl;
52 uint32_t stripsPerApv = 128;
60 MEs.erase(std::remove_if(
MEs.begin(),
63 return std::string::npos ==
ME->getName().find(
"CMSubNoisePerStrip__det__");
68 for (
const auto& detInfo : detInfo.getAllData()) {
77 if (ime->getName() == MEname) {
86 TH1F*
histo = mE->getTH1F();
87 if (
histo !=
nullptr) {
89 uint32_t nBinsX =
histo->GetXaxis()->GetNbins();
91 if (nBinsX != stripsPerApv * (detInfo.second.nApvs)) {
92 std::cout <<
"ERROR: number of bin = " << nBinsX
93 <<
" != number of strips = " << stripsPerApv * (detInfo.second.nApvs) << std::endl;
98 for (uint32_t iBin = 1; iBin <= nBinsX; ++iBin) {
106 std::cout <<
"ERROR: ME = " << mE << std::endl;
109 if (theSiStripVector.empty()) {
110 for (
unsigned short j = 0;
j < 128 * detInfo.second.nApvs; ++
j) {
115 if (!
m_obj.
put(detInfo.first, theSiStripVector))
116 edm::LogError(
"SiStripNoisesFakeESSource::produce ") <<
" detid already exists" << std::endl;
std::string fullPath() const
dqm::legacy::MonitorElement MonitorElement
#define DEFINE_FWK_MODULE(type)
std::vector< uint16_t > InputVector
dqm::legacy::DQMStore DQMStore
std::string to_string(const V &value)
T getUntrackedParameter(std::string const &, T const &) const
void dqmEndJob(DQMStore::IBooker &booker, DQMStore::IGetter &getter) override
virtual std::vector< dqm::harvesting::MonitorElement * > getAllContents(std::string const &path) const
SiStripNoises * getObj() const override
SiStripDetInfo read(std::string filePath)
bool put(const uint32_t &detID, const InputVector &input)
Log< level::Info, false > LogInfo
~SiStripPopConNoisesHandlerFromDQM() override
SiStripPopConNoisesHandlerFromDQM(const edm::ParameterSet &iConfig, edm::ConsumesCollector &&)
dqm::harvesting::MonitorElement ME
static constexpr char const *const kDefaultFile
void setData(float noise_, InputVector &vped)