From 21e4730dd711ecef33c0b0313cd32403123d0860 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 2 Nov 2016 11:50:58 +0100 Subject: [PATCH 1/2] Temporary TProfile2D fix to prevent offline GUI crashes. --- DQM/EcalCommon/plugins/EcalMEFormatter.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/DQM/EcalCommon/plugins/EcalMEFormatter.cc b/DQM/EcalCommon/plugins/EcalMEFormatter.cc index 3ce2ef8f7daa1..87e35711445c7 100644 --- a/DQM/EcalCommon/plugins/EcalMEFormatter.cc +++ b/DQM/EcalCommon/plugins/EcalMEFormatter.cc @@ -74,10 +74,11 @@ EcalMEFormatter::formatDet2D_(ecaldqm::MESet& _meSet) int bin(prof->GetBin(iX, iY)); if(prof->GetBinEntries(bin) == 0.){ if(verbosity_ > 2) edm::LogInfo("EcalDQM") << "Found empty bin " << bin << " in histogram " << prof->GetName(); - // TEMPORARY SETUP UNTIL RENDERPLUGIN IS UPDATED TO DO THIS - // WHEN IT IS, SWITCH TO ENTRIES -1 CONTENT 0 - prof->SetBinEntries(bin, 1.); - prof->SetBinContent(bin, -std::numeric_limits::max()); + // To distinguish empty bins from bins filled with value 0 in offline DQM, set empty bins to a suitable default value instead + // Since several Timing MEs allow for negative values, choose a sufficiently large magnitude default value + // but not too large as to crash DQM GUI. + prof->SetBinEntries(bin, 1.); + prof->SetBinContent(bin,-999.); } } } From 1f0d42064ae60202cd1fe9d61c330e57fdb44577 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 2 Nov 2016 19:56:28 +0100 Subject: [PATCH 2/2] Remove empty TProfile2D bin formatting. --- DQM/EcalCommon/plugins/EcalMEFormatter.cc | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/DQM/EcalCommon/plugins/EcalMEFormatter.cc b/DQM/EcalCommon/plugins/EcalMEFormatter.cc index 87e35711445c7..473a00c6794f6 100644 --- a/DQM/EcalCommon/plugins/EcalMEFormatter.cc +++ b/DQM/EcalCommon/plugins/EcalMEFormatter.cc @@ -63,26 +63,7 @@ EcalMEFormatter::format_(DQMStore::IGetter& _igetter, bool _checkLumi) void EcalMEFormatter::formatDet2D_(ecaldqm::MESet& _meSet) { - if(_meSet.getKind() != MonitorElement::DQM_KIND_TPROFILE2D) return; - - MonitorElement* me(0); - unsigned iME(0); - while((me = _meSet.getME(iME++))){ - TProfile2D* prof(me->getTProfile2D()); - for(int iX(1); iX <= prof->GetNbinsX(); ++iX){ - for(int iY(1); iY <= prof->GetNbinsY(); ++iY){ - int bin(prof->GetBin(iX, iY)); - if(prof->GetBinEntries(bin) == 0.){ - if(verbosity_ > 2) edm::LogInfo("EcalDQM") << "Found empty bin " << bin << " in histogram " << prof->GetName(); - // To distinguish empty bins from bins filled with value 0 in offline DQM, set empty bins to a suitable default value instead - // Since several Timing MEs allow for negative values, choose a sufficiently large magnitude default value - // but not too large as to crash DQM GUI. - prof->SetBinEntries(bin, 1.); - prof->SetBinContent(bin,-999.); - } - } - } - } + return; } DEFINE_FWK_MODULE(EcalMEFormatter);