25 :
nevents(0), neventsPrev(0), prevNLumiSegs(0), prevTotalPerc(0), hSystFractionVsLS(
nullptr) {
26 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest") <<
"[DTBlockedROChannelsTest]: Constructor";
37 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
38 <<
"DataIntegrityTest: analyzed " <<
nupdates <<
" updates";
50 bool tenDDU = !
mapping->
readOutToGeometry(779, 7, 1, 1, 1, dummy, dummy, dummy, dummy, dummy, dummy);
54 for (
int mapSlot = 1; mapSlot != 13; ++mapSlot) {
59 if (crate == 1370 && mapSlot > 5)
61 if ((mapSlot == 5 || mapSlot == 11) &&
link > 11)
68 int dduId =
theDDU(crate, mapSlot,
link, tenDDU);
83 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
84 <<
"[DTLinkBinsMap] FED: " << crate <<
"mapSlot: " << mapSlot <<
" Link: " <<
link 85 <<
" not in the mapping!" << endl;
95 for (
int ros = 1; ros != 13; ++ros) {
96 for (
int rob = 1; rob != 26; ++rob) {
100 if (!
mapping->
readOutToGeometry(dduId, ros, rob - 1, 0, 2, wheel, station, sector, dummy, dummy, dummy) ||
101 !
mapping->
readOutToGeometry(dduId, ros, rob - 1, 0, 16, wheel, station, sector, dummy, dummy, dummy)) {
109 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
110 <<
"[DTRobBinsMap] FED: " << dduId <<
" ROS " << ros <<
" ROB: " << rob - 1 <<
" not in the mapping!" 117 for (map<DTChamberId, DTRobBinsMap>::iterator chAndRobs =
chamberMap.begin(); chAndRobs !=
chamberMap.end();
119 chAndRobs->second.init(
false);
135 summaryHisto = ibooker.
book2D(
"ROChannelSummary",
"Summary Blocked RO Channels", 12, 1, 13, 5, -2, 3);
140 stringstream namestream;
141 namestream <<
"ROChannelSummary_W" <<
wheel;
142 stringstream titlestream;
143 titlestream <<
"Blocked RO Channels (Wh " << wheel <<
")";
144 wheelHistos[
wheel] = ibooker.
book2D(namestream.str().c_str(), titlestream.str().c_str(), 12, 1, 13, 4, 1, 5);
178 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
179 <<
"[DTBlockedROChannelsTest]: End of LS " <<
nLumiSegs 180 <<
". Client called in online mode, performing client operations";
190 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
191 <<
"[DTBlockedROChannelsTest] endRun called. Client called in offline mode, performing operations.";
203 if (procEvt !=
nullptr) {
206 neventsPrev = procEvents;
224 for (map<DTChamberId, DTLinkBinsMap>::iterator chAndLinks =
chamberMapUros.begin();
229 int sectorForPlot = chId.
sector();
230 if (sectorForPlot == 13 || (sectorForPlot == 4 && chId.
station() == 4)) {
233 }
else if (sectorForPlot == 14 || (sectorForPlot == 10 && chId.
station() == 4)) {
239 double chPercent = (*chAndLinks).second.getChamberPercentage(igetter);
241 totalPerc += chPercent * scale * 1. /
250 for (map<DTChamberId, DTRobBinsMap>::iterator chAndRobs =
chamberMap.begin(); chAndRobs !=
chamberMap.end();
254 int sectorForPlot = chId.
sector();
255 if (sectorForPlot == 13 || (sectorForPlot == 4 && chId.
station() == 4)) {
258 }
else if (sectorForPlot == 14 || (sectorForPlot == 10 && chId.
station() == 4)) {
264 double chPercent = (*chAndRobs).second.getChamberPercentage(igetter);
266 totalPerc += chPercent * scale * 1. /
284 return mapping->
readOutToGeometry(dduId, ros, rob, 2, 2, wheel, station, sector, dummy, dummy, dummy);
288 : rosBin(ros), init_(
true), rosValue(0) {
292 mename <<
"DT/00-DataIntegrity/FED" << fed <<
"/ROS" << ros <<
"/FED" << fed <<
"_ROS" << ros <<
"_ROSError";
296 whname <<
"DT/00-DataIntegrity/FED" << fed <<
"/FED" << fed <<
"_ROSStatus";
333 LogWarning(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
334 <<
"[DTRobBinsMap]***Error: ROB: " << robBin <<
" is not valid" << endl;
349 int nChangedROBs = 0;
363 return 1. - ((double)nChangedROBs / (
double)
robsAndValues.size());
380 int wheel = (ddu - 770) % 5 - 2;
383 urosHName =
"DT/00-DataIntegrity/Wheel" + to_string(wheel) +
"/ROS" + to_string(ros) +
"/W" + to_string(wheel) +
384 "_ROS" + to_string(ros) +
"_ROSError";
409 LogWarning(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
410 <<
"[DTLinkBinsMap]***Error: Link: " << linkBin <<
" is not valid" << endl;
424 int nChangedLinks = 0;
431 return 1. - ((double)nChangedLinks / (
double)
linksAndValues.size());
445 int ros =
theROS(slot, link);
469 if (ros > 6 && tenDDU && ddu < 775)
479 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
std::map< int, int > linksAndValues
void accumulateValueTimeSlot(float value)
const MonitorElement * meuROS
std::map< DTChamberId, DTLinkBinsMap > chamberMapUros
bool linkChanged(int linkBin)
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
void setCurrentFolder(std::string const &fullpath)
virtual int64_t getIntValue() const
int theROS(int slot, int link)
void fillChamberMap(DQMStore::IGetter &igetter, const edm::EventSetup &c)
const MonitorElement * meROS
virtual void Reset()
reset ME (ie. contents, errors, etc)
#define DEFINE_FWK_MODULE(type)
void addRobBin(int robBin)
DTBlockedROChannelsTest(const edm::ParameterSet &ps)
Constructor.
void readNewValues(DQMStore::IGetter &igetter)
int getValueRobBin(int robBin) const
const MonitorElement * meDDU
virtual double getBinContent(int binx) const
get content of bin (1-D)
void addLinkBin(int linkBin)
edm::ESHandle< DTReadOutMapping > mapping
int getValueLinkBin(int linkBin) const
std::map< int, int > robsAndValues
void readNewValues(DQMStore::IGetter &igetter)
LuminosityBlockNumber_t luminosityBlock() const
int theDDU(int crate, int slot, int link, bool tenDDU)
void updateTimeSlot(int ls, int nEventsInLS)
bool robChanged(int robBin)
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
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.
int station() const
Return the station number.
MonitorElement * get(std::string const &path)
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)