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;
105 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask") <<
"[DTDataIntegrityTask]: postBeginJob" <<endl;
107 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask") <<
"[DTDataIntegrityTask] Get DQMStore service" << endl;
111 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
127 for(
int uRos = 1; uRos <=
NuROS; ++uRos) {
133 for(
int ros = 1; ros <=
NuROS; ++ros) {
153 for(
int ros = 1; ros <=
NuROS; ++ros) {
170 int nFED = (fedMax - fedMin)+1;
172 hFEDEntry = ibooker.
book1D(
"FEDEntries",
"# entries per DT FED",nFED,fedMin,fedMax+1);
175 string histoType =
"ROSSummary";
177 string wheel_s = to_string(
wheel);
178 string histoName =
"ROSSummary_W"+wheel_s;
179 string fed_s = to_string(
FEDIDmin+1);
182 string histoTitle =
"Summary Wheel" + wheel_s +
" (FED " + fed_s +
")";
215 hFEDFatal = ibooker.
book1D(
"FEDFatal",
"# fatal errors DT FED",nFED,fedMin,fedMax+1);
216 hFEDNonFatal = ibooker.
book1D(
"FEDNonFatal",
"# NON fatal errors DT FED",nFED,fedMin,fedMax+1);
221 hTTSSummary = ibooker.
book2D(
"TTSSummary",
"Summary Status TTS",nFED,fedMin,fedMax+1,9,1,10);
235 nFED,fedMin,fedMax+1, 8, 1, 9);
251 string wheel =
"ZERO";
254 string fed_s = to_string(fed);
255 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
256 <<
" Booking histos for FED: " << fed_s
257 <<
" folder: " <<
folder << endl;
269 histoType =
"EventLength";
270 histoName =
"FED" + fed_s +
"_" + histoType;
271 histoTitle =
"Event Length (Bytes) FED " + fed_s;
272 (
fedHistos[histoType])[fed] = ibooker.
book1D(histoName,histoTitle,501,0,30000);
276 histoType =
"uROSStatus";
277 histoName =
"FED" + fed_s +
"_" + histoType;
278 (
fedHistos[histoType])[fed] = ibooker.
book2D(histoName,histoName,12,0,12,12,1,13);
309 histoType =
"FEDAvgEvLengthvsLumi";
310 histoName =
"FED" + fed_s +
"_" + histoType;
311 histoTitle =
"Avg Event Length (Bytes) vs LumiSec FED " + fed_s;
314 histoType =
"TTSValues";
315 histoName =
"FED" + fed_s +
"_" + histoType;
316 (
fedHistos[histoType])[fed] = ibooker.
book1D(histoName,histoName,8,0,8);
327 histoType =
"uROSList";
328 histoName =
"FED" + fed_s +
"_" + histoType;
329 histoTitle =
"# of uROS in the FED payload (FED" + fed_s +
")";
330 (
fedHistos[histoType])[fed] = ibooker.
book1D(histoName,histoTitle,13,0,13);
333 histoName =
"FED" + fed_s +
"_BXID";
334 histoTitle =
"Distrib. BX ID (FED" + fed_s +
")";
335 (
fedHistos[histoType])[fed] = ibooker.
book1D(histoName,histoTitle,3600,0,3600);
345 histoType =
"uROSSummary";
346 histoName =
"FED" + fed_s +
"_uROSSummary";
347 string histoTitle =
"Summary Wheel" + wheel +
" (FED " + fed_s +
")";
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()
397 <<
" ROB: " << code.
getROB() <<
" folder: " <<
folder << endl;
409 histoType =
"EventLength";
410 histoName =
"FED" + dduID_s +
"_" + histoType;
411 histoTitle =
"Event Length (Bytes) FED " + dduID_s;
416 histoType =
"ROSStatus";
417 histoName =
"FED" + dduID_s +
"_" + histoType;
448 histoType =
"FEDAvgEvLengthvsLumi";
449 histoName =
"FED" + dduID_s +
"_" + histoType;
450 histoTitle =
"Avg Event Length (Bytes) vs LumiSec FED " + dduID_s;
453 histoType =
"TTSValues";
454 histoName =
"FED" + dduID_s +
"_" + histoType;
466 histoType =
"EventType";
467 histoName =
"FED" + dduID_s +
"_" + histoType;
473 histoType =
"ROSList";
474 histoName =
"FED" + dduID_s +
"_" + histoType;
475 histoTitle =
"# of ROS in the FED payload (FED" + dduID_s +
")";
478 histoType =
"FIFOStatus";
479 histoName =
"FED" + dduID_s +
"_" + histoType;
494 histoName =
"FED" + dduID_s +
"_BXID";
495 histoTitle =
"Distrib. BX ID (FED" + dduID_s +
")";
501 if (
folder ==
"ROS_S" ) {
506 histoType =
"ROSSummary";
507 histoName =
"FED" + dduID_s +
"_ROSSummary";
508 string histoTitle =
"Summary Wheel" + wheel_s +
" (FED " + dduID_s +
")";
554 histoType =
"ROSError";
555 histoName =
"FED" + dduID_s +
"_" +
folder + rosID_s +
"_ROSError";
556 histoTitle = histoName +
" (ROBID error summary)";
613 histoType =
"ROSEventLength";
614 histoName =
"FED" + dduID_s +
"_" +
folder + rosID_s +
"_ROSEventLength";
615 histoTitle =
"Event Length (Bytes) FED " + dduID_s +
" ROS " + rosID_s;
618 histoType =
"ROSAvgEventLengthvsLumi";
619 histoName =
"FED" + dduID_s +
"_" +
folder + rosID_s + histoType;
620 histoTitle =
"Event Length (Bytes) FED " + dduID_s +
" ROS " + rosID_s;
623 histoType =
"TDCError";
624 histoName =
"FED" + dduID_s +
"_" +
folder + rosID_s +
"_TDCError";
625 histoTitle = histoName +
" (ROBID error summary)";
680 histoType =
"ROB_mean";
681 histoName =
"FED" + dduID_s +
"_" +
"ROS" + rosID_s +
"_ROB_mean";
682 string fullName =
topFolder(
false) +
"FED" + dduID_s +
"/" +
folder + rosID_s+
"/" + histoName;
683 names.insert (pair<std::string,std::string> (histoType,
string(fullName)));
697 histoType =
"SCSizeVsROSSize";
698 histoName =
"FED" + dduID_s +
"_SCSizeVsROSSize";
699 histoTitle =
"SC size vs SC (FED " + dduID_s +
")";
718 string wheel_s = to_string(wheel);
719 string ros_s = to_string(ros);
722 string histoType =
"ROSError";
723 int linkDown = 0;
string linkDown_s = to_string(linkDown);
724 int linkUp = linkDown+24;
string linkUp_s = to_string(linkUp);
725 string histoName =
"W" + wheel_s +
"_" +
"ROS" + ros_s +
"_"+histoType;
726 string histoTitle = histoName +
" (Link " + linkDown_s +
"-"+ linkUp_s +
" error summary)";
750 for (
int link=linkDown; link < (linkUp+1); ++link){
751 string link_s = to_string(link);
759 histoType =
"TDCError";
760 linkDown = 0; linkDown_s = to_string(linkDown);
761 linkUp = linkDown+24; linkUp_s = to_string(linkUp);
762 histoName =
"W" + wheel_s +
"_" +
"ROS" + ros_s +
"_"+histoType;
763 histoTitle = histoName +
" (Link " + linkDown_s +
"-"+ linkUp_s +
" error summary)";
764 keyHisto = (
TDCError)*1000 + (wheel+2)*100 + (ros-1);
793 for (
int link=linkDown; link < (linkUp+1); ++link){
794 string link_s = to_string(link);
800 string fed_s = to_string(fed);
801 string uRos_s = to_string(uRos);
806 string histoType =
"uROSEventLength";
807 string histoName =
"FED" + fed_s +
"_uROS" + uRos_s +
"_" +
"EventLength";
808 string histoTitle =
"Event Length (Bytes) FED " + fed_s +
" uROS" + uRos_s;
812 histoType =
"uROSAvgEventLengthvsLumi";
813 histoName =
"FED" + fed_s +
"_ROS" + uRos_s +
"AvgEventLengthvsLumi";
814 histoTitle =
"Event Length (Bytes) FED " + fed_s +
" ROS" + uRos_s;
815 keyHisto = (fed-
FEDIDmin)*100 + (uRos-1);
818 histoType =
"TTSValues";
819 histoName =
"FED" + fed_s +
"_" +
"uROS" + uRos_s +
"_" + histoType;
840 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
841 <<
"[DTDataIntegrityTask]: " <<
neventsuROS <<
" events analyzed by processuROS" << endl;
849 uROSStatus =
fedHistos[
"uROSStatus"][fed];
852 LogError(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask") <<
853 "Trying to access non existing ME at FED " << fed <<
858 unsigned int slotMap = ( data.
getboardId() ) & 0xF;
859 if (slotMap==0)
return;
860 int ros =
theROS(slotMap, 0);
861 int ddu =
theDDU(fed, slotMap, 0, 0);
862 int wheel = (ddu - 770)%5 - 2;
871 int errorX[5][12]={{0}};
881 if ((!uROSError2) || (!uROSError1) || (!uROSError0) ) {
882 LogError(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask") <<
883 "Trying to access non existing ME at uROS " << uRos <<
889 for (
unsigned int link = 0; link<72; ++link){
893 if (
flag==0) value=5;
897 errorX[value-1][ros-1]+=1;
898 uROSError0->
Fill(value-1,link);
901 errorX[value-1][ros]+=1;
902 uROSError1->Fill(value-1,link-23);
905 errorX[value-1][ros+1]+=1;
906 uROSError2->Fill(value-1,link-47);
916 for (
unsigned int link = 0; link<12; ++link){
921 if (
flag==0) value=5;
927 LogError(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask") <<
928 "Trying to access non existing ME at uROS " << uRos <<
932 errorX[value-1][link]+=1;
933 uROSError0->
Fill(value-1,sc);
943 for (
unsigned int iros = 0; iros<12;++iros){
945 if(errorX[
bin][iros]!=0) ROSSummary->
Fill(
bin, iros+1);
958 for (
unsigned int icounter = 0; icounter<data.
geterrors().size(); ++icounter){
962 int tdcError_ROSSummary = 0;
963 int tdcError_ROSError = 0;
964 int tdcError_TDCHisto = 0;
966 if(error & 0x4000 ) {
967 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
968 <<
" ROS " << uRos <<
" ROB " << link
969 <<
" Internal fatal Error 4000 in TDC " << error << endl;
971 tdcError_ROSSummary = 5;
972 tdcError_ROSError = 5;
973 tdcError_TDCHisto = 0;
975 }
else if ( error & 0x0249 ) {
976 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
977 <<
" ROS " << uRos <<
" ROB " << link
978 <<
" TDC FIFO overflow in TDC " << error << endl;
980 tdcError_ROSSummary = 6;
981 tdcError_ROSError = 6;
982 tdcError_TDCHisto = 1;
984 }
else if ( error & 0x0492 ) {
985 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
986 <<
" ROS " << uRos <<
" ROB " << link
987 <<
" 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
996 <<
" TDC L1A FIFO overflow in TDC " << error << endl;
998 tdcError_ROSSummary = 8;
999 tdcError_ROSError = 8;
1000 tdcError_TDCHisto = 3;
1002 }
else if ( error & 0x0924 ) {
1003 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1004 <<
" uROS " << uRos <<
" ROB " << link
1005 <<
" TDC hit error in TDC " << error << endl;
1007 tdcError_ROSSummary = 9;
1008 tdcError_ROSError = 9;
1009 tdcError_TDCHisto = 4;
1011 }
else if ( error & 0x1000 ) {
1012 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1013 <<
" uROS " << uRos <<
" ROB " << link
1014 <<
" TDC hit rejected in TDC " << error << endl;
1016 tdcError_ROSSummary = 10;
1017 tdcError_ROSError = 10;
1018 tdcError_TDCHisto = 5;
1021 LogWarning(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1022 <<
" TDC error code not known " << error << endl;
1026 ROSSummary->
Fill(tdcError_ROSSummary,link+1);
1033 if (link<24) ROSSummary->
Fill(tdcError_ROSSummary,ros);
1034 else if (link<48) ROSSummary->
Fill(tdcError_ROSSummary,ros+1);
1035 else if (link<72) ROSSummary->
Fill(tdcError_ROSSummary,ros+2);
1038 if (link<24) uROSError0->
Fill(tdcError_ROSError,link);
1039 else if (link<48) uROSError1->
Fill(tdcError_ROSError,link-23);
1040 else if (link<72) uROSError2->
Fill(tdcError_ROSError,link-47);
1043 if (link<24)
urosHistos[(
TDCError)*1000 + (wheel+2)*100 + (ros-1)]->
Fill(tdcError_TDCHisto+6*(tdc-1),link);
1044 else if (link<48)
urosHistos[(
TDCError)*1000 + (wheel+2)*100 + (ros)]->
Fill(tdcError_TDCHisto+6*(tdc-1),link-23);
1045 else if (link<72)
urosHistos[(
TDCError)*1000 + (wheel+2)*100 + (ros+1)]->
Fill(tdcError_TDCHisto+6*(tdc-1),link-47);
1054 int ttsCodeValue = -1;
1087 LogError(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1088 <<
"[DTDataIntegrityTask] FED User control: wrong TTS value "<< value <<
" in FED " << fed <<
" uROS "<< uRos<< endl;
1096 int uRosEventLength = (data.
gettrailer() & 0xFFFFF)*8;
1099 if(uRosEventLength > 5000) uRosEventLength = 5000;
1111 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1112 <<
"[DTDataIntegrityTask]: " <<
neventsuROS <<
" events analyzed by processROS25" << endl;
1127 if ( (
mode<=2) && (!ROSError) ) {
1128 LogError(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask") <<
1129 "Trying to access non existing ME at ROSID " << code.
getROSID() <<
1142 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask") <<
" TXP error en ROS " 1143 << code.
getROS() << endl;
1153 for (vector<DTROSErrorWord>::const_iterator error_it = data.
getROSErrors().begin();
1156 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask") <<
" Error in ROS " << code.
getROS()
1157 <<
" ROB Id " << (*error_it).robID()
1158 <<
" Error type " << (*error_it).errorType() << endl;
1161 ROSSummary->
Fill((*error_it).errorType(), code.
getROS());
1162 if((*error_it).errorType() <= 11) {
1168 if ((*error_it).robID() != 31) {
1169 ROSError->
Fill((*error_it).errorType(),(*error_it).robID());
1171 else if ((*error_it).errorType() == 4) {
1172 vector<int> channelBins;
1174 vector<int>::const_iterator channelIt = channelBins.begin();
1175 vector<int>::const_iterator channelEnd = channelBins.end();
1176 for(;channelIt!=channelEnd;++channelIt) {
1177 ROSError->
Fill(4,(*channelIt));
1184 int ROSDebug_BunchNumber = -1;
1186 for (vector<DTROSDebugWord>::const_iterator debug_it = data.
getROSDebugs().begin();
1189 int debugROSSummary = 0;
1190 int debugROSError = 0;
1191 vector<int> debugBins;
1192 bool hasEvIdMis =
false;
1193 vector<int> evIdMisBins;
1195 if ((*debug_it).debugType() == 0 ) {
1196 ROSDebug_BunchNumber = (*debug_it).debugMessage();
1197 }
else if ((*debug_it).debugType() == 1 ) {
1200 }
else if ((*debug_it).debugType() == 2 ) {
1203 }
else if ((*debug_it).debugType() == 3) {
1204 if ((*debug_it).dontRead()){
1205 debugROSSummary = 11;
1207 if (
mode <= 2)
channelsInCEROS((*debug_it).cerosIdCerosStatus(),(*debug_it).dontRead(),debugBins);
1208 }
if ((*debug_it).evIdMis()){
1210 if (
mode <= 2)
channelsInCEROS((*debug_it).cerosIdCerosStatus(),(*debug_it).evIdMis(),evIdMisBins);
1212 }
else if ((*debug_it).debugType() == 4 &&
1213 (*debug_it).cerosIdRosStatus()){
1214 debugROSSummary = 13;
1219 if (debugROSSummary) {
1220 ROSSummary->
Fill(debugROSSummary,code.
getROS());
1222 vector<int>::const_iterator channelIt = debugBins.begin();
1223 vector<int>::const_iterator channelEnd = debugBins.end();
1224 for (;channelIt!=channelEnd;++channelIt) {
1225 ROSError->
Fill(debugROSError,(*channelIt));
1233 vector<int>::const_iterator channelIt = evIdMisBins.begin();
1234 vector<int>::const_iterator channelEnd = evIdMisBins.end();
1235 for (;channelIt!=channelEnd;++channelIt) {
1236 ROSError->
Fill(9,(*channelIt));
1245 for (vector<DTROBHeader>::const_iterator rob_it = data.
getROBHeaders().begin();
1248 code.
setROB((*rob_it).first);
1253 if (robheader.
bunchID() != ROSDebug_BunchNumber) {
1266 for (vector<DTROBTrailerWord>::const_iterator robt_it = data.
getROBTrailers().begin();
1268 float wCount = (*robt_it).wordCount()<100. ? (*robt_it).wordCount() : 99.9;
1276 if(rosEventLength > 1600) rosEventLength = 1600;
1282 for (vector<DTTDCData>::const_iterator tdc_it = data.
getTDCData().begin();
1283 tdc_it != data.
getTDCData().end(); tdc_it++) {
1287 if ( tdcDatum.
PC() !=0) {
1288 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1289 <<
" PC error in ROS " << code.
getROS() <<
" TDC " << (*tdc_it).first << endl;
1296 if(
mode <= 2) ROSError->
Fill(6,(*tdc_it).first);
1301 for (vector<DTTDCError>::const_iterator tdc_it = data.
getTDCError().begin();
1304 code.
setROB((*tdc_it).first);
1306 int tdcError_ROSSummary = 0;
1307 int tdcError_ROSError = 0;
1308 int tdcError_TDCHisto = 0;
1310 if(((*tdc_it).second).tdcError() & 0x4000 ) {
1311 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1312 <<
" ROS " << code.
getROS() <<
" ROB " << code.
getROB()
1313 <<
" Internal fatal Error 4000 in TDC " << (*tdc_it).first << endl;
1315 tdcError_ROSSummary = 14;
1316 tdcError_ROSError = 11;
1317 tdcError_TDCHisto = 0;
1319 }
else if ( ((*tdc_it).second).tdcError() & 0x0249 ) {
1320 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1321 <<
" ROS " << code.
getROS() <<
" ROB " << code.
getROB()
1322 <<
" TDC FIFO overflow in TDC " << (*tdc_it).first << endl;
1324 tdcError_ROSSummary = 15;
1325 tdcError_ROSError = 12;
1326 tdcError_TDCHisto = 1;
1328 }
else if ( ((*tdc_it).second).tdcError() & 0x0492 ) {
1329 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1330 <<
" ROS " << code.
getROS() <<
" ROB " << code.
getROB()
1331 <<
" TDC L1 buffer overflow in TDC " << (*tdc_it).first << endl;
1333 tdcError_ROSSummary = 16;
1334 tdcError_ROSError = 13;
1335 tdcError_TDCHisto = 2;
1337 }
else if ( ((*tdc_it).second).tdcError() & 0x2000 ) {
1338 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1339 <<
" ROS " << code.
getROS() <<
" ROB " << code.
getROB()
1340 <<
" TDC L1A FIFO overflow in TDC " << (*tdc_it).first << endl;
1342 tdcError_ROSSummary = 17;
1343 tdcError_ROSError = 14;
1344 tdcError_TDCHisto = 3;
1346 }
else if ( ((*tdc_it).second).tdcError() & 0x0924 ) {
1347 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1348 <<
" ROS " << code.
getROS() <<
" ROB " << code.
getROB()
1349 <<
" TDC hit error in TDC " << (*tdc_it).first << endl;
1351 tdcError_ROSSummary = 18;
1352 tdcError_ROSError = 15;
1353 tdcError_TDCHisto = 4;
1355 }
else if ( ((*tdc_it).second).tdcError() & 0x1000 ) {
1356 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1357 <<
" ROS " << code.
getROS() <<
" ROB " << code.
getROB()
1358 <<
" TDC hit rejected in TDC " << (*tdc_it).first << endl;
1360 tdcError_ROSSummary = 19;
1361 tdcError_ROSError = 16;
1362 tdcError_TDCHisto = 5;
1365 LogWarning(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1366 <<
" TDC error code not known " << ((*tdc_it).second).tdcError() << endl;
1369 ROSSummary->
Fill(tdcError_ROSSummary,code.
getROS());
1371 if(tdcError_ROSSummary <= 15) {
1376 ROSError->
Fill(tdcError_ROSError,(*tdc_it).first);
1378 rosHistos[
"TDCError"][code.
getROSID()]->Fill(tdcError_TDCHisto+6*((*tdc_it).second).tdcID(),(*tdc_it).first);
1396 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1397 <<
"[DTDataIntegrityTask]: " <<
neventsFED <<
" events analyzed by processFED" << endl;
1399 if(fed < FEDIDmin || fed >
FEDIDmax)
return;
1408 fedHistos[
"EventLength"][fed]->Fill(fedEvtLength);
1410 if(
mode > 1)
return;
1412 fedTimeHistos[
"FEDAvgEvLengthvsLumi"][fed]->accumulateValueTimeSlot(fedEvtLength);
1424 int ttsCodeValue = -1;
1456 LogError(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1457 <<
"[DTDataIntegrityTask] FED TTS control: wrong TTS value "<< value <<
" in FED "<< fed<< endl;
1461 if(
mode < 1)
fedHistos[
"TTSValues"][fed]->Fill(ttsCodeValue);
1471 LogTrace(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1472 <<
"[DTDataIntegrityTask]: " <<
neventsFED <<
" events analyzed by processFED" << endl;
1485 if(!header.
check()) {
1491 if(!trailer.
check()) {
1511 int ttsCodeValue = -1;
1512 int ttsSummaryBin = -1;
1531 bool knownOrigin =
false;
1548 if(!knownOrigin) ttsSummaryBin = 9;
1554 bool knownOrigin =
false;
1563 if(!knownOrigin) ttsSummaryBin = 9;
1579 LogError(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1580 <<
"[DTDataIntegrityTask] DDU control: wrong TTS value "<<trailer.
ttsBits()<<endl;
1585 if(ttsSummaryBin != -1) {
1594 int rosList = secondWord.
rosList();
1595 set<int> rosPositions;
1596 for(
int i=0;
i<12;
i++) {
1598 rosPositions.insert(
i);
1606 for (vector<DTDDUFirstStatusWord>::const_iterator fsw_it = data.
getFirstStatusWord().begin();
1610 hROSStatus->
Fill(0,channel,(*fsw_it).channelEnabled());
1611 hROSStatus->
Fill(1,channel,(*fsw_it).timeout());
1612 hROSStatus->
Fill(2,channel,(*fsw_it).eventTrailerLost());
1613 hROSStatus->
Fill(3,channel,(*fsw_it).opticalFiberSignalLost());
1614 hROSStatus->
Fill(4,channel,(*fsw_it).tlkPropagationError());
1615 hROSStatus->
Fill(5,channel,(*fsw_it).tlkPatternError());
1616 hROSStatus->
Fill(6,channel,(*fsw_it).tlkSignalLost());
1617 hROSStatus->
Fill(7,channel,(*fsw_it).errorFromROS());
1620 if((*fsw_it).channelEnabled() == 1 &&
1621 rosPositions.find(channel) == rosPositions.end()) {
1622 if(
mode <= 2) hROSStatus->
Fill(9,channel,1);
1635 if((rosBXIds.size() > 1 || rosBXIds.find(header.
bxID()) == rosBXIds.end()) && !rosBXIds.empty() ) {
1636 for(vector<DTROS25Data>::const_iterator rosControlData = rosData.begin();
1637 rosControlData != rosData.end(); ++rosControlData) {
1638 for (vector<DTROSDebugWord>::const_iterator debug_it = (*rosControlData).getROSDebugs().begin();
1639 debug_it != (*rosControlData).getROSDebugs().end(); debug_it++) {
1640 if ((*debug_it).debugType() == 0 && (*debug_it).debugMessage() != header.
bxID()) {
1641 int ros = (*rosControlData).getROSID();
1643 if(
mode <= 2) hROSStatus->
Fill(11,ros-1);
1655 LogWarning(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1656 <<
"ERROR: FED " << ddu <<
" BX ID different from other feds: " << header.
bxID() << endl;
1665 if((rosL1AIds.size() > 1 || rosL1AIds.find(header.
lvl1ID()-1) == rosL1AIds.end()) && !rosL1AIds.empty() ){
1667 for (vector<DTROS25Data>::const_iterator rosControlData = rosData.begin();
1668 rosControlData != rosData.end(); rosControlData++) {
1669 unsigned int ROSHeader_TTCCount = ((*rosControlData).getROSHeader().TTCEventCounter() + 1) % 0x1000000;
1670 if( ROSHeader_TTCCount != header.
lvl1ID() ) {
1671 int ros = (*rosControlData).getROSID();
1672 if(
mode <= 2) hROSStatus->
Fill(10,ros-1);
1685 if(
mode > 1)
return;
1697 int fifoFull = secondWord.
fifoFull();
1701 for(
int i=0;
i<3;
i++){
1702 if(inputFifoFull & 0
x1){
1703 hFIFOStatus->
Fill(
i,0);
1705 if(inputFifoAlmostFull & 0x1){
1706 hFIFOStatus->
Fill(
i,1);
1709 hFIFOStatus->
Fill(3+
i,0);
1711 if(fifoAlmostFull & 0x1){
1712 hFIFOStatus->
Fill(3+
i,1);
1714 if(!(inputFifoFull & 0x1) && !(inputFifoAlmostFull & 0x1)){
1715 hFIFOStatus->
Fill(
i,2);
1717 if(!(fifoFull & 0x1) && !(fifoAlmostFull & 0x1)){
1718 hFIFOStatus->
Fill(3+
i,2);
1720 inputFifoFull >>= 1;
1721 inputFifoAlmostFull >>= 1;
1723 fifoAlmostFull >>= 1;
1727 hFIFOStatus->
Fill(6,0);
1729 if(outputFifoAlmostFull){
1730 hFIFOStatus->
Fill(6,1);
1732 if(!outputFifoFull && !outputFifoAlmostFull){
1733 hFIFOStatus->
Fill(6,2);
1773 folder =
"DT/00-DataIntegrity/";
1780 for (
int iCh=0; iCh<6;++iCh) {
1781 if ((chMask >> iCh) & 0
x1){
1782 channels.push_back(cerosId*6+iCh);
1789 for (
int iCeros=0; iCeros<5;++iCeros) {
1790 if ((cerosMask >> iCeros) & 0
x1){
1791 for (
int iCh=0; iCh<6;++iCh) {
1792 channels.push_back(iCeros*6+iCh);
1810 map<string, map<int, DTTimeEvolutionHisto*> >::iterator fedIt =
fedTimeHistos.begin();
1811 map<string, map<int, DTTimeEvolutionHisto*> >::iterator fedEnd =
fedTimeHistos.end();
1812 for(; fedIt!=fedEnd; ++fedIt) {
1813 map<int, DTTimeEvolutionHisto*>::iterator histoIt = fedIt->second.begin();
1814 map<int, DTTimeEvolutionHisto*>::iterator histoEnd = fedIt->second.end();
1815 for(; histoIt!=histoEnd; ++histoIt) {
1816 histoIt->second->updateTimeSlot(lumiBlock,
nEventsLS);
1820 map<unsigned int, DTTimeEvolutionHisto*>::iterator urosIt =
urosTimeHistos.begin();
1821 map<unsigned int, DTTimeEvolutionHisto*>::iterator urosEnd =
urosTimeHistos.end();
1822 for(; urosIt!=urosEnd; ++urosIt) {
1823 urosIt->second->updateTimeSlot(lumiBlock,
nEventsLS);
1828 map<string, map<int, DTTimeEvolutionHisto*> >::iterator dduIt =
fedTimeHistos.begin();
1829 map<string, map<int, DTTimeEvolutionHisto*> >::iterator dduEnd =
fedTimeHistos.end();
1830 for(; dduIt!=dduEnd; ++dduIt) {
1831 map<int, DTTimeEvolutionHisto*>::iterator histoIt = dduIt->second.begin();
1832 map<int, DTTimeEvolutionHisto*>::iterator histoEnd = dduIt->second.end();
1833 for(; histoIt!=histoEnd; ++histoIt) {
1834 histoIt->second->updateTimeSlot(lumiBlock,
nEventsLS);
1838 map<string, map<int, DTTimeEvolutionHisto*> >::iterator rosIt =
rosTimeHistos.begin();
1839 map<string, map<int, DTTimeEvolutionHisto*> >::iterator rosEnd =
rosTimeHistos.end();
1840 for(; rosIt!=rosEnd; ++rosIt) {
1841 map<int, DTTimeEvolutionHisto*>::iterator histoIt = rosIt->second.begin();
1842 map<int, DTTimeEvolutionHisto*>::iterator histoEnd = rosIt->second.end();
1843 for(; histoIt!=histoEnd; ++histoIt) {
1844 histoIt->second->updateTimeSlot(lumiBlock,
nEventsLS);
1857 LogTrace(
"DTRawToDigi|TDQM|DTMonitorModule|DTDataIntegrityTask") <<
"[DTDataIntegrityTask]: preProcessEvent" <<endl;
1867 for(
unsigned int j=0; j <fedCol->size();++j){
1868 fedData = fedCol->at(j);
1869 int fed = fedData.
getfed();
1871 LogError(
"DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask") <<
"[DTDataIntegrityTask]: analyze, FED ID " << fed <<
" not expected." << endl;
1876 for(
int slot=1; slot<=
DOCESLOTS; ++slot)
1878 urosData = fedData.
getuROS(slot);
1888 (*rosBxIds).second.clear();
1894 (*rosL1AIds).second.clear();
1907 std::vector<DTROS25Data> ros25Data;
1909 for(
unsigned int i=0;
i<dduProduct->size(); ++
i)
1911 dduData = dduProduct->at(
i);
1912 ros25Data = ros25Product->at(
i);
1919 for(
unsigned int j=0; j < ros25Data.size(); ++j) {
1932 int ros =
theROS(slot,link);
1954 if (ros > 6 && tenDDU && ddu < 775)
1962 if (slot%6 == 5)
return link+1;
1964 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
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
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
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
bin
set the eta bin as selection string.
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
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
int theDDU(int crate, int slot, int link, bool tenDDU)