29 hSystFractionVsLS(nullptr) {
30 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest") <<
"[DTBlockedROChannelsTest]: Constructor";
41 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
42 <<
"DataIntegrityTest: analyzed " <<
nupdates <<
" updates";
54 bool tenDDU = !
mapping->
readOutToGeometry(779, 7, 1, 1, 1,
dummy,
dummy,
dummy,
dummy,
dummy,
dummy);
58 for (
int mapSlot = 1; mapSlot != 13; ++mapSlot) {
59 for (
int link = 0; link != 72; ++link) {
63 if (crate == 1370 && mapSlot > 5)
65 if ((mapSlot == 5 || mapSlot == 11) && link > 11)
72 int dduId =
theDDU(crate, mapSlot, link, tenDDU);
73 int ros =
theROS(mapSlot, link);
74 int rob =
theROB(mapSlot, link);
87 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
88 <<
"[DTLinkBinsMap] FED: " << crate <<
"mapSlot: " << mapSlot <<
" Link: " << link
89 <<
" not in the mapping!" << endl;
99 for (
int ros = 1; ros != 13; ++ros) {
100 for (
int rob = 1; rob != 26; ++rob) {
104 if (!
mapping->
readOutToGeometry(dduId, ros, rob - 1, 0, 2,
wheel,
station,
sector,
dummy,
dummy,
dummy) ||
105 !
mapping->
readOutToGeometry(dduId, ros, rob - 1, 0, 16,
wheel,
station,
sector,
dummy,
dummy,
dummy)) {
113 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
114 <<
"[DTRobBinsMap] FED: " << dduId <<
" ROS " << ros <<
" ROB: " << rob - 1 <<
" not in the mapping!" 121 for (map<DTChamberId, DTRobBinsMap>::iterator chAndRobs =
chamberMap.begin(); chAndRobs !=
chamberMap.end();
123 chAndRobs->second.init(
false);
139 summaryHisto = ibooker.
book2D(
"ROChannelSummary",
"Summary Blocked RO Channels", 12, 1, 13, 5, -2, 3);
144 stringstream namestream;
145 namestream <<
"ROChannelSummary_W" <<
wheel;
146 stringstream titlestream;
147 titlestream <<
"Blocked RO Channels (Wh " <<
wheel <<
")";
148 wheelHistos[
wheel] = ibooker.
book2D(namestream.str().c_str(), titlestream.str().c_str(), 12, 1, 13, 4, 1, 5);
182 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
183 <<
"[DTBlockedROChannelsTest]: End of LS " <<
nLumiSegs 184 <<
". Client called in online mode, performing client operations";
194 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
195 <<
"[DTBlockedROChannelsTest] endRun called. Client called in offline mode, performing operations.";
207 if (procEvt !=
nullptr) {
228 for (map<DTChamberId, DTLinkBinsMap>::iterator chAndLinks =
chamberMapUros.begin();
233 int sectorForPlot = chId.
sector();
234 if (sectorForPlot == 13 || (sectorForPlot == 4 && chId.
station() == 4)) {
237 }
else if (sectorForPlot == 14 || (sectorForPlot == 10 && chId.
station() == 4)) {
243 double chPercent = (*chAndLinks).second.getChamberPercentage(igetter);
245 totalPerc += chPercent *
scale * 1. /
254 for (map<DTChamberId, DTRobBinsMap>::iterator chAndRobs =
chamberMap.begin(); chAndRobs !=
chamberMap.end();
258 int sectorForPlot = chId.
sector();
259 if (sectorForPlot == 13 || (sectorForPlot == 4 && chId.
station() == 4)) {
262 }
else if (sectorForPlot == 14 || (sectorForPlot == 10 && chId.
station() == 4)) {
268 double chPercent = (*chAndRobs).second.getChamberPercentage(igetter);
270 totalPerc += chPercent *
scale * 1. /
288 return mapping->
readOutToGeometry(dduId, ros, rob, 2, 2,
wheel,
station,
sector,
dummy,
dummy,
dummy);
292 : rosBin(ros), init_(
true), rosValue(0) {
296 mename <<
"DT/00-DataIntegrity/FED" << fed <<
"/ROS" << ros <<
"/FED" << fed <<
"_ROS" << ros <<
"_ROSError";
300 whname <<
"DT/00-DataIntegrity/FED" << fed <<
"/FED" << fed <<
"_ROSStatus";
319 value += (
int)meROS->getBinContent(9, robBin);
320 value += (
int)meROS->getBinContent(11, robBin);
328 value += (
int)meDDU->getBinContent(2, rosBin);
329 value += (
int)meDDU->getBinContent(10, rosBin);
336 if (robsAndValues.find(robBin) == robsAndValues.end()) {
337 LogWarning(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
338 <<
"[DTRobBinsMap]***Error: ROB: " << robBin <<
" is not valid" << endl;
342 int newValue = getValueRobBin(robBin);
343 if (newValue > robsAndValues[robBin]) {
344 robsAndValues[robBin] = newValue;
351 meROS = igetter.
get(rosHName);
352 meDDU = igetter.
get(dduHName);
353 int nChangedROBs = 0;
356 int newValue = getValueRos();
357 if (newValue > rosValue) {
362 for (map<int, int>::const_iterator robAndValue = robsAndValues.begin(); robAndValue != robsAndValues.end();
364 if (robChanged((*robAndValue).first))
367 return 1. - ((double)nChangedROBs / (
double)robsAndValues.size());
371 meROS = igetter.
get(rosHName);
372 meDDU = igetter.
get(dduHName);
374 rosValue = getValueRos();
375 for (map<int, int>::const_iterator robAndValue = robsAndValues.begin(); robAndValue != robsAndValues.end();
377 robChanged((*robAndValue).first);
384 int wheel = (ddu - 770) % 5 - 2;
388 "_Sector" +
to_string(ros) +
"_ROSError";
397 linksAndValues[linkBin] = getValueLinkBin(linkBin);
405 value += (
int)meuROS->getBinContent(5, linkBin);
412 if (linksAndValues.find(linkBin) == linksAndValues.end()) {
413 LogWarning(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
414 <<
"[DTLinkBinsMap]***Error: Link: " << linkBin <<
" is not valid" << endl;
418 int newValue = getValueLinkBin(linkBin);
419 if (newValue > linksAndValues[linkBin]) {
420 linksAndValues[linkBin] = newValue;
427 meuROS = igetter.
get(urosHName);
428 int nChangedLinks = 0;
430 for (map<int, int>::const_iterator linkAndValue = linksAndValues.begin(); linkAndValue != linksAndValues.end();
432 if (linkChanged((*linkAndValue).first))
435 return 1. - ((double)nChangedLinks / (
double)linksAndValues.size());
439 meuROS = igetter.
get(urosHName);
441 for (map<int, int>::const_iterator linkAndValue = linksAndValues.begin(); linkAndValue != linksAndValues.end();
443 linkChanged((*linkAndValue).first);
449 int ros =
theROS(slot, link);
473 if (ros > 6 && tenDDU && ddu < 775)
483 int ros = (link / 24) + 3 * (slot % 6) - 2;
int readOutToGeometry(int dduId, int rosId, int robId, int tdcId, int channelId, DTWireId &wireId) const
transform identifiers
int station() const
Return the station number.
LuminosityBlockNumber_t luminosityBlock() const
int theROB(int slot, int link)
DTTimeEvolutionHisto * hSystFractionVsLS
void accumulateValueTimeSlot(float value)
const MonitorElement * meuROS
std::map< DTChamberId, DTLinkBinsMap > chamberMapUros
bool linkChanged(int linkBin)
virtual void setCurrentFolder(std::string const &fullpath)
std::map< int, MonitorElement * > wheelHistos
void performClientDiagnostic(DQMStore::IGetter &igetter)
DQM Client operations.
void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
DQM Client Diagnostic in online mode.
std::map< DTChamberId, DTRobBinsMap > chamberMap
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
int theROS(int slot, int link)
std::string to_string(const V &value)
void fillChamberMap(DQMStore::IGetter &igetter, const edm::EventSetup &c)
T getUntrackedParameter(std::string const &, T const &) const
const MonitorElement * meROS
virtual void Reset()
Remove all data from the ME, keept the empty histogram with all its settings.
void addRobBin(int robBin)
edm::ESGetToken< DTReadOutMapping, DTReadOutMappingRcd > mappingToken_
DTBlockedROChannelsTest(const edm::ParameterSet &ps)
Constructor.
void readNewValues(DQMStore::IGetter &igetter)
const MonitorElement * meDDU
const DTReadOutMapping * mapping
#define DEFINE_FWK_MODULE(type)
int getValueRobBin(int robBin) const
void addLinkBin(int linkBin)
void readNewValues(DQMStore::IGetter &igetter)
int getValueLinkBin(int linkBin) const
LuminosityBlockID id() const
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
int theDDU(int crate, int slot, int link, bool tenDDU)
void updateTimeSlot(int ls, int nEventsInLS)
virtual MonitorElement * get(std::string const &fullpath) const
bool robChanged(int robBin)
int wheel() const
Return the wheel number.
int readOutToGeometry(int dduId, int rosNumber, int robNumber, int &wheel, int &station, int §or)
double getChamberPercentage(DQMStore::IGetter &)
void beginRun(const edm::Run &, const edm::EventSetup &) override
BeginRun.
Log< level::Warning, false > LogWarning
MonitorElement * summaryHisto
~DTBlockedROChannelsTest() override
Destructor.
double getChamberPercentage(DQMStore::IGetter &)
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
virtual int64_t getIntValue() const