Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avoid divide by zero in HCAL status word DQM histograms #25310

Merged
merged 1 commit into from Nov 22, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions DQMOffline/Hcal/src/HcalRecHitsDQMClient.cc
Expand Up @@ -54,6 +54,10 @@ void HcalRecHitsDQMClient::beginRun(const edm::Run& run, const edm::EventSetup&
nChannels_[3] = hoCells.size();
nChannels_[4] = hfCells.size();
nChannels_[0] = nChannels_[1] + nChannels_[2] + nChannels_[3] + nChannels_[4];
//avoid divide by zero
for(unsigned i = 0; i < 5; ++i){
if(nChannels_[i]==0) nChannels_[i] = 1;
}

//std::cout << "Channels HB:" << nChannels_[1] << " HE:" << nChannels_[2] << " HO:" << nChannels_[3] << " HF:" << nChannels_[4] << std::endl;

Expand Down