33 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
34 <<
"[DTDataIntegrityTask]: Constructor" <<endl;
63 if (processingMode ==
"Online") {
65 }
else if(processingMode ==
"SM") {
67 }
else if (processingMode ==
"Offline") {
69 }
else if (processingMode ==
"HLT") {
73 <<
"[DTDataIntegrityTask]: processingMode :" << processingMode
74 <<
" invalid! Must be Online, SM, Offline or HLT !" << endl;
81 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
82 <<
"[DTDataIntegrityTask]: Destructor. Analyzed "<<
neventsFED <<
" events"<<endl;
83 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
84 <<
"[DTDataIntegrityTask]: postEndJob called!" <<endl;
104 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask") <<
"[DTDataIntegrityTask]: postBeginJob" <<endl;
106 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask") <<
"[DTDataIntegrityTask] Get DQMStore service" << endl;
110 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
126 for(
int uRos = 1; uRos <=
NuROS; ++uRos) {
145 for(
int ros = 1; ros <=
NuROS; ++ros) {
162 int nFED = (fedMax - fedMin)+1;
164 hFEDEntry = ibooker.
book1D(
"FEDEntries",
"# entries per DT FED",nFED,fedMin,fedMax+1);
167 hFEDFatal = ibooker.
book1D(
"FEDFatal",
"# fatal errors DT FED",nFED,fedMin,fedMax+1);
168 hFEDNonFatal = ibooker.
book1D(
"FEDNonFatal",
"# NON fatal errors DT FED",nFED,fedMin,fedMax+1);
173 hTTSSummary = ibooker.
book2D(
"TTSSummary",
"Summary Status TTS",nFED,fedMin,fedMax+1,9,1,10);
187 nFED,fedMin,fedMax+1, 8, 1, 9);
203 string wheel =
"ZERO";
206 string fed_s = to_string(fed);
207 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
208 <<
" Booking histos for FED: " << fed_s
209 <<
" folder: " <<
folder << endl;
221 histoType =
"EventLenght";
222 histoName =
"FED" + fed_s +
"_" + histoType;
223 histoTitle =
"Event Lenght (Bytes) FED " + fed_s;
224 (
fedHistos[histoType])[fed] = ibooker.
book1D(histoName,histoTitle,501,0,30000);
228 histoType =
"uROSStatus";
229 histoName =
"FED" + fed_s +
"_" + histoType;
230 (
fedHistos[histoType])[fed] = ibooker.
book2D(histoName,histoName,12,0,12,12,1,13);
261 histoType =
"FEDAvgEvLenghtvsLumi";
262 histoName =
"FED" + fed_s +
"_" + histoType;
263 histoTitle =
"Avg Event Lenght (Bytes) vs LumiSec FED " + fed_s;
266 histoType =
"TTSValues";
267 histoName =
"FED" + fed_s +
"_" + histoType;
268 (
fedHistos[histoType])[fed] = ibooker.
book1D(histoName,histoName,8,0,8);
279 histoType =
"uROSList";
280 histoName =
"FED" + fed_s +
"_" + histoType;
281 histoTitle =
"# of uROS in the FED payload (FED" + fed_s +
")";
282 (
fedHistos[histoType])[fed] = ibooker.
book1D(histoName,histoTitle,13,0,13);
285 histoName =
"FED" + fed_s +
"_BXID";
286 histoTitle =
"Distrib. BX ID (FED" + fed_s +
")";
287 (
fedHistos[histoType])[fed] = ibooker.
book1D(histoName,histoTitle,3600,0,3600);
297 histoType =
"uROSSummary";
298 histoName =
"FED" + fed_s +
"_uROSSummary";
299 string histoTitle =
"Summary Wheel" + wheel +
" (FED " + fed_s +
")";
346 string dduID_s = to_string(code.
getDDU());
347 string rosID_s = to_string(code.
getROS());
348 string robID_s = to_string(code.
getROB());
350 string wheel_s = to_string(wheel);
352 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
353 <<
" Booking histos for FED: " << code.
getDDU() <<
" ROS: " << code.
getROS()
354 <<
" ROB: " << code.
getROB() <<
" folder: " <<
folder << endl;
366 histoType =
"EventLenght";
367 histoName =
"FED" + dduID_s +
"_" + histoType;
368 histoTitle =
"Event Lenght (Bytes) FED " + dduID_s;
373 histoType =
"ROSStatus";
374 histoName =
"FED" + dduID_s +
"_" + histoType;
405 histoType =
"FEDAvgEvLenghtvsLumi";
406 histoName =
"FED" + dduID_s +
"_" + histoType;
407 histoTitle =
"Avg Event Lenght (Bytes) vs LumiSec FED " + dduID_s;
410 histoType =
"TTSValues";
411 histoName =
"FED" + dduID_s +
"_" + histoType;
423 histoType =
"EventType";
424 histoName =
"FED" + dduID_s +
"_" + histoType;
430 histoType =
"ROSList";
431 histoName =
"FED" + dduID_s +
"_" + histoType;
432 histoTitle =
"# of ROS in the FED payload (FED" + dduID_s +
")";
435 histoType =
"FIFOStatus";
436 histoName =
"FED" + dduID_s +
"_" + histoType;
451 histoName =
"FED" + dduID_s +
"_BXID";
452 histoTitle =
"Distrib. BX ID (FED" + dduID_s +
")";
458 if (
folder ==
"ROS_S" ) {
463 histoType =
"ROSSummary";
464 histoName =
"FED" + dduID_s +
"_ROSSummary";
465 string histoTitle =
"Summary Wheel" + wheel_s +
" (FED " + dduID_s +
")";
511 histoType =
"ROSError";
512 histoName =
"FED" + dduID_s +
"_" +
folder + rosID_s +
"_ROSError";
513 histoTitle = histoName +
" (ROBID error summary)";
570 histoType =
"ROSEventLenght";
571 histoName =
"FED" + dduID_s +
"_" +
folder + rosID_s +
"_ROSEventLenght";
572 histoTitle =
"Event Lenght (Bytes) FED " + dduID_s +
" ROS " + rosID_s;
575 histoType =
"ROSAvgEventLenghtvsLumi";
576 histoName =
"FED" + dduID_s +
"_" +
folder + rosID_s + histoType;
577 histoTitle =
"Event Lenght (Bytes) FED " + dduID_s +
" ROS " + rosID_s;
580 histoType =
"TDCError";
581 histoName =
"FED" + dduID_s +
"_" +
folder + rosID_s +
"_TDCError";
582 histoTitle = histoName +
" (ROBID error summary)";
637 histoType =
"ROB_mean";
638 histoName =
"FED" + dduID_s +
"_" +
"ROS" + rosID_s +
"_ROB_mean";
639 string fullName =
topFolder(
false) +
"FED" + dduID_s +
"/" +
folder + rosID_s+
"/" + histoName;
640 names.insert (pair<std::string,std::string> (histoType,
string(fullName)));
654 histoType =
"SCSizeVsROSSize";
655 histoName =
"FED" + dduID_s +
"_SCSizeVsROSSize";
656 histoTitle =
"SC size vs SC (FED " + dduID_s +
")";
675 string fed_s = to_string(fed);
676 string uRos_s = to_string(uRos);
680 string counter_s = to_string(
counter);
681 string histoType =
"uROSError"+counter_s;
682 int linkDown =
counter*24;
string linkDown_s = to_string(linkDown);
683 int linkUp = linkDown+23;
string linkUp_s = to_string(linkUp);
684 string histoName =
"FED" + fed_s +
"_" +
"uROS" + uRos_s +
"_"+histoType;
685 string histoTitle = histoName +
" (Link " + linkDown_s +
"-"+ linkUp_s +
" error summary)";
709 for (
int link=linkDown; link < (linkUp+1); ++link){
710 string link_s = to_string(link);
711 histo->
setBinLabel(link-linkDown+1,
"Link"+link_s,2);
718 string histoType =
"uROSEventLenght";
719 string histoName =
"FED" + fed_s +
"_uROS" + uRos_s +
"_" +
"EventLenght";
720 string histoTitle =
"Event Lenght (Bytes) FED " + fed_s +
" uROS" + uRos_s;
724 histoType =
"uROSAvgEventLenghtvsLumi";
725 histoName =
"FED" + fed_s +
"_uROS" + uRos_s +
"AvgEventLenghtvsLumi";
726 histoTitle =
"Event Lenght (Bytes) FED " + fed_s +
" uROS" + uRos_s;
727 keyHisto = (fed-
FEDIDmin)*100 + (uRos-1);
731 string counter_s = to_string(
counter);
732 string histoType =
"TDCError"+counter_s;
733 int linkDown =
counter*24;
string linkDown_s = to_string(linkDown);
734 int linkUp = linkDown+23;
string linkUp_s = to_string(linkUp);
735 string histoName =
"FED" + fed_s +
"_" +
"uROS" + uRos_s +
"_"+histoType;
736 string histoTitle = histoName +
" (Link " + linkDown_s +
"-"+ linkUp_s +
" error summary)";
766 for (
int link=linkDown; link < (linkUp+1); ++link){
767 string link_s = to_string(link);
768 histo->
setBinLabel(link-linkDown+1,
"Link"+link_s,2);
772 histoType =
"TTSValues";
773 histoName =
"FED" + fed_s +
"_" +
"uROS" + uRos_s +
"_" + histoType;
794 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
795 <<
"[DTDataIntegrityTask]: " <<
neventsuROS <<
" events analyzed by processuROS" << endl;
803 uROSStatus =
fedHistos[
"uROSStatus"][fed];
806 LogError(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask") <<
807 "Trying to access non existing ME at FED " << fed <<
821 if ((!uROSError2) || (!uROSError1) || (!uROSError0) ) {
822 LogError(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask") <<
823 "Trying to access non existing ME at uROS " << uRos <<
831 for (
unsigned int link = 0; link<72; ++link){
834 if (
flag==0) {sumOKs+=1;
837 if (link<24) uROSError0->
Fill(
flag-1,link);
838 else if (link<48) uROSError1->
Fill(
flag-1,link-23);
839 else if (link<72) uROSError2->
Fill(
flag-1,link-47);
846 if(sumOKs!=0) uROSSummary->
Fill(12, uRos);
858 for (
unsigned int icounter = 0; icounter<data.
geterrors().size(); ++icounter){
862 int tdcError_ROSSummary = 0;
863 int tdcError_ROSError = 0;
864 int tdcError_TDCHisto = 0;
866 if(error & 0x4000 ) {
867 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
868 <<
" ROS " << uRos <<
" ROB " << link
869 <<
" Internal fatal Error 4000 in TDC " << error << endl;
871 tdcError_ROSSummary = 13;
872 tdcError_ROSError = 5;
873 tdcError_TDCHisto = 0;
875 }
else if ( error & 0x0249 ) {
876 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
877 <<
" ROS " << uRos <<
" ROB " << link
878 <<
" TDC FIFO overflow in TDC " << error << endl;
880 tdcError_ROSSummary = 14;
881 tdcError_ROSError = 6;
882 tdcError_TDCHisto = 1;
884 }
else if ( error & 0x0492 ) {
885 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
886 <<
" ROS " << uRos <<
" ROB " << link
887 <<
" TDC L1 buffer overflow in TDC " << error << endl;
889 tdcError_ROSSummary = 15;
890 tdcError_ROSError = 7;
891 tdcError_TDCHisto = 2;
893 }
else if ( error & 0x2000 ) {
894 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
895 <<
" ROS " << uRos <<
" ROB " << link
896 <<
" TDC L1A FIFO overflow in TDC " << error << endl;
898 tdcError_ROSSummary = 16;
899 tdcError_ROSError = 8;
900 tdcError_TDCHisto = 3;
902 }
else if ( error & 0x0924 ) {
903 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
904 <<
" uROS " << uRos <<
" ROB " << link
905 <<
" TDC hit error in TDC " << error << endl;
907 tdcError_ROSSummary = 17;
908 tdcError_ROSError = 9;
909 tdcError_TDCHisto = 4;
911 }
else if ( error & 0x1000 ) {
912 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
913 <<
" uROS " << uRos <<
" ROB " << link
914 <<
" TDC hit rejected in TDC " << error << endl;
916 tdcError_ROSSummary = 18;
917 tdcError_ROSError = 10;
918 tdcError_TDCHisto = 5;
921 LogWarning(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
922 <<
" TDC error code not known " << error << endl;
925 uROSSummary->
Fill(tdcError_ROSSummary,uRos);
928 if (link<24) uROSError0->
Fill(tdcError_ROSError,link);
929 else if (link<48) uROSError1->
Fill(tdcError_ROSError,link-23);
930 else if (link<72) uROSError2->
Fill(tdcError_ROSError,link-47);
942 int ttsCodeValue = -1;
975 LogError(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
976 <<
"[DTDataIntegrityTask] FED User control: wrong TTS value "<< value <<
" in FED " << fed <<
" uROS "<< uRos<< endl;
984 int uRosEventLenght = (data.
gettrailer() & 0xFFFFF)*8;
987 if(uRosEventLenght > 5000) uRosEventLenght = 5000;
999 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1000 <<
"[DTDataIntegrityTask]: " <<
neventsuROS <<
" events analyzed by processROS25" << endl;
1015 if ( (
mode<=2) && (!ROSError) ) {
1016 LogError(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask") <<
1017 "Trying to access non existing ME at ROSID " << code.
getROSID() <<
1030 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask") <<
" TXP error en ROS " 1031 << code.
getROS() << endl;
1041 for (vector<DTROSErrorWord>::const_iterator error_it = data.
getROSErrors().begin();
1044 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask") <<
" Error in ROS " << code.
getROS()
1045 <<
" ROB Id " << (*error_it).robID()
1046 <<
" Error type " << (*error_it).errorType() << endl;
1049 ROSSummary->
Fill((*error_it).errorType(), code.
getROS());
1050 if((*error_it).errorType() <= 11) {
1056 if ((*error_it).robID() != 31) {
1057 ROSError->
Fill((*error_it).errorType(),(*error_it).robID());
1059 else if ((*error_it).errorType() == 4) {
1060 vector<int> channelBins;
1062 vector<int>::const_iterator channelIt = channelBins.begin();
1063 vector<int>::const_iterator channelEnd = channelBins.end();
1064 for(;channelIt!=channelEnd;++channelIt) {
1065 ROSError->
Fill(4,(*channelIt));
1072 int ROSDebug_BunchNumber = -1;
1074 for (vector<DTROSDebugWord>::const_iterator debug_it = data.
getROSDebugs().begin();
1077 int debugROSSummary = 0;
1078 int debugROSError = 0;
1079 vector<int> debugBins;
1080 bool hasEvIdMis =
false;
1081 vector<int> evIdMisBins;
1083 if ((*debug_it).debugType() == 0 ) {
1084 ROSDebug_BunchNumber = (*debug_it).debugMessage();
1085 }
else if ((*debug_it).debugType() == 1 ) {
1088 }
else if ((*debug_it).debugType() == 2 ) {
1091 }
else if ((*debug_it).debugType() == 3) {
1092 if ((*debug_it).dontRead()){
1093 debugROSSummary = 11;
1095 if (
mode <= 2)
channelsInCEROS((*debug_it).cerosIdCerosStatus(),(*debug_it).dontRead(),debugBins);
1096 }
if ((*debug_it).evIdMis()){
1098 if (
mode <= 2)
channelsInCEROS((*debug_it).cerosIdCerosStatus(),(*debug_it).evIdMis(),evIdMisBins);
1100 }
else if ((*debug_it).debugType() == 4 &&
1101 (*debug_it).cerosIdRosStatus()){
1102 debugROSSummary = 13;
1107 if (debugROSSummary) {
1108 ROSSummary->
Fill(debugROSSummary,code.
getROS());
1110 vector<int>::const_iterator channelIt = debugBins.begin();
1111 vector<int>::const_iterator channelEnd = debugBins.end();
1112 for (;channelIt!=channelEnd;++channelIt) {
1113 ROSError->
Fill(debugROSError,(*channelIt));
1121 vector<int>::const_iterator channelIt = evIdMisBins.begin();
1122 vector<int>::const_iterator channelEnd = evIdMisBins.end();
1123 for (;channelIt!=channelEnd;++channelIt) {
1124 ROSError->
Fill(9,(*channelIt));
1133 for (vector<DTROBHeader>::const_iterator rob_it = data.
getROBHeaders().begin();
1136 code.
setROB((*rob_it).first);
1141 if (robheader.
bunchID() != ROSDebug_BunchNumber) {
1154 for (vector<DTROBTrailerWord>::const_iterator robt_it = data.
getROBTrailers().begin();
1156 float wCount = (*robt_it).wordCount()<100. ? (*robt_it).wordCount() : 99.9;
1164 if(rosEventLenght > 1600) rosEventLenght = 1600;
1170 for (vector<DTTDCData>::const_iterator tdc_it = data.
getTDCData().begin();
1171 tdc_it != data.
getTDCData().end(); tdc_it++) {
1175 if ( tdcDatum.
PC() !=0) {
1176 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1177 <<
" PC error in ROS " << code.
getROS() <<
" TDC " << (*tdc_it).first << endl;
1184 if(
mode <= 2) ROSError->
Fill(6,(*tdc_it).first);
1189 for (vector<DTTDCError>::const_iterator tdc_it = data.
getTDCError().begin();
1192 code.
setROB((*tdc_it).first);
1194 int tdcError_ROSSummary = 0;
1195 int tdcError_ROSError = 0;
1196 int tdcError_TDCHisto = 0;
1198 if(((*tdc_it).second).tdcError() & 0x4000 ) {
1199 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1200 <<
" ROS " << code.
getROS() <<
" ROB " << code.
getROB()
1201 <<
" Internal fatal Error 4000 in TDC " << (*tdc_it).first << endl;
1203 tdcError_ROSSummary = 14;
1204 tdcError_ROSError = 11;
1205 tdcError_TDCHisto = 0;
1207 }
else if ( ((*tdc_it).second).tdcError() & 0x0249 ) {
1208 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1209 <<
" ROS " << code.
getROS() <<
" ROB " << code.
getROB()
1210 <<
" TDC FIFO overflow in TDC " << (*tdc_it).first << endl;
1212 tdcError_ROSSummary = 15;
1213 tdcError_ROSError = 12;
1214 tdcError_TDCHisto = 1;
1216 }
else if ( ((*tdc_it).second).tdcError() & 0x0492 ) {
1217 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1218 <<
" ROS " << code.
getROS() <<
" ROB " << code.
getROB()
1219 <<
" TDC L1 buffer overflow in TDC " << (*tdc_it).first << endl;
1221 tdcError_ROSSummary = 16;
1222 tdcError_ROSError = 13;
1223 tdcError_TDCHisto = 2;
1225 }
else if ( ((*tdc_it).second).tdcError() & 0x2000 ) {
1226 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1227 <<
" ROS " << code.
getROS() <<
" ROB " << code.
getROB()
1228 <<
" TDC L1A FIFO overflow in TDC " << (*tdc_it).first << endl;
1230 tdcError_ROSSummary = 17;
1231 tdcError_ROSError = 14;
1232 tdcError_TDCHisto = 3;
1234 }
else if ( ((*tdc_it).second).tdcError() & 0x0924 ) {
1235 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1236 <<
" ROS " << code.
getROS() <<
" ROB " << code.
getROB()
1237 <<
" TDC hit error in TDC " << (*tdc_it).first << endl;
1239 tdcError_ROSSummary = 18;
1240 tdcError_ROSError = 15;
1241 tdcError_TDCHisto = 4;
1243 }
else if ( ((*tdc_it).second).tdcError() & 0x1000 ) {
1244 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1245 <<
" ROS " << code.
getROS() <<
" ROB " << code.
getROB()
1246 <<
" TDC hit rejected in TDC " << (*tdc_it).first << endl;
1248 tdcError_ROSSummary = 19;
1249 tdcError_ROSError = 16;
1250 tdcError_TDCHisto = 5;
1253 LogWarning(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1254 <<
" TDC error code not known " << ((*tdc_it).second).tdcError() << endl;
1257 ROSSummary->
Fill(tdcError_ROSSummary,code.
getROS());
1259 if(tdcError_ROSSummary <= 15) {
1264 ROSError->
Fill(tdcError_ROSError,(*tdc_it).first);
1266 rosHistos[
"TDCError"][code.
getROSID()]->Fill(tdcError_TDCHisto+6*((*tdc_it).second).tdcID(),(*tdc_it).first);
1284 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1285 <<
"[DTDataIntegrityTask]: " <<
neventsFED <<
" events analyzed by processFED" << endl;
1287 if(fed < FEDIDmin || fed >
FEDIDmax)
return;
1296 fedHistos[
"EventLenght"][fed]->Fill(fedEvtLenght);
1298 if(
mode > 1)
return;
1300 fedTimeHistos[
"FEDAvgEvLenghtvsLumi"][fed]->accumulateValueTimeSlot(fedEvtLenght);
1312 int ttsCodeValue = -1;
1344 LogError(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1345 <<
"[DTDataIntegrityTask] FED TTS control: wrong TTS value "<< value <<
" in FED "<< fed<< endl;
1349 if(
mode < 1)
fedHistos[
"TTSValues"][fed]->Fill(ttsCodeValue);
1359 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1360 <<
"[DTDataIntegrityTask]: " <<
neventsFED <<
" events analyzed by processFED" << endl;
1373 if(!header.
check()) {
1379 if(!trailer.
check()) {
1399 int ttsCodeValue = -1;
1400 int ttsSummaryBin = -1;
1419 bool knownOrigin =
false;
1436 if(!knownOrigin) ttsSummaryBin = 9;
1442 bool knownOrigin =
false;
1451 if(!knownOrigin) ttsSummaryBin = 9;
1467 LogError(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1468 <<
"[DTDataIntegrityTask] DDU control: wrong TTS value "<<trailer.
ttsBits()<<endl;
1473 if(ttsSummaryBin != -1) {
1482 int rosList = secondWord.
rosList();
1483 set<int> rosPositions;
1484 for(
int i=0;
i<12;
i++) {
1486 rosPositions.insert(
i);
1494 for (vector<DTDDUFirstStatusWord>::const_iterator fsw_it = data.
getFirstStatusWord().begin();
1498 hROSStatus->
Fill(0,channel,(*fsw_it).channelEnabled());
1499 hROSStatus->
Fill(1,channel,(*fsw_it).timeout());
1500 hROSStatus->
Fill(2,channel,(*fsw_it).eventTrailerLost());
1501 hROSStatus->
Fill(3,channel,(*fsw_it).opticalFiberSignalLost());
1502 hROSStatus->
Fill(4,channel,(*fsw_it).tlkPropagationError());
1503 hROSStatus->
Fill(5,channel,(*fsw_it).tlkPatternError());
1504 hROSStatus->
Fill(6,channel,(*fsw_it).tlkSignalLost());
1505 hROSStatus->
Fill(7,channel,(*fsw_it).errorFromROS());
1508 if((*fsw_it).channelEnabled() == 1 &&
1509 rosPositions.find(channel) == rosPositions.end()) {
1510 if(
mode <= 2) hROSStatus->
Fill(9,channel,1);
1523 if((rosBXIds.size() > 1 || rosBXIds.find(header.
bxID()) == rosBXIds.end()) && !rosBXIds.empty() ) {
1524 for(vector<DTROS25Data>::const_iterator rosControlData = rosData.begin();
1525 rosControlData != rosData.end(); ++rosControlData) {
1526 for (vector<DTROSDebugWord>::const_iterator debug_it = (*rosControlData).getROSDebugs().begin();
1527 debug_it != (*rosControlData).getROSDebugs().end(); debug_it++) {
1528 if ((*debug_it).debugType() == 0 && (*debug_it).debugMessage() != header.
bxID()) {
1529 int ros = (*rosControlData).getROSID();
1531 if(
mode <= 2) hROSStatus->
Fill(11,ros-1);
1543 LogWarning(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1544 <<
"ERROR: FED " << ddu <<
" BX ID different from other feds: " << header.
bxID() << endl;
1553 if((rosL1AIds.size() > 1 || rosL1AIds.find(header.
lvl1ID()-1) == rosL1AIds.end()) && !rosL1AIds.empty() ){
1555 for (vector<DTROS25Data>::const_iterator rosControlData = rosData.begin();
1556 rosControlData != rosData.end(); rosControlData++) {
1557 unsigned int ROSHeader_TTCCount = ((*rosControlData).getROSHeader().TTCEventCounter() + 1) % 0x1000000;
1558 if( ROSHeader_TTCCount != header.
lvl1ID() ) {
1559 int ros = (*rosControlData).getROSID();
1560 if(
mode <= 2) hROSStatus->
Fill(10,ros-1);
1573 if(
mode > 1)
return;
1585 int fifoFull = secondWord.
fifoFull();
1589 for(
int i=0;
i<3;
i++){
1590 if(inputFifoFull & 0
x1){
1591 hFIFOStatus->
Fill(
i,0);
1593 if(inputFifoAlmostFull & 0x1){
1594 hFIFOStatus->
Fill(
i,1);
1597 hFIFOStatus->
Fill(3+
i,0);
1599 if(fifoAlmostFull & 0x1){
1600 hFIFOStatus->
Fill(3+
i,1);
1602 if(!(inputFifoFull & 0x1) && !(inputFifoAlmostFull & 0x1)){
1603 hFIFOStatus->
Fill(
i,2);
1605 if(!(fifoFull & 0x1) && !(fifoAlmostFull & 0x1)){
1606 hFIFOStatus->
Fill(3+
i,2);
1608 inputFifoFull >>= 1;
1609 inputFifoAlmostFull >>= 1;
1611 fifoAlmostFull >>= 1;
1615 hFIFOStatus->
Fill(6,0);
1617 if(outputFifoAlmostFull){
1618 hFIFOStatus->
Fill(6,1);
1620 if(!outputFifoFull && !outputFifoAlmostFull){
1621 hFIFOStatus->
Fill(6,2);
1661 folder =
"DT/00-DataIntegrity/";
1668 for (
int iCh=0; iCh<6;++iCh) {
1669 if ((chMask >> iCh) & 0
x1){
1670 channels.push_back(cerosId*6+iCh);
1677 for (
int iCeros=0; iCeros<5;++iCeros) {
1678 if ((cerosMask >> iCeros) & 0
x1){
1679 for (
int iCh=0; iCh<6;++iCh) {
1680 channels.push_back(iCeros*6+iCh);
1698 map<string, map<int, DTTimeEvolutionHisto*> >::iterator fedIt =
fedTimeHistos.begin();
1699 map<string, map<int, DTTimeEvolutionHisto*> >::iterator fedEnd =
fedTimeHistos.end();
1700 for(; fedIt!=fedEnd; ++fedIt) {
1701 map<int, DTTimeEvolutionHisto*>::iterator histoIt = fedIt->second.begin();
1702 map<int, DTTimeEvolutionHisto*>::iterator histoEnd = fedIt->second.end();
1703 for(; histoIt!=histoEnd; ++histoIt) {
1704 histoIt->second->updateTimeSlot(lumiBlock,
nEventsLS);
1708 map<unsigned int, DTTimeEvolutionHisto*>::iterator urosIt =
urosTimeHistos.begin();
1709 map<unsigned int, DTTimeEvolutionHisto*>::iterator urosEnd =
urosTimeHistos.end();
1710 for(; urosIt!=urosEnd; ++urosIt) {
1711 urosIt->second->updateTimeSlot(lumiBlock,
nEventsLS);
1716 map<string, map<int, DTTimeEvolutionHisto*> >::iterator dduIt =
fedTimeHistos.begin();
1717 map<string, map<int, DTTimeEvolutionHisto*> >::iterator dduEnd =
fedTimeHistos.end();
1718 for(; dduIt!=dduEnd; ++dduIt) {
1719 map<int, DTTimeEvolutionHisto*>::iterator histoIt = dduIt->second.begin();
1720 map<int, DTTimeEvolutionHisto*>::iterator histoEnd = dduIt->second.end();
1721 for(; histoIt!=histoEnd; ++histoIt) {
1722 histoIt->second->updateTimeSlot(lumiBlock,
nEventsLS);
1726 map<string, map<int, DTTimeEvolutionHisto*> >::iterator rosIt =
rosTimeHistos.begin();
1727 map<string, map<int, DTTimeEvolutionHisto*> >::iterator rosEnd =
rosTimeHistos.end();
1728 for(; rosIt!=rosEnd; ++rosIt) {
1729 map<int, DTTimeEvolutionHisto*>::iterator histoIt = rosIt->second.begin();
1730 map<int, DTTimeEvolutionHisto*>::iterator histoEnd = rosIt->second.end();
1731 for(; histoIt!=histoEnd; ++histoIt) {
1732 histoIt->second->updateTimeSlot(lumiBlock,
nEventsLS);
1745 LogTrace(
"DTRawToDigi|TDQM|DTMonitorModule|DTDataIntegrityTask") <<
"[DTDataIntegrityTask]: preProcessEvent" <<endl;
1755 for(
unsigned int j=0; j <fedCol->size();++j){
1756 fedData = fedCol->at(j);
1757 int fed = fedData.
getfed();
1759 LogError(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask") <<
"[DTDataIntegrityTask]: analyze, FED ID " << fed <<
" not expected." << endl;
1764 for(
int slot=1; slot<=
DOCESLOTS; ++slot)
1766 urosData = fedData.
getuROS(slot);
1776 (*rosBxIds).second.clear();
1782 (*rosL1AIds).second.clear();
1795 std::vector<DTROS25Data> ros25Data;
1797 for(
unsigned int i=0;
i<dduProduct->size(); ++
i)
1799 dduData = dduProduct->at(
i);
1800 ros25Data = ros25Product->at(
i);
1807 for(
unsigned int j=0; j < ros25Data.size(); ++j) {
std::map< int, std::set< int > > rosBxIdsPerFED
std::multimap< std::string, std::string > names
std::map< int, std::set< int > > rosL1AIdsPerFED
int EventWordCount() const
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
int outputFifoFull() const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::string fedIntegrityFolder
MonitorElement * hFEDNonFatal
int geterrorTDCID(int i) const
void bookHistosuROS(DQMStore::IBooker &, const int fed, const int uRos)
int l1AFifoOccupancy() const
bool eventHasErrors() const
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)
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
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
MonitorElement * book1D(Args &&...args)
void endLuminosityBlock(const edm::LuminosityBlock &ls, const edm::EventSetup &es) override
DTuROSROSData getuROS(int slot) const
int getokxflag(int i) const
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.
void setCurrentFolder(const std::string &fullpath)
uint8_t ttsBits() const
Current value of the Trigger Throttling System bits.
MonitorElement * hFEDEntry
MonitorElement * book2D(Args &&...args)
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
const std::vector< DTROSErrorWord > & getROSErrors() const
MonitorElement * hTTSSummary
static std::atomic< unsigned int > counter
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
std::map< std::string, std::map< int, DTTimeEvolutionHisto * > > rosTimeHistos
void fedNonFatal(int dduID)
MonitorElement * bookFloat(Args &&...args)
int fifoAlmostFull() const
const std::vector< DTTDCError > & getTDCError() const
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
const DTDDUSecondStatusWord & getSecondStatusWord() const
int outOfSynchROSError() const
MonitorElement * hCorruptionSummary
std::map< unsigned int, DTTimeEvolutionHisto * > urosTimeHistos
edm::EDGetTokenT< DTDDUCollection > dduToken