@@ -95,8 +95,41 @@ Quality ITSFeeCheck::check(std::map<std::string, std::shared_ptr<MonitorObject>>
9595 result.set (Quality::Bad);
9696 }
9797 } // end lanestatusOverview
98- } // end flag loop
99- } // end mop
98+ }
99+ // Adding summary Plots Checks (General, IB, ML, OL)
100+ for (int isummary = 0 ; isummary < NSummary; isummary++) {
101+ bool StatusSummary = true ;
102+ if (mo->getName () == Form (" LaneStatusSummary/LaneStatusSummary%s" , mSummaryPlots [isummary].c_str ())) {
103+ result = Quality::Good;
104+ for (int iflag = 0 ; iflag < 3 ; iflag++) {
105+ result.addMetadata (Form (" Flag%s" , (mLaneStatusFlag [iflag]).c_str ()), " good" );
106+ auto * h = dynamic_cast <TH1I *>(mo->getObject ());
107+ if (strcmp (mSummaryPlots [isummary].c_str (), " IB" ) == 0 ) {
108+ if (h->GetBinContent (iflag + 1 ) > 0 ) {
109+ result.updateMetadata (Form (" Flag%s" , (mLaneStatusFlag [iflag]).c_str ()), " bad" );
110+ StatusSummary = false ;
111+ }
112+ } // end IB
113+ else { // General, ML, OL: if #lane > 25% than bad status assigned
114+ if (h->GetBinContent (iflag + 1 ) > 0.25 * laneMaxSummaryPlots[isummary]) {
115+ result.updateMetadata (Form (" Flag%s" , (mLaneStatusFlag [iflag]).c_str ()), " bad" );
116+ StatusSummary = false ;
117+ }
118+ }
119+ }
120+ } // end flag plot loop
121+ if (!StatusSummary) {
122+ result.set (Quality::Bad);
123+ }
124+ } // end summary loop
125+ if (mo->getName () == Form (" RDHSummary" )) {
126+ result = Quality::Good;
127+ auto * h = dynamic_cast <TH2I *>(mo->getObject ());
128+ if (h->GetMaximum () > 0 ) {
129+ result.set (Quality::Bad);
130+ }
131+ }
132+ }
100133 return result;
101134} // end check
102135
@@ -109,6 +142,7 @@ void ITSFeeCheck::beautify(std::shared_ptr<MonitorObject> mo, Quality checkResul
109142 TText* tInfoML = new TText ();
110143 TText* tInfoOL = new TText ();
111144 TText* tInfoLayers[7 ];
145+ TText* tInfoSummary[4 ];
112146
113147 for (int iflag = 0 ; iflag < NFlags; iflag++) {
114148 if (mo->getName () == Form (" LaneStatus/laneStatusFlag%s" , mLaneStatusFlag [iflag].c_str ())) {
@@ -132,7 +166,6 @@ void ITSFeeCheck::beautify(std::shared_ptr<MonitorObject> mo, Quality checkResul
132166 tInfo->SetTextSize (22 );
133167 tInfo->SetNDC ();
134168 hp->GetListOfFunctions ()->Add (tInfo);
135-
136169 } else if (checkResult == Quality::Bad) {
137170 tInfo->SetText (0.12 , 0.835 , " Quality::BAD (call expert)" );
138171 tInfo->SetTextColor (kRed );
@@ -174,6 +207,52 @@ void ITSFeeCheck::beautify(std::shared_ptr<MonitorObject> mo, Quality checkResul
174207 }
175208 }
176209 } // end flags
177- }
210+ for (int isummary = 0 ; isummary < NSummary; isummary++) {
211+ if (mo->getName () == Form (" LaneStatusSummary/LaneStatusSummary%s" , mSummaryPlots [isummary].c_str ())) {
212+ auto * h = dynamic_cast <TH1I *>(mo->getObject ());
213+ if (checkResult == Quality::Good) {
214+ tInfo->SetText (0.12 , 0.835 , " Quality::GOOD" );
215+ tInfo->SetTextColor (kGreen );
216+ tInfo->SetTextSize (22 );
217+ tInfo->SetNDC ();
218+ h->GetListOfFunctions ()->Add (tInfo);
219+ } else if (checkResult == Quality::Bad) {
220+ tInfo->SetText (0.12 , 0.835 , " Quality::BAD (call expert)" );
221+ tInfo->SetTextColor (kRed );
222+ tInfo->SetTextSize (22 );
223+ tInfo->SetNDC ();
224+ h->GetListOfFunctions ()->Add (tInfo);
225+ tInfo->Draw ();
226+ for (int iflag = 0 ; iflag < NFlags; iflag++) {
227+ tInfoSummary[iflag] = new TText ();
228+ if (strcmp (checkResult.getMetadata (Form (" Flag%s" , mLaneStatusFlag [iflag].c_str ())).c_str (), " bad" ) == 0 ) {
229+ if (strcmp (mSummaryPlots [isummary].c_str (), " IB" ) == 0 ) {
230+ tInfoSummary[iflag]->SetText (0.12 , 0.75 - 0.07 * iflag, Form (" %s: > 1 lane in %s" , mSummaryPlots [isummary].c_str (), mLaneStatusFlag [iflag].c_str ()));
231+ } else {
232+ tInfoSummary[iflag]->SetText (0.12 , 0.75 - 0.07 * iflag, Form (" %s: > 25%% of staves in %s" , mSummaryPlots [isummary].c_str (), mLaneStatusFlag [iflag].c_str ()));
233+ }
234+ tInfoSummary[iflag]->SetTextColor (kRed + 1 );
235+ tInfoSummary[iflag]->SetTextSize (21 );
236+ tInfoSummary[iflag]->SetNDC ();
237+ h->GetListOfFunctions ()->Add (tInfoSummary[iflag]);
238+ }
239+ }
240+ }
241+ }
242+ } // end summary
243+ if (mo->getName () == Form (" RDHSummary" )) {
244+ auto * h = dynamic_cast <TH2I *>(mo->getObject ());
245+ if (checkResult == Quality::Good) {
246+ tInfo->SetText (0.1 , 0.8 , " Quality::GOOD" );
247+ tInfo->SetTextColor (kGreen );
248+ } else if (checkResult == Quality::Bad) {
249+ tInfo->SetText (0.15 , 0.8 , " Quality::BAD (call expert)" );
250+ tInfo->SetTextColor (kRed );
251+ }
252+ tInfo->SetTextSize (18 );
253+ tInfo->SetNDC ();
254+ h->GetListOfFunctions ()->Add (tInfo);
255+ }
256+ } // end beautify
178257
179258} // namespace o2::quality_control_modules::its
0 commit comments