36 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
37 <<
"[DTBlockedROChannelsTest]: Constructor";
48 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
49 <<
"DataIntegrityTest: analyzed " <<
nupdates <<
" updates";
56 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
57 <<
"[DTBlockedROChannelsTest]: BeginJob";
70 for(
int wheel = -2; wheel != 3; ++wheel) {
71 stringstream namestream; namestream <<
"ROChannelSummary_W" << wheel;
72 stringstream titlestream; titlestream <<
"Blocked RO Channels (Wh " << wheel <<
")";
73 wheelHitos[wheel] =
dbe->
book2D(namestream.str().c_str(),titlestream.str().c_str(),12,1,13,4,1,5);
97 for(
int ros = 1; ros != 13; ++ros) {
98 for(
int rob = 1; rob != 26; ++rob) {
103 if(!
mapping->readOutToGeometry(dduId,ros,rob-1,0,2,wheel,station,sector,dummy,dummy,dummy) ||
104 !
mapping->readOutToGeometry(dduId,ros,rob-1,0,16,wheel,station,sector,dummy,dummy,dummy)) {
112 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
113 <<
"[DTRobBinsMap] FED: " << dduId <<
" ROS " << ros <<
" ROB: " << rob-1
114 <<
" not in the mapping!" << endl;
120 for(map<DTChamberId, DTRobBinsMap>::iterator chAndRobs =
chamberMap.begin();
122 chAndRobs->second.init(
false);
130 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
131 <<
"[DTBlockedROChannelsTest]: Begin of LS transition";
151 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
152 <<
"[DTBlockedROChannelsTest]: "<<
nevents<<
" events";
165 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
166 <<
"[DTBlockedROChannelsTest]: End of LS " <<
nLumiSegs <<
". Client called in online mode, performing client operations";
184 neventsPrev = procEvents;
194 for(
int wheel = -2; wheel != 3; ++wheel) {
201 for(map<DTChamberId, DTRobBinsMap>::iterator chAndRobs =
chamberMap.begin();
205 int sectorForPlot = chId.
sector();
206 if(sectorForPlot == 13 || (sectorForPlot == 4 && chId.
station() ==4)) {
209 }
else if(sectorForPlot == 14 || (sectorForPlot == 10 && chId.
station() ==4)) {
215 double chPercent = (*chAndRobs).second.getChamberPercentage();
218 totalPerc += chPercent*scale*1./240.;
258 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
259 <<
"[DTBlockedROChannelsTest] endjob called!";
268 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
269 <<
"[DTBlockedROChannelsTest] endRun called. Client called in offline mode, performing operations.";
295 return mapping->readOutToGeometry(dduId,ros,2,2,2,wheel,dummy,sector,dummy,dummy,dummy);
309 stringstream mename; mename <<
"DT/00-DataIntegrity/FED" << fed <<
"/ROS" << ros
310 <<
"/FED" << fed <<
"_ROS" << ros <<
"_ROSError";
313 stringstream whname; whname <<
"DT/00-DataIntegrity/FED" << fed
314 <<
"/FED" << fed <<
"_ROSStatus";
333 robsAndValues[robBin] = getValueRobBin(robBin);
344 value += (int)meROS->getBinContent(9,robBin);
345 value += (int)meROS->getBinContent(11,robBin);
356 value += (int)meDDU->getBinContent(2,rosBin);
357 value += (int)meDDU->getBinContent(10,rosBin);
367 if(robsAndValues.find(robBin) == robsAndValues.end()) {
368 LogWarning(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
369 <<
"[DTRobBinsMap]***Error: ROB: " << robBin <<
" is not valid" << endl;
373 int newValue = getValueRobBin(robBin);
374 if(newValue > robsAndValues[robBin]) {
375 robsAndValues[robBin] = newValue;
385 meROS = theDbe->get(rosHName);
386 meDDU = theDbe->get(dduHName);
387 int nChangedROBs = 0;
390 int newValue = getValueRos();
391 if(newValue > rosValue) {
396 for(map<int, int>::const_iterator robAndValue = robsAndValues.begin();
397 robAndValue != robsAndValues.end(); ++robAndValue) {
398 if(robChanged((*robAndValue).first)) nChangedROBs++;
400 return 1.-((double)nChangedROBs/(
double)robsAndValues.size());
405 meROS = theDbe->get(rosHName);
406 meDDU = theDbe->get(dduHName);
408 rosValue = getValueRos();
409 for(map<int, int>::const_iterator robAndValue = robsAndValues.begin();
410 robAndValue != robsAndValues.end(); ++robAndValue) {
411 robChanged((*robAndValue).first);
LuminosityBlockID id() const
T getUntrackedParameter(std::string const &, T const &) const
double getChamberPercentage()
DTTimeEvolutionHisto * hSystFractionVsLS
~DTBlockedROChannelsTest()
Destructor.
void accumulateValueTimeSlot(float value)
void beginRun(const edm::Run &run, const edm::EventSetup &c)
BeginRun.
std::map< DTChamberId, DTRobBinsMap > chamberMap
#define DEFINE_FWK_MODULE(type)
std::map< int, MonitorElement * > wheelHitos
const MonitorElement * meROS
void addRobBin(int robBin)
DTBlockedROChannelsTest(const edm::ParameterSet &ps)
Constructor.
int getValueRobBin(int robBin) const
const MonitorElement * meDDU
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
int readOutToGeometry(int dduId, int rosNumber, int &wheel, int §or)
edm::ESHandle< DTReadOutMapping > mapping
int64_t getIntValue(void) const
LuminosityBlockNumber_t luminosityBlock() const
void updateTimeSlot(int ls, int nEventsInLS)
void analyze(const edm::Event &e, const edm::EventSetup &c)
Analyze.
bool robChanged(int robBin)
void performClientDiagnostic()
DQM Client operations.
void endLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &c)
DQM Client Diagnostic in online mode.
int station() const
Return the station number.
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
void endRun(edm::Run const &run, edm::EventSetup const &eSetup)
DQM Client Diagnostic in offline mode.
int wheel() const
Return the wheel number.
MonitorElement * summaryHisto
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void Reset(void)
reset ME (ie. contents, errors, etc)
void beginLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &context)
void setCurrentFolder(const std::string &fullpath)