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);
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;
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 if (hFEDEntry && hFEDFatal) {
138 int offsetFED = 1368;
142 int wheel = dduId - offsetFED - 2;
143 if (FED_ROSSummary1 && FED_ROSSummary2 && FED_ROSStatus && FED_EvLength && !fedNotReadout) {
144 TH2F* histoFEDSummary1 = FED_ROSSummary1->
getTH2F();
145 TH2F* histoFEDSummary2 = FED_ROSSummary2->
getTH2F();
146 TH2F* histoROSStatus = FED_ROSStatus->
getTH2F();
147 TH1F* histoEvLength = FED_EvLength->
getTH1F();
149 int nFEDEvts = histoEvLength->Integral();
153 int extraFEDevents1 = 0;
154 int extraFEDevents2 = 0;
156 for (
int urosNumber = 1; urosNumber <=
DOCESLOTS; ++urosNumber) {
157 string urosNumber_s =
to_string(urosNumber);
159 string fedUrosEvLenName =
"DT/00-DataIntegrity/FED" + dduId_s +
"/uROS" + urosNumber_s +
"/FED" + dduId_s +
160 "_uROS" + urosNumber_s +
"_EventLength";
162 TH1F* histoUrosEvLength = FED_uROS_EvLength->
getTH1F();
163 int nFEDEvtsUros = histoUrosEvLength->Integral();
166 if (urosNumber == 1) {
167 extraFEDevents1 = nFEDEvtsUros;
170 if (urosNumber == 2) {
171 extraFEDevents2 = nFEDEvtsUros;
175 if (nFEDEvtsUros > 0) {
176 nFEDEvtsUros = extraFEDevents1 + extraFEDevents2 + nFEDEvtsUros / 3.;
177 float nGErrors = histoROSStatus->Integral(1, 12, urosNumber, urosNumber);
180 int ros =
getROS(urosNumber, 0);
181 for (
int iros = ros; iros < (ros + 3); ++iros) {
183 float nROBErrors1 = histoFEDSummary1->Integral(1, 5, iros, iros);
184 float nErrors1 = nROBErrors1 + nGErrors;
186 if (nFEDEvtsUros != 0)
187 result1 =
max((
float)0., ((
float)nFEDEvtsUros - nROBErrors1) / (
float)nFEDEvtsUros);
189 double tdcResult1 = -2;
190 float nTDCErrors1 = histoFEDSummary1->Integral(6, 6, iros, iros);
191 if (nTDCErrors1 == 0) {
199 float sectPerc1 = 0.;
200 if (nFEDEvtsUros != 0)
201 sectPerc1 =
max((
float)0., ((
float)nFEDEvtsUros - nErrors1) / (
float)nFEDEvtsUros);
203 if (dduId == (FEDIDmax - 1))
207 float nROBErrors2 = histoFEDSummary2->Integral(1, 5, iros, iros);
208 float nErrors2 = nROBErrors2 + nGErrors;
210 if (nFEDEvtsUros != 0)
211 result2 =
max((
float)0., ((
float)nFEDEvtsUros - nROBErrors2) / (
float)nFEDEvtsUros);
214 double tdcResult2 = -2;
215 float nTDCErrors2 = histoFEDSummary2->Integral(6, 6, iros, iros);
216 if (nTDCErrors2 == 0) {
224 float sectPerc2 = 0.;
225 if (nFEDEvtsUros != 0)
226 sectPerc2 =
max((
float)0., ((
float)nFEDEvtsUros - nErrors2) / (
float)nFEDEvtsUros);
236 if (dduId == (FEDIDmax - 1))
250 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTDataIntegrityTest") <<
"[DTDataIntegrityTest] endjob called!";
255 stringstream dduID_s;
258 string folderName =
"DT/00-DataIntegrity/FED" + dduID_s.str();
266 return mapping->
readOutToGeometry(dduId, ros, 2, 2, 2,
wheel,
dummy,
sector,
dummy,
dummy,
dummy);
317 int ros = (link / 24) + 3 * (slot % 6) - 2;
int readOutToGeometry(int dduId, int rosId, int robId, int tdcId, int channelId, DTWireId &wireId) const
transform identifiers
LuminosityBlockNumber_t luminosityBlock() const
edm::ESGetToken< DTReadOutMapping, DTReadOutMappingRcd > mappingToken_
virtual void setCurrentFolder(std::string const &fullpath)
const DTReadOutMapping * mapping
std::string to_string(const V &value)
MonitorElement * summaryTDCHisto
DTDataIntegrityTest(const edm::ParameterSet &ps)
Constructor.
MonitorElement * glbSummaryHisto
static const int DOCESLOTS
T getUntrackedParameter(std::string const &, T const &) const
virtual TH2F * getTH2F() const
std::string getMEName(std::string histoType, int FEDId)
Get the ME name.
void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
DQM Client Diagnostic.
MonitorElement * summaryHisto
int readOutToGeometry(int dduId, int rosNumber, int &wheel, int §or)
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
LuminosityBlockID id() const
virtual TH1F * getTH1F() const
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
int getROS(int uROS, int link)
virtual MonitorElement * get(std::string const &fullpath) const
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
~DTDataIntegrityTest() override
Destructor.
virtual double getBinContent(int binx) const
get content of bin (1-D)
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)