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)
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);
158 new DTTimeEvolutionHisto(ibooker,
"EnabledROChannelsVsLS",
"Fraction of RO channels", 500, 5,
true, 3);
183 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
184 <<
"[DTBlockedROChannelsTest]: End of LS " <<
nLumiSegs 185 <<
". Client called in online mode, performing client operations";
195 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
196 <<
"[DTBlockedROChannelsTest] endRun called. Client called in offline mode, performing operations.";
208 if (procEvt !=
nullptr) {
229 for (map<DTChamberId, DTLinkBinsMap>::iterator chAndLinks =
chamberMapUros.begin();
234 int sectorForPlot = chId.
sector();
235 if (sectorForPlot == 13 || (sectorForPlot == 4 && chId.
station() == 4)) {
238 }
else if (sectorForPlot == 14 || (sectorForPlot == 10 && chId.
station() == 4)) {
244 double chPercent = (*chAndLinks).second.getChamberPercentage(igetter);
246 totalPerc += chPercent *
scale * 1. /
255 for (map<DTChamberId, DTRobBinsMap>::iterator chAndRobs =
chamberMap.begin(); chAndRobs !=
chamberMap.end();
259 int sectorForPlot = chId.
sector();
260 if (sectorForPlot == 13 || (sectorForPlot == 4 && chId.
station() == 4)) {
263 }
else if (sectorForPlot == 14 || (sectorForPlot == 10 && chId.
station() == 4)) {
269 double chPercent = (*chAndRobs).second.getChamberPercentage(igetter);
271 totalPerc += chPercent *
scale * 1. /
289 return mapping->
readOutToGeometry(dduId, ros, rob, 2, 2,
wheel,
station,
sector,
dummy,
dummy,
dummy);
293 : rosBin(ros), init_(
true), rosValue(0) {
297 mename <<
"DT/00-DataIntegrity/FED" << fed <<
"/ROS" << ros <<
"/FED" << fed <<
"_ROS" << ros <<
"_ROSError";
301 whname <<
"DT/00-DataIntegrity/FED" << fed <<
"/FED" << fed <<
"_ROSStatus";
320 value += (
int)meROS->getBinContent(9, robBin);
321 value += (
int)meROS->getBinContent(11, robBin);
329 value += (
int)meDDU->getBinContent(2, rosBin);
330 value += (
int)meDDU->getBinContent(10, rosBin);
337 if (robsAndValues.find(robBin) == robsAndValues.end()) {
338 LogWarning(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
339 <<
"[DTRobBinsMap]***Error: ROB: " << robBin <<
" is not valid" << endl;
343 int newValue = getValueRobBin(robBin);
344 if (newValue > robsAndValues[robBin]) {
345 robsAndValues[robBin] = newValue;
352 meROS = igetter.
get(rosHName);
353 meDDU = igetter.
get(dduHName);
354 int nChangedROBs = 0;
357 int newValue = getValueRos();
358 if (newValue > rosValue) {
363 for (map<int, int>::const_iterator robAndValue = robsAndValues.begin(); robAndValue != robsAndValues.end();
365 if (robChanged((*robAndValue).first))
368 return 1. - ((double)nChangedROBs / (
double)robsAndValues.size());
372 meROS = igetter.
get(rosHName);
373 meDDU = igetter.
get(dduHName);
375 rosValue = getValueRos();
376 for (map<int, int>::const_iterator robAndValue = robsAndValues.begin(); robAndValue != robsAndValues.end();
378 robChanged((*robAndValue).first);
385 int wheel = (ddu - 770) % 5 - 2;
389 "_Sector" +
to_string(ros) +
"_ROSError";
398 linksAndValues[linkBin] = getValueLinkBin(linkBin);
406 value += (
int)meuROS->getBinContent(5, linkBin);
413 if (linksAndValues.find(linkBin) == linksAndValues.end()) {
414 LogWarning(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
415 <<
"[DTLinkBinsMap]***Error: Link: " << linkBin <<
" is not valid" << endl;
419 int newValue = getValueLinkBin(linkBin);
420 if (newValue > linksAndValues[linkBin]) {
421 linksAndValues[linkBin] = newValue;
428 meuROS = igetter.
get(urosHName);
429 int nChangedLinks = 0;
431 for (map<int, int>::const_iterator linkAndValue = linksAndValues.begin(); linkAndValue != linksAndValues.end();
433 if (linkChanged((*linkAndValue).first))
436 return 1. - ((double)nChangedLinks / (
double)linksAndValues.size());
440 meuROS = igetter.
get(urosHName);
442 for (map<int, int>::const_iterator linkAndValue = linksAndValues.begin(); linkAndValue != linksAndValues.end();
444 linkChanged((*linkAndValue).first);
474 if (ros > 6 && tenDDU && ddu < 775)
484 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)
void fillChamberMap(DQMStore::IGetter &igetter, const edm::EventSetup &c)
static std::string to_string(const XMLCh *ch)
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