34 hSystFractionVsLS(0) {
35 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
36 <<
"[DTBlockedROChannelsTest]: Constructor";
47 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
48 <<
"DataIntegrityTest: analyzed " <<
nupdates <<
" updates";
55 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
56 <<
"[DTBlockedROChannelsTest]: BeginJob";
69 for(
int wheel = -2; wheel != 3; ++wheel) {
70 stringstream namestream; namestream <<
"ROChannelSummary_W" << wheel;
71 stringstream titlestream; titlestream <<
"Blocked RO Channels (Wh " << wheel <<
")";
72 wheelHitos[wheel] =
dbe->
book2D(namestream.str().c_str(),titlestream.str().c_str(),12,1,13,4,1,5);
96 for(
int ros = 1; ros != 13; ++ros) {
97 for(
int rob = 1; rob != 26; ++rob) {
102 if(!
mapping->readOutToGeometry(dduId,ros,rob-1,0,2,wheel,station,sector,dummy,dummy,dummy) ||
103 !
mapping->readOutToGeometry(dduId,ros,rob-1,0,16,wheel,station,sector,dummy,dummy,dummy)) {
111 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
112 <<
"[DTRobBinsMap] FED: " << dduId <<
" ROS " << ros <<
" ROB: " << rob-1
113 <<
" not in the mapping!" << endl;
124 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
125 <<
"[DTBlockedROChannelsTest]: Begin of LS transition";
145 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
146 <<
"[DTBlockedROChannelsTest]: "<<
nevents<<
" events";
159 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
160 <<
"[DTBlockedROChannelsTest]: End of LS " <<
nLumiSegs <<
". Client called in online mode, performing client operations";
178 neventsPrev = procEvents;
188 for(
int wheel = -2; wheel != 3; ++wheel) {
195 for(map<DTChamberId, DTRobBinsMap>::iterator chAndRobs =
chamberMap.begin();
199 int sectorForPlot = chId.
sector();
200 if(sectorForPlot == 13 || (sectorForPlot == 4 && chId.
station() ==4)) {
203 }
else if(sectorForPlot == 14 || (sectorForPlot == 10 && chId.
station() ==4)) {
209 double chPercent = (*chAndRobs).second.getChamberPercentage();
212 totalPerc += chPercent*scale*1./250.;
252 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
253 <<
"[DTBlockedROChannelsTest] endjob called!";
262 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
263 <<
"[DTBlockedROChannelsTest] endRun called. Client called in offline mode, performing operations.";
289 return mapping->readOutToGeometry(dduId,ros,2,2,2,wheel,dummy,sector,dummy,dummy,dummy);
300 stringstream mename; mename <<
"DT/00-DataIntegrity/FED" << fed <<
"/ROS" << ros
301 <<
"/FED" << fed <<
"_ROS" << ros <<
"_ROSError";
304 stringstream whname; whname <<
"DT/00-DataIntegrity/FED" << fed
305 <<
"/FED" << fed <<
"_ROSStatus";
328 robsAndValues[robBin] = getValueRobBin(robBin);
337 value += (int)meROS->getBinContent(9,robBin);
338 value += (int)meROS->getBinContent(11,robBin);
349 value += (int)meDDU->getBinContent(2,rosBin);
350 value += (int)meDDU->getBinContent(10,rosBin);
360 if(robsAndValues.find(robBin) == robsAndValues.end()) {
361 LogWarning(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
362 <<
"[DTRobBinsMap]***Error: ROB: " << robBin <<
" is not valid" << endl;
366 int newValue = getValueRobBin(robBin);
367 if(newValue > robsAndValues[robBin]) {
368 robsAndValues[robBin] = newValue;
378 meROS = theDbe->get(rosHName);
379 meDDU = theDbe->get(dduHName);
380 int nChangedROBs = 0;
383 int newValue = getValueRos();
384 if(newValue > rosValue) {
389 for(map<int, int>::const_iterator robAndValue = robsAndValues.begin();
390 robAndValue != robsAndValues.end(); ++robAndValue) {
391 if(robChanged((*robAndValue).first)) nChangedROBs++;
393 return 1.-((double)nChangedROBs/(
double)robsAndValues.size());
398 meROS = theDbe->get(rosHName);
399 meDDU = theDbe->get(dduHName);
401 rosValue = getValueRos();
402 for(map<int, int>::const_iterator robAndValue = robsAndValues.begin();
403 robAndValue != robsAndValues.end(); ++robAndValue) {
404 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)