diff --git a/DQM/DTMonitorClient/src/DTBlockedROChannelsTest.cc b/DQM/DTMonitorClient/src/DTBlockedROChannelsTest.cc index 7f93db1808767..ea8c9801018da 100644 --- a/DQM/DTMonitorClient/src/DTBlockedROChannelsTest.cc +++ b/DQM/DTMonitorClient/src/DTBlockedROChannelsTest.cc @@ -154,7 +154,8 @@ void DTBlockedROChannelsTest::dqmEndLuminosityBlock(DQMStore::IBooker& ibooker, } if (!offlineMode) { - hSystFractionVsLS = new DTTimeEvolutionHisto(ibooker, "EnabledROChannelsVsLS", "% RO channels", 500, 5, true, 3); + hSystFractionVsLS = + new DTTimeEvolutionHisto(ibooker, "EnabledROChannelsVsLS", "Fraction of RO channels", 500, 5, true, 3); } } // end attempt to make these bookings only once! diff --git a/DQM/DTMonitorClient/src/DTLocalTriggerTest.cc b/DQM/DTMonitorClient/src/DTLocalTriggerTest.cc index b516fa15dc27f..bdf478dcb6c2f 100644 --- a/DQM/DTMonitorClient/src/DTLocalTriggerTest.cc +++ b/DQM/DTMonitorClient/src/DTLocalTriggerTest.cc @@ -149,8 +149,15 @@ void DTLocalTriggerTest::runClientDiagnostic(DQMStore::IBooker& ibooker, DQMStor delete BXHH; delete Flag1st; - corrFrac = besttrigsCorr / besttrigs; - secondFrac = trigsFlag2nd / trigs; + if (besttrigs != 0) + corrFrac = besttrigsCorr / besttrigs; + else + corrFrac = 1; + if (trigs != 0) + secondFrac = trigsFlag2nd / trigs; + else + secondFrac = 0; + if (corrFrac < parameters.getUntrackedParameter("corrFracError", .5)) { corrSummary = 2; } else if (corrFrac < parameters.getUntrackedParameter("corrFracWarning", .6)) { diff --git a/DQM/DTMonitorModule/interface/DTTimeEvolutionHisto.h b/DQM/DTMonitorModule/interface/DTTimeEvolutionHisto.h index 53c26f34b3ed5..4e8dc15f8754b 100644 --- a/DQM/DTMonitorModule/interface/DTTimeEvolutionHisto.h +++ b/DQM/DTMonitorModule/interface/DTTimeEvolutionHisto.h @@ -73,6 +73,7 @@ class DTTimeEvolutionHisto { int nBookedBins; int theMode; MonitorElement* histo; + int binLabelCounter; }; #endif diff --git a/DQM/DTMonitorModule/src/DTTimeEvolutionHisto.cc b/DQM/DTMonitorModule/src/DTTimeEvolutionHisto.cc index 04ecfc0a9ded7..a198fc78b34eb 100644 --- a/DQM/DTMonitorModule/src/DTTimeEvolutionHisto.cc +++ b/DQM/DTMonitorModule/src/DTTimeEvolutionHisto.cc @@ -35,6 +35,7 @@ DTTimeEvolutionHisto::DTTimeEvolutionHisto(DQMStore::IBooker& ibooker, : valueLastTimeSlot(0), theFirstLS(firstLS), theLSPrescale(lsPrescale), doSlide(sliding), theMode(mode) { // set the number of bins to be booked nBookedBins = nbins; + binLabelCounter = -1; if (sliding) nBookedBins++; if (!sliding && theMode == 0) @@ -96,7 +97,8 @@ void DTTimeEvolutionHisto::setTimeSlotValue(float value, int timeSlot) { } else if (bin != nBookedBins) { histo->setBinContent(bin, histo->getBinContent(bin + 1)); histo->setBinError(bin, histo->getBinError(bin + 1)); - histo->setBinLabel(bin, histo->getTH1F()->GetXaxis()->GetBinLabel(bin + 1), 1); + histo->setBinLabel(bin, histo->getTH1F()->GetXaxis()->GetBinLabel(bin + 1), 1); //slide to left + histo->setBinLabel(bin + 1, "", 1); //delete old label to avoid duplication } } histo->setBinContent(nBookedBins, value); @@ -158,11 +160,15 @@ void DTTimeEvolutionHisto::updateTimeSlot(int ls, int nEventsInLS) { // set the bin label stringstream binLabel; binLabel << "LS " << firstLSinTimeSlot; - if (nEventsInLastTimeSlot.size() > 1) + if (nEventsInLastTimeSlot.size() > 1) { binLabel << "-" << lastLSinTimeSlot; + binLabelCounter++; + } - //if(lastLSinTimeSlot%(3*(int)theLSPrescale)==0) - histo->setBinLabel(nBookedBins, binLabel.str(), 1); + // Set only labels which can be seen in the plot without zooming + if (binLabelCounter % ((int)(nBookedBins / 25)) == 0) //around 25 labels fit in a full size hist + histo->setBinLabel(nBookedBins, binLabel.str(), 1); + //first label, LS=1 ideally, is guaranteed by setting binLabelCounter=-1 in constructor // reset the counters for the time slot nEventsInLastTimeSlot.clear();