31 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask") <<
"[DTDataIntegrityTask]: Constructor" << endl;
59 if (processingMode ==
"Online") {
61 }
else if (processingMode ==
"SM") {
63 }
else if (processingMode ==
"Offline") {
65 }
else if (processingMode ==
"HLT") {
68 throw cms::Exception(
"MissingParameter") <<
"[DTDataIntegrityTask]: processingMode :" << processingMode
69 <<
" invalid! Must be Online, SM, Offline or HLT !" << endl;
74 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
75 <<
"[DTDataIntegrityTask]: Destructor. Analyzed " <<
neventsFED <<
" events" << endl;
76 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
77 <<
"[DTDataIntegrityTask]: postEndJob called!" << endl;
99 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask") <<
"[DTDataIntegrityTask]: postBeginJob" << endl;
101 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
102 <<
"[DTDataIntegrityTask] Get DQMStore service" << endl;
106 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
122 for (
int uRos = 1; uRos <=
NuROS; ++uRos) {
128 for (
int ros = 1; ros <=
NuROS; ++ros) {
148 for (
int ros = 1; ros <=
NuROS; ++ros) {
164 int nFED = (fedMax - fedMin) + 1;
166 hFEDEntry = ibooker.
book1D(
"FEDEntries",
"# entries per DT FED", nFED, fedMin, fedMax + 1);
171 hFEDFatal = ibooker.
book1D(
"FEDFatal",
"# fatal errors DT FED", nFED, fedMin, fedMax + 1);
173 ibooker.
book1D(
"FEDNonFatal",
"# NON fatal errors DT FED", nFED, fedMin, fedMax + 1);
177 string histoType =
"ROSSummary";
179 string wheel_s = to_string(
wheel);
180 string histoName =
"ROSSummary_W" + wheel_s;
181 string fed_s = to_string(
FEDIDmin + 1);
186 string histoTitle =
"Summary Wheel" + wheel_s +
" (FED " + fed_s +
")";
219 hFEDFatal = ibooker.
book1D(
"FEDFatal",
"# fatal errors DT FED", nFED, fedMin, fedMax + 1);
220 hFEDNonFatal = ibooker.
book1D(
"FEDNonFatal",
"# NON fatal errors DT FED", nFED, fedMin, fedMax + 1);
226 hTTSSummary = ibooker.
book2D(
"TTSSummary",
"Summary Status TTS", nFED, fedMin, fedMax + 1, 9, 1, 10);
240 ibooker.
book2D(
"DataCorruptionSummary",
"Data Corruption Sources", nFED, fedMin, fedMax + 1, 8, 1, 9);
255 string wheel =
"ZERO";
260 string fed_s = to_string(fed);
261 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
262 <<
" Booking histos for FED: " << fed_s <<
" folder: " <<
folder << endl;
273 histoType =
"EventLength";
274 histoName =
"FED" + fed_s +
"_" + histoType;
275 histoTitle =
"Event Length (Bytes) FED " + fed_s;
276 (
fedHistos[histoType])[fed] = ibooker.
book1D(histoName, histoTitle, 501, 0, 30000);
281 histoType =
"uROSStatus";
282 histoName =
"FED" + fed_s +
"_" + histoType;
283 (
fedHistos[histoType])[fed] = ibooker.
book2D(histoName, histoName, 12, 0, 12, 12, 1, 13);
315 histoType =
"FEDAvgEvLengthvsLumi";
316 histoName =
"FED" + fed_s +
"_" + histoType;
317 histoTitle =
"Avg Event Length (Bytes) vs LumiSec FED " + fed_s;
320 histoType =
"TTSValues";
321 histoName =
"FED" + fed_s +
"_" + histoType;
322 (
fedHistos[histoType])[fed] = ibooker.
book1D(histoName, histoName, 8, 0, 8);
333 histoType =
"uROSList";
334 histoName =
"FED" + fed_s +
"_" + histoType;
335 histoTitle =
"# of uROS in the FED payload (FED" + fed_s +
")";
336 (
fedHistos[histoType])[fed] = ibooker.
book1D(histoName, histoTitle, 13, 0, 13);
339 histoName =
"FED" + fed_s +
"_BXID";
340 histoTitle =
"Distrib. BX ID (FED" + fed_s +
")";
341 (
fedHistos[histoType])[fed] = ibooker.
book1D(histoName, histoTitle, 3600, 0, 3600);
351 histoType =
"uROSSummary";
352 histoName =
"FED" + fed_s +
"_uROSSummary";
353 string histoTitle =
"Summary Wheel" + wheel +
" (FED " + fed_s +
")";
355 ((
summaryHistos[histoType])[fed]) = ibooker.
book2D(histoName, histoTitle, 12, 0, 12, 12, 1, 13);
389 string dduID_s = to_string(code.
getDDU());
390 string rosID_s = to_string(code.
getROS());
391 string robID_s = to_string(code.
getROB());
393 string wheel_s = to_string(wheel);
395 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
396 <<
" Booking histos for FED: " << code.
getDDU() <<
" ROS: " << code.
getROS() <<
" ROB: " << code.
getROB()
397 <<
" folder: " <<
folder << endl;
408 histoType =
"EventLength";
409 histoName =
"FED" + dduID_s +
"_" + histoType;
410 histoTitle =
"Event Length (Bytes) FED " + dduID_s;
416 histoType =
"ROSStatus";
417 histoName =
"FED" + dduID_s +
"_" + histoType;
449 histoType =
"FEDAvgEvLengthvsLumi";
450 histoName =
"FED" + dduID_s +
"_" + histoType;
451 histoTitle =
"Avg Event Length (Bytes) vs LumiSec FED " + dduID_s;
455 histoType =
"TTSValues";
456 histoName =
"FED" + dduID_s +
"_" + histoType;
468 histoType =
"EventType";
469 histoName =
"FED" + dduID_s +
"_" + histoType;
475 histoType =
"ROSList";
476 histoName =
"FED" + dduID_s +
"_" + histoType;
477 histoTitle =
"# of ROS in the FED payload (FED" + dduID_s +
")";
480 histoType =
"FIFOStatus";
481 histoName =
"FED" + dduID_s +
"_" + histoType;
496 histoName =
"FED" + dduID_s +
"_BXID";
497 histoTitle =
"Distrib. BX ID (FED" + dduID_s +
")";
508 histoType =
"ROSSummary";
509 histoName =
"FED" + dduID_s +
"_ROSSummary";
510 string histoTitle =
"Summary Wheel" + wheel_s +
" (FED " + dduID_s +
")";
557 histoType =
"ROSError";
558 histoName =
"FED" + dduID_s +
"_" +
folder + rosID_s +
"_ROSError";
559 histoTitle = histoName +
" (ROBID error summary)";
617 histoType =
"ROSEventLength";
618 histoName =
"FED" + dduID_s +
"_" +
folder + rosID_s +
"_ROSEventLength";
619 histoTitle =
"Event Length (Bytes) FED " + dduID_s +
" ROS " + rosID_s;
622 histoType =
"ROSAvgEventLengthvsLumi";
623 histoName =
"FED" + dduID_s +
"_" +
folder + rosID_s + histoType;
624 histoTitle =
"Event Length (Bytes) FED " + dduID_s +
" ROS " + rosID_s;
628 histoType =
"TDCError";
629 histoName =
"FED" + dduID_s +
"_" +
folder + rosID_s +
"_TDCError";
630 histoTitle = histoName +
" (ROBID error summary)";
685 histoType =
"ROB_mean";
686 histoName =
"FED" + dduID_s +
"_" +
"ROS" + rosID_s +
"_ROB_mean";
688 names.insert(pair<std::string, std::string>(histoType,
string(fullName)));
702 histoType =
"SCSizeVsROSSize";
703 histoName =
"FED" + dduID_s +
"_SCSizeVsROSSize";
704 histoTitle =
"SC size vs SC (FED " + dduID_s +
")";
720 string wheel_s = to_string(wheel);
721 string ros_s = to_string(ros);
724 string histoType =
"ROSError";
726 string linkDown_s = to_string(linkDown);
727 int linkUp = linkDown + 24;
728 string linkUp_s = to_string(linkUp);
729 string histoName =
"W" + wheel_s +
"_" +
"ROS" + ros_s +
"_" + histoType;
730 string histoTitle = histoName +
" (Link " + linkDown_s +
"-" + linkUp_s +
" error summary)";
754 for (
int link = linkDown;
link < (linkUp + 1); ++
link) {
755 string link_s = to_string(
link);
762 histoType =
"TDCError";
764 linkDown_s = to_string(linkDown);
765 linkUp = linkDown + 24;
766 linkUp_s = to_string(linkUp);
767 histoName =
"W" + wheel_s +
"_" +
"ROS" + ros_s +
"_" + histoType;
768 histoTitle = histoName +
" (Link " + linkDown_s +
"-" + linkUp_s +
" error summary)";
769 keyHisto = (
TDCError)*1000 + (wheel + 2) * 100 + (ros - 1);
798 for (
int link = linkDown;
link < (linkUp + 1); ++
link) {
799 string link_s = to_string(
link);
805 string fed_s = to_string(fed);
806 string uRos_s = to_string(uRos);
812 string histoType =
"uROSEventLength";
813 string histoName =
"FED" + fed_s +
"_uROS" + uRos_s +
"_" +
"EventLength";
814 string histoTitle =
"Event Length (Bytes) FED " + fed_s +
" uROS" + uRos_s;
818 histoType =
"uROSAvgEventLengthvsLumi";
819 histoName =
"FED" + fed_s +
"_ROS" + uRos_s +
"AvgEventLengthvsLumi";
820 histoTitle =
"Event Length (Bytes) FED " + fed_s +
" ROS" + uRos_s;
821 keyHisto = (fed -
FEDIDmin) * 100 + (uRos - 1);
824 histoType =
"TTSValues";
825 histoName =
"FED" + fed_s +
"_" +
"uROS" + uRos_s +
"_" + histoType;
844 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
845 <<
"[DTDataIntegrityTask]: " <<
neventsuROS <<
" events analyzed by processuROS" << endl;
854 uROSStatus =
fedHistos[
"uROSStatus"][fed];
857 LogError(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
858 <<
"Trying to access non existing ME at FED " << fed << std::endl;
862 unsigned int slotMap = (data.
getboardId()) & 0xF;
865 int ros =
theROS(slotMap, 0);
866 int ddu =
theDDU(fed, slotMap, 0,
false);
867 int wheel = (ddu - 770) % 5 - 2;
876 int errorX[5][12] = {{0}};
885 if ((!uROSError2) || (!uROSError1) || (!uROSError0)) {
886 LogError(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
887 <<
"Trying to access non existing ME at uROS " << uRos << std::endl;
901 errorX[value - 1][ros - 1] += 1;
903 }
else if (
link < 48) {
904 errorX[value - 1][ros] += 1;
905 uROSError1->Fill(value - 1,
link - 23);
906 }
else if (
link < 72) {
907 errorX[value - 1][ros + 1] += 1;
908 uROSError2->Fill(value - 1,
link - 47);
930 LogError(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
931 <<
"Trying to access non existing ME at uROS " << uRos << std::endl;
934 errorX[value - 1][
link] += 1;
935 uROSError0->
Fill(value - 1, sc);
945 for (
unsigned int iros = 0; iros < 12; ++iros) {
946 for (
unsigned int bin = 0;
bin < 5; ++
bin) {
947 if (errorX[
bin][iros] != 0)
948 ROSSummary->
Fill(
bin, iros + 1);
961 for (
unsigned int icounter = 0; icounter < data.
geterrors().size(); ++icounter) {
965 int tdcError_ROSSummary = 0;
966 int tdcError_ROSError = 0;
967 int tdcError_TDCHisto = 0;
969 if (error & 0x4000) {
970 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
971 <<
" ROS " << uRos <<
" ROB " << link <<
" Internal fatal Error 4000 in TDC " << error << endl;
973 tdcError_ROSSummary = 5;
974 tdcError_ROSError = 5;
975 tdcError_TDCHisto = 0;
977 }
else if (error & 0x0249) {
978 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
979 <<
" ROS " << uRos <<
" ROB " << link <<
" TDC FIFO overflow in TDC " << error << endl;
981 tdcError_ROSSummary = 6;
982 tdcError_ROSError = 6;
983 tdcError_TDCHisto = 1;
985 }
else if (error & 0x0492) {
986 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
987 <<
" ROS " << uRos <<
" ROB " << link <<
" TDC L1 buffer overflow in TDC " << error << endl;
989 tdcError_ROSSummary = 7;
990 tdcError_ROSError = 7;
991 tdcError_TDCHisto = 2;
993 }
else if (error & 0x2000) {
994 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
995 <<
" ROS " << uRos <<
" ROB " << link <<
" TDC L1A FIFO overflow in TDC " << error << endl;
997 tdcError_ROSSummary = 8;
998 tdcError_ROSError = 8;
999 tdcError_TDCHisto = 3;
1001 }
else if (error & 0x0924) {
1002 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1003 <<
" uROS " << uRos <<
" ROB " << link <<
" TDC hit error in TDC " << error << endl;
1005 tdcError_ROSSummary = 9;
1006 tdcError_ROSError = 9;
1007 tdcError_TDCHisto = 4;
1009 }
else if (error & 0x1000) {
1010 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1011 <<
" uROS " << uRos <<
" ROB " << link <<
" TDC hit rejected in TDC " << error << endl;
1013 tdcError_ROSSummary = 10;
1014 tdcError_ROSError = 10;
1015 tdcError_TDCHisto = 5;
1018 LogWarning(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1019 <<
" TDC error code not known " << error << endl;
1023 ROSSummary->
Fill(tdcError_ROSSummary, link + 1);
1034 ROSSummary->
Fill(tdcError_ROSSummary, ros);
1036 ROSSummary->
Fill(tdcError_ROSSummary, ros + 1);
1038 ROSSummary->
Fill(tdcError_ROSSummary, ros + 2);
1042 uROSError0->
Fill(tdcError_ROSError, link);
1044 uROSError1->
Fill(tdcError_ROSError, link - 23);
1046 uROSError2->
Fill(tdcError_ROSError, link - 47);
1052 urosHistos[(
TDCError)*1000 + (wheel + 2) * 100 + (ros)]->
Fill(tdcError_TDCHisto + 6 * (tdc - 1), link - 23);
1063 int ttsCodeValue = -1;
1096 LogError(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1097 <<
"[DTDataIntegrityTask] FED User control: wrong TTS value " << value <<
" in FED " << fed <<
" uROS " 1106 int uRosEventLength = (data.
gettrailer() & 0xFFFFF) * 8;
1109 if (uRosEventLength > 5000)
1110 uRosEventLength = 5000;
1120 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1121 <<
"[DTDataIntegrityTask]: " <<
neventsuROS <<
" events analyzed by processROS25" << endl;
1138 if ((
mode <= 2) && (!ROSError)) {
1139 LogError(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1140 <<
"Trying to access non existing ME at ROSID " << code.
getROSID() << std::endl;
1151 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask") <<
" TXP error en ROS " << code.
getROS() << endl;
1160 for (vector<DTROSErrorWord>::const_iterator error_it = data.
getROSErrors().begin();
1164 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1165 <<
" Error in ROS " << code.
getROS() <<
" ROB Id " << (*error_it).robID() <<
" Error type " 1166 << (*error_it).errorType() << endl;
1169 ROSSummary->
Fill((*error_it).errorType(), code.
getROS());
1170 if ((*error_it).errorType() <= 11) {
1176 if ((*error_it).robID() != 31) {
1177 ROSError->
Fill((*error_it).errorType(), (*error_it).robID());
1178 }
else if ((*error_it).errorType() == 4) {
1179 vector<int> channelBins;
1181 vector<int>::const_iterator channelIt = channelBins.begin();
1182 vector<int>::const_iterator channelEnd = channelBins.end();
1183 for (; channelIt != channelEnd; ++channelIt) {
1184 ROSError->
Fill(4, (*channelIt));
1190 int ROSDebug_BunchNumber = -1;
1192 for (vector<DTROSDebugWord>::const_iterator debug_it = data.
getROSDebugs().begin();
1196 int debugROSSummary = 0;
1197 int debugROSError = 0;
1198 vector<int> debugBins;
1199 bool hasEvIdMis =
false;
1200 vector<int> evIdMisBins;
1202 if ((*debug_it).debugType() == 0) {
1203 ROSDebug_BunchNumber = (*debug_it).debugMessage();
1204 }
else if ((*debug_it).debugType() == 1) {
1207 }
else if ((*debug_it).debugType() == 2) {
1210 }
else if ((*debug_it).debugType() == 3) {
1211 if ((*debug_it).dontRead()) {
1212 debugROSSummary = 11;
1215 channelsInCEROS((*debug_it).cerosIdCerosStatus(), (*debug_it).dontRead(), debugBins);
1217 if ((*debug_it).evIdMis()) {
1220 channelsInCEROS((*debug_it).cerosIdCerosStatus(), (*debug_it).evIdMis(), evIdMisBins);
1222 }
else if ((*debug_it).debugType() == 4 && (*debug_it).cerosIdRosStatus()) {
1223 debugROSSummary = 13;
1229 if (debugROSSummary) {
1230 ROSSummary->
Fill(debugROSSummary, code.
getROS());
1232 vector<int>::const_iterator channelIt = debugBins.begin();
1233 vector<int>::const_iterator channelEnd = debugBins.end();
1234 for (; channelIt != channelEnd; ++channelIt) {
1235 ROSError->
Fill(debugROSError, (*channelIt));
1243 vector<int>::const_iterator channelIt = evIdMisBins.begin();
1244 vector<int>::const_iterator channelEnd = evIdMisBins.end();
1245 for (; channelIt != channelEnd; ++channelIt) {
1246 ROSError->
Fill(9, (*channelIt));
1257 code.
setROB((*rob_it).first);
1262 if (robheader.
bunchID() != ROSDebug_BunchNumber) {
1275 for (vector<DTROBTrailerWord>::const_iterator robt_it = data.
getROBTrailers().begin();
1278 float wCount = (*robt_it).wordCount() < 100. ? (*robt_it).wordCount() : 99.9;
1286 if (rosEventLength > 1600)
1287 rosEventLength = 1600;
1292 for (vector<DTTDCData>::const_iterator tdc_it = data.
getTDCData().begin(); tdc_it != data.
getTDCData().end();
1297 if (tdcDatum.
PC() != 0) {
1298 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1299 <<
" PC error in ROS " << code.
getROS() <<
" TDC " << (*tdc_it).first << endl;
1307 ROSError->
Fill(6, (*tdc_it).first);
1312 for (vector<DTTDCError>::const_iterator tdc_it = data.
getTDCError().begin(); tdc_it != data.
getTDCError().end();
1315 code.
setROB((*tdc_it).first);
1317 int tdcError_ROSSummary = 0;
1318 int tdcError_ROSError = 0;
1319 int tdcError_TDCHisto = 0;
1321 if (((*tdc_it).second).tdcError() & 0x4000) {
1322 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1323 <<
" ROS " << code.
getROS() <<
" ROB " << code.
getROB() <<
" Internal fatal Error 4000 in TDC " 1324 << (*tdc_it).first << endl;
1326 tdcError_ROSSummary = 14;
1327 tdcError_ROSError = 11;
1328 tdcError_TDCHisto = 0;
1330 }
else if (((*tdc_it).second).tdcError() & 0x0249) {
1331 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1332 <<
" ROS " << code.
getROS() <<
" ROB " << code.
getROB() <<
" TDC FIFO overflow in TDC " << (*tdc_it).first
1335 tdcError_ROSSummary = 15;
1336 tdcError_ROSError = 12;
1337 tdcError_TDCHisto = 1;
1339 }
else if (((*tdc_it).second).tdcError() & 0x0492) {
1340 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1341 <<
" ROS " << code.
getROS() <<
" ROB " << code.
getROB() <<
" TDC L1 buffer overflow in TDC " 1342 << (*tdc_it).first << endl;
1344 tdcError_ROSSummary = 16;
1345 tdcError_ROSError = 13;
1346 tdcError_TDCHisto = 2;
1348 }
else if (((*tdc_it).second).tdcError() & 0x2000) {
1349 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1350 <<
" ROS " << code.
getROS() <<
" ROB " << code.
getROB() <<
" TDC L1A FIFO overflow in TDC " << (*tdc_it).first
1353 tdcError_ROSSummary = 17;
1354 tdcError_ROSError = 14;
1355 tdcError_TDCHisto = 3;
1357 }
else if (((*tdc_it).second).tdcError() & 0x0924) {
1358 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1359 <<
" ROS " << code.
getROS() <<
" ROB " << code.
getROB() <<
" TDC hit error in TDC " << (*tdc_it).first
1362 tdcError_ROSSummary = 18;
1363 tdcError_ROSError = 15;
1364 tdcError_TDCHisto = 4;
1366 }
else if (((*tdc_it).second).tdcError() & 0x1000) {
1367 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1368 <<
" ROS " << code.
getROS() <<
" ROB " << code.
getROB() <<
" TDC hit rejected in TDC " << (*tdc_it).first
1371 tdcError_ROSSummary = 19;
1372 tdcError_ROSError = 16;
1373 tdcError_TDCHisto = 5;
1376 LogWarning(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1377 <<
" TDC error code not known " << ((*tdc_it).second).tdcError() << endl;
1380 ROSSummary->
Fill(tdcError_ROSSummary, code.
getROS());
1382 if (tdcError_ROSSummary <= 15) {
1387 ROSError->
Fill(tdcError_ROSError, (*tdc_it).first);
1389 rosHistos[
"TDCError"][code.
getROSID()]->Fill(tdcError_TDCHisto + 6 * ((*tdc_it).second).tdcID(),
1406 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1407 <<
"[DTDataIntegrityTask]: " <<
neventsFED <<
" events analyzed by processFED" << endl;
1409 if (fed < FEDIDmin || fed >
FEDIDmax)
1420 fedHistos[
"EventLength"][fed]->Fill(fedEvtLength);
1425 fedTimeHistos[
"FEDAvgEvLengthvsLumi"][fed]->accumulateValueTimeSlot(fedEvtLength);
1437 int ttsCodeValue = -1;
1469 LogError(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1470 <<
"[DTDataIntegrityTask] FED TTS control: wrong TTS value " << value <<
" in FED " << fed << endl;
1475 fedHistos[
"TTSValues"][fed]->Fill(ttsCodeValue);
1482 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1483 <<
"[DTDataIntegrityTask]: " <<
neventsFED <<
" events analyzed by processFED" << endl;
1496 if (!header.
check()) {
1502 if (!trailer.
check()) {
1523 int ttsCodeValue = -1;
1524 int ttsSummaryBin = -1;
1543 bool knownOrigin =
false;
1567 bool knownOrigin =
false;
1594 LogError(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1595 <<
"[DTDataIntegrityTask] DDU control: wrong TTS value " << trailer.
ttsBits() << endl;
1601 if (ttsSummaryBin != -1) {
1609 int rosList = secondWord.
rosList();
1610 set<int> rosPositions;
1611 for (
int i = 0;
i < 12;
i++) {
1612 if (rosList & 0
x1) {
1613 rosPositions.insert(
i);
1616 hROSStatus->
Fill(8,
i, 1);
1622 for (vector<DTDDUFirstStatusWord>::const_iterator fsw_it = data.
getFirstStatusWord().begin();
1627 hROSStatus->
Fill(0, channel, (*fsw_it).channelEnabled());
1628 hROSStatus->
Fill(1, channel, (*fsw_it).timeout());
1629 hROSStatus->
Fill(2, channel, (*fsw_it).eventTrailerLost());
1630 hROSStatus->
Fill(3, channel, (*fsw_it).opticalFiberSignalLost());
1631 hROSStatus->
Fill(4, channel, (*fsw_it).tlkPropagationError());
1632 hROSStatus->
Fill(5, channel, (*fsw_it).tlkPatternError());
1633 hROSStatus->
Fill(6, channel, (*fsw_it).tlkSignalLost());
1634 hROSStatus->
Fill(7, channel, (*fsw_it).errorFromROS());
1637 if ((*fsw_it).channelEnabled() == 1 && rosPositions.find(channel) == rosPositions.end()) {
1639 hROSStatus->
Fill(9, channel, 1);
1651 if ((rosBXIds.size() > 1 || rosBXIds.find(header.
bxID()) == rosBXIds.end()) &&
1652 !rosBXIds.empty()) {
1653 for (vector<DTROS25Data>::const_iterator rosControlData = rosData.begin(); rosControlData != rosData.end();
1655 for (vector<DTROSDebugWord>::const_iterator debug_it = (*rosControlData).getROSDebugs().begin();
1656 debug_it != (*rosControlData).getROSDebugs().end();
1658 if ((*debug_it).debugType() == 0 && (*debug_it).debugMessage() != header.
bxID()) {
1659 int ros = (*rosControlData).getROSID();
1662 hROSStatus->
Fill(11, ros - 1);
1674 LogWarning(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1675 <<
"ERROR: FED " << ddu <<
" BX ID different from other feds: " << header.
bxID() << endl;
1683 if ((rosL1AIds.size() > 1 || rosL1AIds.find(header.
lvl1ID() - 1) == rosL1AIds.end()) &&
1684 !rosL1AIds.empty()) {
1686 for (vector<DTROS25Data>::const_iterator rosControlData = rosData.begin(); rosControlData != rosData.end();
1688 unsigned int ROSHeader_TTCCount =
1689 ((*rosControlData).getROSHeader().TTCEventCounter() + 1) %
1691 if (ROSHeader_TTCCount != header.
lvl1ID()) {
1692 int ros = (*rosControlData).getROSID();
1694 hROSStatus->
Fill(10, ros - 1);
1719 int fifoFull = secondWord.
fifoFull();
1723 for (
int i = 0;
i < 3;
i++) {
1724 if (inputFifoFull & 0
x1) {
1725 hFIFOStatus->
Fill(
i, 0);
1727 if (inputFifoAlmostFull & 0x1) {
1728 hFIFOStatus->
Fill(
i, 1);
1730 if (fifoFull & 0x1) {
1731 hFIFOStatus->
Fill(3 +
i, 0);
1733 if (fifoAlmostFull & 0x1) {
1734 hFIFOStatus->
Fill(3 +
i, 1);
1736 if (!(inputFifoFull & 0x1) && !(inputFifoAlmostFull & 0x1)) {
1737 hFIFOStatus->
Fill(
i, 2);
1739 if (!(fifoFull & 0x1) && !(fifoAlmostFull & 0x1)) {
1740 hFIFOStatus->
Fill(3 +
i, 2);
1742 inputFifoFull >>= 1;
1743 inputFifoAlmostFull >>= 1;
1745 fifoAlmostFull >>= 1;
1748 if (outputFifoFull) {
1749 hFIFOStatus->
Fill(6, 0);
1751 if (outputFifoAlmostFull) {
1752 hFIFOStatus->
Fill(6, 1);
1754 if (!outputFifoFull && !outputFifoAlmostFull) {
1755 hFIFOStatus->
Fill(6, 2);
1780 folder =
"DT/00-DataIntegrity/";
1786 for (
int iCh = 0; iCh < 6; ++iCh) {
1787 if ((chMask >> iCh) & 0
x1) {
1788 channels.push_back(cerosId * 6 + iCh);
1795 for (
int iCeros = 0; iCeros < 5; ++iCeros) {
1796 if ((cerosMask >> iCeros) & 0
x1) {
1797 for (
int iCh = 0; iCh < 6; ++iCh) {
1798 channels.push_back(iCeros * 6 + iCh);
1813 map<string, map<int, DTTimeEvolutionHisto*> >::iterator fedIt =
fedTimeHistos.begin();
1814 map<string, map<int, DTTimeEvolutionHisto*> >::iterator fedEnd =
fedTimeHistos.end();
1815 for (; fedIt != fedEnd; ++fedIt) {
1816 map<int, DTTimeEvolutionHisto*>::iterator histoIt = fedIt->second.begin();
1817 map<int, DTTimeEvolutionHisto*>::iterator histoEnd = fedIt->second.end();
1818 for (; histoIt != histoEnd; ++histoIt) {
1819 histoIt->second->updateTimeSlot(lumiBlock,
nEventsLS);
1823 map<unsigned int, DTTimeEvolutionHisto*>::iterator urosIt =
urosTimeHistos.begin();
1824 map<unsigned int, DTTimeEvolutionHisto*>::iterator urosEnd =
urosTimeHistos.end();
1825 for (; urosIt != urosEnd; ++urosIt) {
1826 urosIt->second->updateTimeSlot(lumiBlock,
nEventsLS);
1831 map<string, map<int, DTTimeEvolutionHisto*> >::iterator dduIt =
fedTimeHistos.begin();
1832 map<string, map<int, DTTimeEvolutionHisto*> >::iterator dduEnd =
fedTimeHistos.end();
1833 for (; dduIt != dduEnd; ++dduIt) {
1834 map<int, DTTimeEvolutionHisto*>::iterator histoIt = dduIt->second.begin();
1835 map<int, DTTimeEvolutionHisto*>::iterator histoEnd = dduIt->second.end();
1836 for (; histoIt != histoEnd; ++histoIt) {
1837 histoIt->second->updateTimeSlot(lumiBlock,
nEventsLS);
1841 map<string, map<int, DTTimeEvolutionHisto*> >::iterator rosIt =
rosTimeHistos.begin();
1842 map<string, map<int, DTTimeEvolutionHisto*> >::iterator rosEnd =
rosTimeHistos.end();
1843 for (; rosIt != rosEnd; ++rosIt) {
1844 map<int, DTTimeEvolutionHisto*>::iterator histoIt = rosIt->second.begin();
1845 map<int, DTTimeEvolutionHisto*>::iterator histoEnd = rosIt->second.end();
1846 for (; histoIt != histoEnd; ++histoIt) {
1847 histoIt->second->updateTimeSlot(lumiBlock,
nEventsLS);
1859 LogTrace(
"DTRawToDigi|TDQM|DTMonitorModule|DTDataIntegrityTask") <<
"[DTDataIntegrityTask]: preProcessEvent" << endl;
1869 for (
unsigned int j = 0;
j < fedCol->size(); ++
j) {
1870 fedData = fedCol->at(
j);
1871 int fed = fedData.
getfed();
1873 LogError(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1874 <<
"[DTDataIntegrityTask]: analyze, FED ID " << fed <<
" not expected." << endl;
1882 for (
int slot = 1; slot <=
DOCESLOTS; ++slot) {
1883 urosData = fedData.
getuROS(slot);
1895 (*rosBxIds).second.clear();
1902 (*rosL1AIds).second.clear();
1915 std::vector<DTROS25Data> ros25Data;
1917 for (
unsigned int i = 0;
i < dduProduct->size(); ++
i) {
1918 dduData = dduProduct->at(
i);
1919 ros25Data = ros25Product->at(
i);
1927 for (
unsigned int j = 0;
j < ros25Data.size(); ++
j) {
1938 int ros =
theROS(slot, link);
1962 if (ros > 6 && tenDDU && ddu < 775)
1972 int ros = (link / 24) + 3 * (slot % 6) - 2;
std::map< int, std::set< int > > rosBxIdsPerFED
void bookHistosROS(DQMStore::IBooker &, const int wheel, const int ros)
std::multimap< std::string, std::string > names
std::map< int, std::set< int > > rosL1AIdsPerFED
int EventWordCount() const
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
const std::vector< DTROBHeader > & getROBHeaders() const
std::vector< int > geterrors() const
const std::vector< DTTDCData > & getTDCData() const
MonitorElement * bookFloat(TString const &name)
int outputFifoFull() const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::string fedIntegrityFolder
MonitorElement * hFEDNonFatal
void setCurrentFolder(std::string const &fullpath)
int geterrorTDCID(int i) const
void bookHistosuROS(DQMStore::IBooker &, const int fed, const int uRos)
int l1AFifoOccupancy() const
bool eventHasErrors() const
void bookHistos(DQMStore::IBooker &, const int fedMin, const int fedMax)
edm::EDGetTokenT< DTuROSFEDDataCollection > fedToken
bool check() const
Check that the trailer is OK.
void processuROS(DTuROSROSData &data, int fed, int uRos)
void channelsInROS(int cerosMask, std::vector< int > &channels)
MonitorElement * hFEDFatal
uint32_t fragmentLength() const
The length of the event fragment counted in 64-bit words including header and trailer.
static const int DOCESLOTS
LuminosityBlockNumber_t luminosityBlock() const
edm::EDGetTokenT< DTROS25Collection > ros25Token
const DTLocalTriggerTrailerWord & getSCTrailer() const
int warningROSPAF() const
DTDataIntegrityTask(const edm::ParameterSet &ps)
std::map< std::string, std::map< int, DTTimeEvolutionHisto * > > fedTimeHistos
void processROS25(DTROS25Data &data, int dduID, int ros)
const std::vector< DTROSDebugWord > & getROSDebugs() const
const std::vector< DTDDUFirstStatusWord > & getFirstStatusWord() const
std::map< std::string, std::map< int, MonitorElement * > > summaryHistos
int theROS(int slot, int link)
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
const DTROSTrailerWord & getROSTrailer() const
const DTROSHeaderWord & getROSHeader() const
void beginLuminosityBlock(const edm::LuminosityBlock &ls, const edm::EventSetup &es) override
std::map< unsigned int, MonitorElement * > urosHistos
void analyze(const edm::Event &e, const edm::EventSetup &c) override
~DTDataIntegrityTask() override
void endLuminosityBlock(const edm::LuminosityBlock &ls, const edm::EventSetup &es) override
DTuROSROSData getuROS(int slot) const
int getokxflag(int i) const
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
std::map< std::string, std::map< int, MonitorElement * > > fedHistos
const FEDTrailer & getDDUTrailer() const
MonitorElement * nEventMonitor
int inputFifoAlmostFull() const
int inputFifoFull() const
std::string topFolder(bool isFEDIntegrity) const
const FEDHeader & getDDUHeader() const
Getters.
uint8_t ttsBits() const
Current value of the Trigger Throttling System bits.
MonitorElement * hFEDEntry
void setROB(const int &ID)
std::map< std::string, std::map< int, MonitorElement * > > rosHistos
void setROS(const int &ID)
const std::vector< DTROBTrailerWord > & getROBTrailers() const
int geterror(int i) const
int geterrorROBID(int i) const
void processFED(DTuROSFEDData &data, int fed)
void channelsInCEROS(int cerosId, int chMask, std::vector< int > &channels)
int outputFifoAlmostFull() const
void setDDU(const int &ID)
need to reset the bits before setting
char data[epos_bytes_allocation]
void bookHistosROS25(DQMStore::IBooker &, DTROChainCoding code)
int getslotsize(int slot) const
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
const std::vector< DTROSErrorWord > & getROSErrors() const
MonitorElement * hTTSSummary
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
std::map< std::string, std::map< int, DTTimeEvolutionHisto * > > rosTimeHistos
void fedNonFatal(int dduID)
int fifoAlmostFull() const
const std::vector< DTTDCError > & getTDCError() const
const DTDDUSecondStatusWord & getSecondStatusWord() const
int outOfSynchROSError() const
MonitorElement * hCorruptionSummary
std::map< unsigned int, DTTimeEvolutionHisto * > urosTimeHistos
edm::EDGetTokenT< DTDDUCollection > dduToken
int theDDU(int crate, int slot, int link, bool tenDDU)
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)