Skip to content

Commit

Permalink
Small fix to DTDataIntegrityTask.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
perrotta committed Jun 7, 2023
1 parent d600d75 commit afe44bf
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 50 deletions.
7 changes: 1 addition & 6 deletions DQM/DTMonitorModule/interface/DTDataIntegrityTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/LuminosityBlock.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Utilities/interface/EDGetToken.h"
#include "FWCore/Framework/interface/LuminosityBlock.h"

#include "DQMServices/Core/interface/DQMStore.h"
#include "DQMServices/Core/interface/DQMOneEDAnalyzer.h"
Expand Down Expand Up @@ -122,8 +122,3 @@ class DTDataIntegrityTask : public DQMOneEDAnalyzer<edm::LuminosityBlockCache<dt
};

#endif

/* Local Variables: */
/* show-trailing-whitespace: t */
/* truncate-lines: t */
/* End: */
76 changes: 32 additions & 44 deletions DQM/DTMonitorModule/src/DTDataIntegrityTask.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
*/

#include "DQM/DTMonitorModule/interface/DTDataIntegrityTask.h"
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "DQMServices/Core/interface/DQMStore.h"
#include "DQM/DTMonitorModule/interface/DTTimeEvolutionHisto.h"
#include "FWCore/ServiceRegistry/interface/Service.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
Expand Down Expand Up @@ -586,37 +582,32 @@ void DTDataIntegrityTask::processuROS(DTuROSROSData& data, int fed, int uRos) {
for (unsigned int link = 0; link < 72; ++link) {
for (unsigned int flag = 0; flag < 5; ++flag) {
if ((data.getokxflag(link) >> flag) & 0x1) { // Undefined Flag 1-4 64bits word for each MTP (12 channels)
int value = flag;

if (flag == 0)
value = 5; //move it to the 5th bin

if (value > 0) {
if (link < 24) {
errorX[value - 1][ros - 1][wheel + 2] += 1;
if (mode != 1)
uROSError0->Fill(value - 1, link); //bins start at 0 despite labeling
} else if (link < 48) {
int value = flag != 0 ? flag : 5; //if flag = 0 move it to the 5th bin
if (link < 24) {
errorX[value - 1][ros - 1][wheel + 2] += 1;
if (mode != 1)
uROSError0->Fill(value - 1, link); //bins start at 0 despite labeling
} else if (link < 48) {
if ((link == 46 || link == 57) && ros == 10)
errorX[value - 1][sector4][wheel + 2] += 1;
else
errorX[value - 1][ros][wheel + 2] += 1;
if (mode != 1) {
if ((link == 46 || link == 57) && ros == 10)
errorX[value - 1][sector4][wheel + 2] += 1;
uROSErrorS4->Fill(value - 1, link - 24);
else
errorX[value - 1][ros][wheel + 2] += 1;
if (mode != 1) {
if ((link == 46 || link == 57) && ros == 10)
uROSErrorS4->Fill(value - 1, link - 24);
else
uROSError1->Fill(value - 1, link - 24);
}
} else if (link < 72) {
errorX[value - 1][ros + 1][wheel + 2] += 1;
if (mode != 1)
uROSError2->Fill(value - 1, link - 48);
uROSError1->Fill(value - 1, link - 24);
}
} //value>0
} //flag value
} //loop on flags
} //loop on links
} //uROS>2
} else if (link < 72) {
errorX[value - 1][ros + 1][wheel + 2] += 1;
if (mode != 1)
uROSError2->Fill(value - 1, link - 48);
}
} //flag value
} //loop on flags
} //loop on links
} //uROS>2

else { //uRos<3 25th Channel slot

Expand Down Expand Up @@ -651,6 +642,16 @@ void DTDataIntegrityTask::processuROS(DTuROSROSData& data, int fed, int uRos) {
} //loop on links
} //else uRos<3

if (mode != 1) {
// Global Errors for uROS
for (unsigned int flag = 4; flag < 16; ++flag) {
if ((data.getuserWord() >> flag) & 0x1) {
uROSSummary->Fill(flag - 4, uRos);
uROSStatus->Fill(flag - 4, uRos); //duplicated info?
}
}
}

} //mode<=2

if (mode != 1) {
Expand All @@ -662,14 +663,6 @@ void DTDataIntegrityTask::processuROS(DTuROSROSData& data, int fed, int uRos) {
}
}
}

// Global Errors for uROS
for (unsigned int flag = 4; flag < 16; ++flag) {
if ((data.getuserWord() >> flag) & 0x1) {
uROSSummary->Fill(flag - 4, uRos);
uROSStatus->Fill(flag - 4, uRos); //duplicated info?
}
}
}

// ROS error
Expand Down Expand Up @@ -1053,8 +1046,3 @@ int DTDataIntegrityTask::theROS(int slot, int link) {
int ros = (link / 24) + 3 * (slot % 6) - 2;
return ros;
}

// Local Variables:
// show-trailing-whitespace: t
// truncate-lines: t
// End:

0 comments on commit afe44bf

Please sign in to comment.