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) {
63 if (crate == 1370 && mapSlot > 5)
65 if ((mapSlot == 5 || mapSlot == 11) &&
link > 11)
72 int dduId =
theDDU(crate, mapSlot,
link, tenDDU);
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);
143 for (
int wheel = -2; wheel != 3; ++wheel) {
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) {
210 neventsPrev = procEvents;
220 for (
int wheel = -2; wheel != 3; ++wheel) {
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;
387 urosHName =
"DT/00-DataIntegrity/Wheel" + to_string(wheel) +
"/ROS" + to_string(ros) +
"/W" + to_string(wheel) +
388 "_ROS" + 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;
LuminosityBlockID id() const
T getUntrackedParameter(std::string const &, T const &) 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.
int readOutToGeometry(int dduId, int rosId, int robId, int tdcId, int channelId, DTWireId &wireId) const
transform identifiers
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
#define DEFINE_FWK_MODULE(type)
virtual int64_t getIntValue() const
int theROS(int slot, int link)
void fillChamberMap(DQMStore::IGetter &igetter, const edm::EventSetup &c)
bool getData(T &iHolder) 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_
virtual MonitorElement * get(std::string const &fullpath) const
DTBlockedROChannelsTest(const edm::ParameterSet &ps)
Constructor.
void readNewValues(DQMStore::IGetter &igetter)
int getValueRobBin(int robBin) const
const MonitorElement * meDDU
const DTReadOutMapping * mapping
void addLinkBin(int linkBin)
int getValueLinkBin(int linkBin) const
void readNewValues(DQMStore::IGetter &igetter)
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
LuminosityBlockNumber_t luminosityBlock() const
int theDDU(int crate, int slot, int link, bool tenDDU)
void updateTimeSlot(int ls, int nEventsInLS)
bool robChanged(int robBin)
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
int station() const
Return the station number.
int wheel() const
Return the wheel number.
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)