34 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
35 <<
"[DTBlockedROChannelsTest]: Constructor";
46 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
47 <<
"DataIntegrityTest: analyzed " <<
nupdates <<
" updates";
54 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
55 <<
"[DTBlockedROChannelsTest]: BeginJob";
68 for(
int wheel = -2; wheel != 3; ++wheel) {
69 stringstream namestream; namestream <<
"ROChannelSummary_W" << wheel;
70 stringstream titlestream; titlestream <<
"Blocked RO Channels (Wh " << wheel <<
")";
71 wheelHitos[wheel] =
dbe->
book2D(namestream.str().c_str(),titlestream.str().c_str(),12,1,13,4,1,5);
95 for(
int ros = 1; ros != 13; ++ros) {
96 for(
int rob = 1; rob != 26; ++rob) {
101 if(!
mapping->readOutToGeometry(dduId,ros,rob-1,0,2,wheel,station,sector,dummy,dummy,dummy) ||
102 !
mapping->readOutToGeometry(dduId,ros,rob-1,0,16,wheel,station,sector,dummy,dummy,dummy)) {
110 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
111 <<
"[DTRobBinsMap] FED: " << dduId <<
" ROS " << ros <<
" ROB: " << rob-1
112 <<
" not in the mapping!" << endl;
118 for(map<DTChamberId, DTRobBinsMap>::iterator chAndRobs =
chamberMap.begin();
120 chAndRobs->second.init(
false);
128 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
129 <<
"[DTBlockedROChannelsTest]: Begin of LS transition";
149 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
150 <<
"[DTBlockedROChannelsTest]: "<<
nevents<<
" events";
163 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
164 <<
"[DTBlockedROChannelsTest]: End of LS " <<
nLumiSegs <<
". Client called in online mode, performing client operations";
182 neventsPrev = procEvents;
192 for(
int wheel = -2; wheel != 3; ++wheel) {
199 for(map<DTChamberId, DTRobBinsMap>::iterator chAndRobs =
chamberMap.begin();
203 int sectorForPlot = chId.
sector();
204 if(sectorForPlot == 13 || (sectorForPlot == 4 && chId.
station() ==4)) {
207 }
else if(sectorForPlot == 14 || (sectorForPlot == 10 && chId.
station() ==4)) {
213 double chPercent = (*chAndRobs).second.getChamberPercentage();
216 totalPerc += chPercent*scale*1./240.;
256 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
257 <<
"[DTBlockedROChannelsTest] endjob called!";
266 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
267 <<
"[DTBlockedROChannelsTest] endRun called. Client called in offline mode, performing operations.";
293 return mapping->readOutToGeometry(dduId,ros,2,2,2,wheel,dummy,sector,dummy,dummy,dummy);
307 stringstream mename; mename <<
"DT/00-DataIntegrity/FED" << fed <<
"/ROS" << ros
308 <<
"/FED" << fed <<
"_ROS" << ros <<
"_ROSError";
311 stringstream whname; whname <<
"DT/00-DataIntegrity/FED" << fed
312 <<
"/FED" << fed <<
"_ROSStatus";
331 robsAndValues[robBin] = getValueRobBin(robBin);
342 value += (int)meROS->getBinContent(9,robBin);
343 value += (int)meROS->getBinContent(11,robBin);
354 value += (int)meDDU->getBinContent(2,rosBin);
355 value += (int)meDDU->getBinContent(10,rosBin);
365 if(robsAndValues.find(robBin) == robsAndValues.end()) {
366 LogWarning(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
367 <<
"[DTRobBinsMap]***Error: ROB: " << robBin <<
" is not valid" << endl;
371 int newValue = getValueRobBin(robBin);
372 if(newValue > robsAndValues[robBin]) {
373 robsAndValues[robBin] = newValue;
383 meROS = theDbe->get(rosHName);
384 meDDU = theDbe->get(dduHName);
385 int nChangedROBs = 0;
388 int newValue = getValueRos();
389 if(newValue > rosValue) {
394 for(map<int, int>::const_iterator robAndValue = robsAndValues.begin();
395 robAndValue != robsAndValues.end(); ++robAndValue) {
396 if(robChanged((*robAndValue).first)) nChangedROBs++;
398 return 1.-((double)nChangedROBs/(
double)robsAndValues.size());
403 meROS = theDbe->get(rosHName);
404 meDDU = theDbe->get(dduHName);
406 rosValue = getValueRos();
407 for(map<int, int>::const_iterator robAndValue = robsAndValues.begin();
408 robAndValue != robsAndValues.end(); ++robAndValue) {
409 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)