31 edm::LogInfo(
"SiStripNoisesDQMService") <<
"[SiStripNoisesDQMService::SiStripNoisesDQMService]";
36 edm::LogInfo(
"SiStripNoisesDQMService") <<
"[SiStripNoisesDQMService::~SiStripNoisesDQMService]";
41 std::cout <<
"SiStripNoisesDQMService::readNoises" << std::endl;
50 uint32_t stripsPerApv = 128;
58 MEs.erase(std::remove_if(MEs.begin(), MEs.end(),
60 return std::string::npos ==
ME->getName().find(
"CMSubNoisePerStrip__det__");
64 for (
const auto& detInfo :
reader.getAllData() ) {
73 std::string MEname(
"CMSubNoisePerStrip__det__"+std::to_string(detInfo.first));
75 if( ime->getName() == MEname ) {
84 TH1F*
histo = mE->getTH1F();
85 if( histo !=
nullptr ) {
87 uint32_t nBinsX = histo->GetXaxis()->GetNbins();
89 if( nBinsX != stripsPerApv*(detInfo.second.nApvs) ) {
90 std::cout <<
"ERROR: number of bin = " << nBinsX <<
" != number of strips = " << stripsPerApv*(detInfo.second.nApvs) << std::endl;
95 for( uint32_t iBin = 1; iBin <= nBinsX; ++iBin ) {
97 m_obj.
setData( histo->GetBinContent(iBin), theSiStripVector );
100 std::cout <<
"ERROR: histo = " << histo << std::endl;
103 std::cout <<
"ERROR: ME = " << mE << std::endl;
106 if( theSiStripVector.empty() ) {
107 for(
unsigned short j=0; j<128*detInfo.second.nApvs; ++j){
112 if ( !
m_obj.
put(detInfo.first, theSiStripVector) )
113 edm::LogError(
"SiStripNoisesFakeESSource::produce ")<<
" detid already exists"<<std::endl;
T getUntrackedParameter(std::string const &, T const &) const
std::vector< MonitorElement * > getAllContents(std::string const &path, uint32_t runNumber=0, uint32_t lumi=0)
std::vector< uint16_t > InputVector
#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)
std::string fullPath() const
SiStripNoises * getObj() const override
void setData(float noise_, InputVector &vped)