28 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTDataIntegrityTest") <<
"[DTDataIntegrityTest]: Constructor";
37 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTDataIntegrityTest")
38 <<
"DataIntegrityTest: analyzed " <<
nupdates <<
" updates";
54 summaryHisto = ibooker.
book2D(
"DataIntegritySummary",
"Summary Data Integrity", 12, 1, 13, 5, -2, 3);
60 summaryTDCHisto = ibooker.
book2D(
"DataIntegrityTDCSummary",
"TDC Summary Data Integrity", 12, 1, 13, 5, -2, 3);
66 glbSummaryHisto = ibooker.
book2D(
"DataIntegrityGlbSummary",
"Summary Data Integrity", 12, 1, 13, 5, -2, 3);
76 string nLumiSegs_s = to_string(
nLumiSegs);
82 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTDataIntegrityTest")
83 <<
"[DTDataIntegrityTest]: End of LS " <<
nLumiSegs <<
", performing client operations";
96 for (
int dduId = FEDIDmin; dduId <= FEDIDmax; ++dduId) {
97 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTDataIntegrityTest") <<
"[DTDataIntegrityTest]:FED Id: " << dduId;
100 string dduId_s = to_string(dduId);
105 string rosStatusName =
"DT/00-DataIntegrity/FED" + dduId_s +
"/FED" + dduId_s +
"_uROSStatus";
109 string fedSummaryName =
"DT/00-DataIntegrity/FED" + dduId_s +
"_ROSSummary";
112 string fedSummaryName1 =
"";
113 string fedSummaryName2 =
"";
115 if (dduId == FEDIDmin || dduId == FEDIDmax) {
116 if (dduId == FEDIDmax)
118 fedSummaryName2 =
"DT/00-DataIntegrity/ROSSummary_W" +
sign +
"2";
119 fedSummaryName1 =
"DT/00-DataIntegrity/ROSSummary_W" +
sign +
"1";
120 FED_ROSSummary1 = igetter.
get(fedSummaryName1);
121 FED_ROSSummary2 = igetter.
get(fedSummaryName2);
123 fedSummaryName =
"DT/00-DataIntegrity/ROSSummary_W0";
124 FED_ROSSummary1 = igetter.
get(fedSummaryName);
125 FED_ROSSummary2 = igetter.
get(fedSummaryName);
129 string fedEvLenName =
"DT/00-DataIntegrity/FED" + dduId_s +
"/FED" + dduId_s +
"_EventLength";
137 int offsetFED = 1368;
139 bool fedNotReadout = (hFEDEntry->
getBinContent(dduId - offsetFED)) == 0;
140 int wheel = dduId - offsetFED - 2;
141 if (FED_ROSSummary1 && FED_ROSSummary2 && FED_ROSStatus && FED_EvLength && !fedNotReadout) {
142 TH2F* histoFEDSummary1 = FED_ROSSummary1->
getTH2F();
143 TH2F* histoFEDSummary2 = FED_ROSSummary2->
getTH2F();
144 TH2F* histoROSStatus = FED_ROSStatus->
getTH2F();
145 TH1F* histoEvLength = FED_EvLength->
getTH1F();
147 int nFEDEvts = histoEvLength->Integral();
151 int extraFEDevents1 = 0;
152 int extraFEDevents2 = 0;
154 for (
int urosNumber = 1; urosNumber <=
DOCESLOTS; ++urosNumber) {
155 string urosNumber_s = to_string(urosNumber);
157 string fedUrosEvLenName =
"DT/00-DataIntegrity/FED" + dduId_s +
"/uROS" + urosNumber_s +
"/FED" + dduId_s +
158 "_uROS" + urosNumber_s +
"_EventLength";
160 TH1F* histoUrosEvLength = FED_uROS_EvLength->
getTH1F();
161 int nFEDEvtsUros = histoUrosEvLength->Integral();
164 if (urosNumber == 1) {
165 extraFEDevents1 = nFEDEvtsUros;
168 if (urosNumber == 2) {
169 extraFEDevents2 = nFEDEvtsUros;
173 if (nFEDEvtsUros > 0) {
174 nFEDEvtsUros = extraFEDevents1 + extraFEDevents2 + nFEDEvtsUros / 3.;
175 float nGErrors = histoROSStatus->Integral(1, 12, urosNumber, urosNumber);
178 int ros =
getROS(urosNumber, 0);
179 for (
int iros = ros; iros < (ros + 3); ++iros) {
181 float nROBErrors1 = histoFEDSummary1->Integral(1, 5, iros, iros);
182 float nErrors1 = nROBErrors1 + nGErrors;
184 if (nFEDEvtsUros != 0)
185 result1 =
max((
float)0., ((
float)nFEDEvtsUros - nROBErrors1) / (
float)nFEDEvtsUros);
187 double tdcResult1 = -2;
188 float nTDCErrors1 = histoFEDSummary1->Integral(6, 6, iros, iros);
189 if (nTDCErrors1 == 0) {
197 float sectPerc1 = 0.;
198 if (nFEDEvtsUros != 0)
199 sectPerc1 =
max((
float)0., ((
float)nFEDEvtsUros - nErrors1) / (
float)nFEDEvtsUros);
201 if (dduId == (FEDIDmax - 1))
205 float nROBErrors2 = histoFEDSummary2->Integral(1, 5, iros, iros);
206 float nErrors2 = nROBErrors2 + nGErrors;
208 if (nFEDEvtsUros != 0)
209 result2 =
max((
float)0., ((
float)nFEDEvtsUros - nROBErrors2) / (
float)nFEDEvtsUros);
212 double tdcResult2 = -2;
213 float nTDCErrors2 = histoFEDSummary2->Integral(6, 6, iros, iros);
214 if (nTDCErrors2 == 0) {
222 float sectPerc2 = 0.;
223 if (nFEDEvtsUros != 0)
224 sectPerc2 =
max((
float)0., ((
float)nFEDEvtsUros - nErrors2) / (
float)nFEDEvtsUros);
234 if (dduId == (FEDIDmax - 1))
248 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTDataIntegrityTest") <<
"[DTDataIntegrityTest] endjob called!";
253 stringstream dduID_s;
256 string folderName =
"DT/00-DataIntegrity/FED" + dduID_s.str();
264 return mapping->
readOutToGeometry(dduId, ros, 2, 2, 2,
wheel,
dummy, sector,
dummy,
dummy,
dummy);
315 int ros = (
link / 24) + 3 * (slot % 6) - 2;