64 summaryHisto = ibooker.
book2D(
"DataIntegritySummary",
"Summary Data Integrity",12,1,13,5,-2,3);
70 summaryTDCHisto = ibooker.
book2D(
"DataIntegrityTDCSummary",
"TDC Summary Data Integrity",12,1,13,5,-2,3);
86 nLumiSegs = lumiSeg.id().luminosityBlock();
87 string nLumiSegs_s = to_string(
nLumiSegs);
92 LogTrace (
"DTDQM|DTRawToDigi|DTMonitorClient|DTDataIntegrityTest")
93 <<
"[DTDataIntegrityTest]: End of LS " <<
nLumiSegs <<
", performing client operations";
112 for (
int dduId=FEDIDmin; dduId<=FEDIDmax; ++dduId){
113 LogTrace (
"DTDQM|DTRawToDigi|DTMonitorClient|DTDataIntegrityTest")
114 <<
"[DTDataIntegrityTest]:FED Id: "<<dduId;
117 string dduId_s = to_string(dduId);
122 string rosStatusName =
"DT/00-DataIntegrity/FED" + dduId_s +
"/FED" + dduId_s +
"_ROSStatus";
123 if (
checkUros) rosStatusName =
"DT/00-DataIntegrity/FED" + dduId_s +
"/FED" + dduId_s +
"_uROSStatus";
127 string fedSummaryName =
"DT/00-DataIntegrity/FED" + dduId_s +
"_ROSSummary";
131 string fedSummaryName1 =
"";
132 string fedSummaryName2 =
"";
135 if(dduId==FEDIDmin || dduId==FEDIDmax){
136 if(dduId==FEDIDmax) sign=
"";
137 fedSummaryName2 =
"DT/00-DataIntegrity/ROSSummary_W" + sign +
"2";
138 fedSummaryName1 =
"DT/00-DataIntegrity/ROSSummary_W" + sign +
"1";
139 FED_ROSSummary1 = igetter.
get(fedSummaryName1);
140 FED_ROSSummary2 = igetter.
get(fedSummaryName2);
142 else { fedSummaryName =
"DT/00-DataIntegrity/ROSSummary_W0";
143 FED_ROSSummary1 = igetter.
get(fedSummaryName);
144 FED_ROSSummary2 = igetter.
get(fedSummaryName);
147 else FED_ROSSummary = igetter.
get(fedSummaryName);
150 string fedEvLenName =
"DT/00-DataIntegrity/FED" + dduId_s +
"/FED" + dduId_s +
"_EventLength";
154 string fedIntegrityFolder =
"DT/00-DataIntegrity/";
164 bool fedNotReadout = (hFEDEntry->
getBinContent(dduId-offsetFED)) == 0;
165 int wheel = dduId-offsetFED-2;
166 if(FED_ROSSummary1 && FED_ROSSummary2 && FED_ROSStatus && FED_EvLength && !fedNotReadout ) {
167 TH2F * histoFEDSummary1 = FED_ROSSummary1->
getTH2F();
168 TH2F * histoFEDSummary2 = FED_ROSSummary2->
getTH2F();
169 TH2F * histoROSStatus = FED_ROSStatus->
getTH2F();
170 TH1F * histoEvLength = FED_EvLength->
getTH1F();
172 int nFEDEvts = histoEvLength->Integral();
174 if (!(nFEDEvts>0))
continue;
175 int extraFEDevents1 = 0;
176 int extraFEDevents2 = 0;
178 for(
int urosNumber = 1; urosNumber <=
DOCESLOTS; ++urosNumber) {
179 string urosNumber_s = to_string(urosNumber);
181 string fedUrosEvLenName =
"DT/00-DataIntegrity/FED" + dduId_s +
"/uROS" + urosNumber_s +
182 "/FED" + dduId_s +
"_uROS" + urosNumber_s +
"_EventLength";
184 TH1F * histoUrosEvLength = FED_uROS_EvLength->
getTH1F();
185 int nFEDEvtsUros = histoUrosEvLength->Integral();
188 if (urosNumber==1) {extraFEDevents1=nFEDEvtsUros;
continue;}
189 if (urosNumber==2) {extraFEDevents2=nFEDEvtsUros;
continue;}
192 nFEDEvtsUros = extraFEDevents1+extraFEDevents2+nFEDEvtsUros / 3.;
193 float nGErrors = histoROSStatus->Integral(1,12,urosNumber,urosNumber);
196 int ros =
getROS(urosNumber,0);
197 for (
int iros=ros; iros<(ros+3); ++iros){
199 float nROBErrors1 = histoFEDSummary1->Integral(1,5,iros,iros);
200 float nErrors1 = nROBErrors1+nGErrors;
203 result1 =
max((
float)0., ((
float)nFEDEvtsUros-nROBErrors1)/(
float)nFEDEvtsUros);
206 float nTDCErrors1 = histoFEDSummary1->Integral(6,6,iros,iros);
207 if(nTDCErrors1 == 0) {
215 float sectPerc1 = 0.;
217 sectPerc1 =
max((
float)0., ((
float)nFEDEvtsUros-nErrors1)/(
float)nFEDEvtsUros);
219 if(dduId==(FEDIDmax-1))
continue;
222 float nROBErrors2 = histoFEDSummary2->Integral(1,5,iros,iros);
223 float nErrors2 = nROBErrors2+nGErrors;
226 result2 =
max((
float)0., ((
float)nFEDEvtsUros-nROBErrors2)/(
float)nFEDEvtsUros);
230 float nTDCErrors2 = histoFEDSummary2->Integral(6,6,iros,iros);
231 if(nTDCErrors2 == 0) {
239 float sectPerc2 = 0.;
241 sectPerc2 =
max((
float)0., ((
float)nFEDEvtsUros-nErrors2)/(
float)nFEDEvtsUros);
251 if (dduId==(FEDIDmax-1))
continue;
260 if(hFEDEntry && hFEDFatal && hFEDNonFatal) {
261 if(FED_ROSSummary && FED_ROSStatus && FED_EvLength) {
262 TH2F * histoFEDSummary = FED_ROSSummary->
getTH2F();
263 TH2F * histoROSStatus = FED_ROSStatus->
getTH2F();
264 TH1F * histoEvLength = FED_EvLength->
getTH1F();
266 bool fedNotReadout = (hFEDEntry->
getBinContent(dduId-769) == 0 &&
270 int nFEDEvts = histoEvLength->Integral();
271 for(
int rosNumber = 1; rosNumber <= 12; ++rosNumber) {
274 float nErrors = histoFEDSummary->Integral(1,14,rosNumber,rosNumber);
275 float nROBErrors = histoROSStatus->Integral(2,8,rosNumber,rosNumber);
276 nErrors += nROBErrors;
279 result =
max((
float)0., ((
float)nFEDEvts-nROBErrors)/(
float)nFEDEvts);
282 float nTDCErrors = histoFEDSummary->Integral(15,15,rosNumber,rosNumber);
283 if(nTDCErrors == 0) {
290 float sectPerc =
max((
float)0., ((
float)nFEDEvts-nErrors)/(
float)nFEDEvts);
302 for(
int rosNumber = 1; rosNumber <= 12; ++rosNumber) {
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * get(const std::string &path)
MonitorElement * summaryTDCHisto
MonitorElement * glbSummaryHisto
static const int DOCESLOTS
MonitorElement * summaryHisto
int readOutToGeometry(int dduId, int rosNumber, int &wheel, int §or)
edm::ESHandle< DTReadOutMapping > mapping
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)
int getROS(int uROS, int link)
double getBinContent(int binx) const
get content of bin (1-D)
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)