Skip to content

Commit

Permalink
Temporary TProfile2D fix to prevent offline GUI crashes.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbandrews committed Nov 2, 2016
1 parent f85785a commit 21e4730
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions DQM/EcalCommon/plugins/EcalMEFormatter.cc
Expand Up @@ -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<double>::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.);
}
}
}
Expand Down

0 comments on commit 21e4730

Please sign in to comment.