3 #include <onlmon/OnlMonClient.h>
4 #include <onlmon/OnlMonDB.h>
10 #include <TGraphErrors.h>
20 #include <TPaveText.h>
36 TDatime T0(2003, 01, 01, 00, 00, 00);
39 for (
int iFelix = 0; iFelix <
NFlx; iFelix++){
105 if (name ==
"MvtxMon_HitMap")
107 TC[0] =
new TCanvas(name.c_str(),
"MvtxMon Hitmaps", -1, 0, xsize, ysize);
108 gSystem->ProcessEvents();
110 Pad[0] =
new TPad(
"mvtxpad0",
"who needs this?", 0.05, 0.02, 0.98, 0.92, 0);
113 transparent[0] =
new TPad(
"transparent0",
"this does not show", 0, 0, 1, 1);
116 TC[0]->SetEditable(
false);
117 TC[0]->SetTopMargin(0.05);
118 TC[0]->SetBottomMargin(0.05);
120 else if (name ==
"MvtxMon_General")
122 TC[1] =
new TCanvas(name.c_str(),
"MVTX Monitoring General", -1, 0, xsize, ysize);
123 gSystem->ProcessEvents();
125 Pad[1] =
new TPad(
"mvtxpad1",
"who needs this?", 0., 0.02, 0.98, 0.97, 0);
129 transparent[0] =
new TPad(
"transparent0",
"this does not show", 0, 0, 1, 1);
132 TC[1]->SetEditable(
false);
133 TC[1]->SetTopMargin(0.05);
134 TC[1]->SetBottomMargin(0.05);
137 else if (name ==
"MvtxMon_FEE")
139 TC[2] =
new TCanvas(name.c_str(),
"MVTX Monitoring FEE", -1, 0, xsize, ysize);
140 gSystem->ProcessEvents();
141 Pad[2] =
new TPad(
"mvtxpad2",
"who needs this?", 0., 0.02, 0.98, 0.97, 0);
145 transparent[0] =
new TPad(
"transparent0",
"this does not show", 0, 0, 1, 1);
148 TC[2]->SetEditable(
false);
149 TC[2]->SetTopMargin(0.05);
150 TC[2]->SetBottomMargin(0.05);
152 else if (name ==
"MvtxMon_OCC")
154 TC[3] =
new TCanvas(name.c_str(),
"MVTX Monitoring Occupancy", -1, 0, xsize, ysize);
155 gSystem->ProcessEvents();
156 Pad[3] =
new TPad(
"mvtxpad3",
"who needs this?", 0., 0.02, 0.98, 0.97, 0);
160 transparent[0] =
new TPad(
"transparent0",
"this does not show", 0, 0, 1, 1);
163 TC[3]->SetEditable(
false);
164 TC[3]->SetTopMargin(0.05);
165 TC[3]->SetBottomMargin(0.05);
167 else if (name ==
"MvtxMon_FHR")
169 TC[4] =
new TCanvas(name.c_str(),
"MVTX Monitoring FHR", -1, 0, xsize, ysize);
170 gSystem->ProcessEvents();
171 Pad[4] =
new TPad(
"mvtxpad4",
"who needs this?", 0., 0.02, 0.98, 0.97, 0);
175 transparent[0] =
new TPad(
"transparent0",
"this does not show", 0, 0, 1, 1);
178 TC[4]->SetEditable(
false);
179 TC[4]->SetTopMargin(0.05);
180 TC[4]->SetBottomMargin(0.05);
182 else if (name ==
"MvtxMon3")
184 TC[5] =
new TCanvas(name.c_str(),
"MvtxMon3 Example Monitor", xsize / 2, 0, xsize / 2, ysize);
185 gSystem->ProcessEvents();
186 Pad[5] =
new TPad(
"mvtxpad5",
"who needs this?", 0.1, 0.1, 0.9, 0.9, 0);
189 transparent[0] =
new TPad(
"transparent0",
"this does not show", 0, 0, 1, 1);
192 TC[5]->SetEditable(
false);
193 TC[5]->SetTopMargin(0.05);
194 TC[5]->SetBottomMargin(0.05);
209 if (what ==
"ALL" || what ==
"L0L"|| what ==
"L0R"|| what ==
"L1L"|| what ==
"L1R"|| what ==
"L2L"|| what ==
"L2R")
214 if (what ==
"ALL" || what ==
"GENERAL")
219 if (what ==
"ALL" || what ==
"FEE")
224 if (what ==
"ALL" || what ==
"OCC")
229 if (what ==
"ALL" || what ==
"FHR")
234 if (what ==
"HISTORY")
241 std::cout << __PRETTY_FUNCTION__ <<
" Unimplemented Drawing option: " << what << std::endl;
251 const int canvasID = 0;
253 TH3 *mvtxmon_HitMap[
NFlx+1] = {
nullptr};
254 if (!gROOT->FindObject(
"MvtxMon_HitMap"))
258 TC[canvasID]->SetEditable(
true);
259 TC[canvasID]->Clear(
"D");
265 if (what ==
"L0R" || what ==
"ALL"){
269 else if (what ==
"L0L"){
273 else if (what ==
"L1R"){
277 else if (what ==
"L1L"){
281 else if (what ==
"L2R"){
285 else if (what ==
"L2L"){
294 for (
int iFelix = 0; iFelix <
NFlx; iFelix++){
295 mvtxmon_HitMap[iFelix] =
dynamic_cast<TH3*
>(cl->
getHisto(Form(
"MVTXMON_%d",iFelix),Form(
"MVTXMON_chipHitmapFLX%d", iFelix)));
297 MergeServers<TH3*>(mvtxmon_HitMap);
298 if(mvtxmon_HitMap[NFlx]){
299 mvtxmon_HitMap[
NFlx]->GetXaxis()->CenterTitle();
300 mvtxmon_HitMap[
NFlx]->GetYaxis()->CenterTitle();
301 mvtxmon_HitMap[
NFlx]->GetYaxis()->SetTitleOffset(1.4);
302 mvtxmon_HitMap[
NFlx]->GetXaxis()->SetTitleOffset(0.75);
303 mvtxmon_HitMap[
NFlx]->GetXaxis()->SetTitleSize(0.06);
304 mvtxmon_HitMap[
NFlx]->GetYaxis()->SetTitleOffset(0.75);
305 mvtxmon_HitMap[
NFlx]->GetYaxis()->SetTitleSize(0.06);
308 for (
int aLayer = aLs; aLayer < aLe; aLayer++) {
309 for (
int aStave = aSs; aStave < aSe; aStave++) {
310 for (
int iChip = 0; iChip < 9; iChip++) {
312 TString
prefix = Form(
"%d%d%d",aLayer,aStave,iChip);
314 returnCode +=
PublishHistogram(
Pad[padID],ipad*9+iChip+1,mvtxmon_HitMap[NFlx]->Project3D(prefix+
"yx"),
"colz");
315 gStyle->SetOptStat(0);
322 TPaveText *ptchip[9] = {
nullptr};
323 for(
int i = 0;
i < 9;
i++){
324 ptchip[
i] =
new TPaveText(0.05+0.1033*
i,.92,0.05+0.1033*(
i+1),0.97,
"blNDC");
325 ptchip[
i]->SetTextSize(0.03);
326 ptchip[
i]->SetFillColor(4000);
327 ptchip[
i]->SetLineColor(0);
328 ptchip[
i]->SetBorderSize(1);
329 ptchip[
i]->AddText(Form(
"Chip %d",
i));
333 TPaveText *ptstave[10] = {
nullptr};
334 for(
int i = 0;
i < aSe - aSs;
i++){
335 ptstave[
i] =
new TPaveText(0.0,0.93- ((
i+1) * 0.92/(aSe - aSs)),0.05,0.93- (
i * 0.92/(aSe - aSs)),
"blNDC");
336 ptstave[
i]->SetTextSize(0.02);
337 ptstave[
i]->SetFillColor(4000);
338 ptstave[
i]->SetLineColor(0);
339 ptstave[
i]->SetBorderSize(1);
340 ptstave[
i]->AddText(Form(
"Stave %d",aSs +
i));
344 TPaveText *ptlayer = {
nullptr};
345 ptlayer =
new TPaveText(0.01,.92,0.06,0.97,
"blNDC");
346 ptlayer->SetTextSize(0.035);
347 ptlayer->SetFillColor(4000);
348 ptlayer->SetLineColor(0);
349 ptlayer->SetBorderSize(1);
350 if (what ==
"L0R" || what ==
"L0R"|| what ==
"ALL") ptlayer->AddText(
"Layer 0");
351 if (what ==
"L1R" || what ==
"L1R") ptlayer->AddText(
"Layer 1");
352 if (what ==
"L2R" || what ==
"L2R") ptlayer->AddText(
"Layer 2");
358 TC[canvasID]->Update();
359 TC[canvasID]->SetEditable(
false);
360 return returnCode < 0 ? -1 : 0;
366 const int canvasID = 1;
369 TH2Poly* mvtxmon_LaneStatusOverview[3][
NFlx+1] = {
nullptr};
370 TH2Poly* mvtxmon_mGeneralOccupancy[
NFlx+1] = {
nullptr};
371 TH1D* mvtxmon_mGeneralErrorPlots[
NFlx+1] = {
nullptr};
372 TH2D* mvtxmon_mGeneralErrorFile[
NFlx+1] = {
nullptr};
374 for (
int iFelix = 0; iFelix <
NFlx; iFelix++){
375 mvtxmon_LaneStatusOverview[0][iFelix] =
dynamic_cast<TH2Poly*
>(cl->
getHisto(Form(
"MVTXMON_%d",iFelix),
"MVTXMON_LaneStatus_laneStatusOverviewFlagWARNING"));
376 mvtxmon_LaneStatusOverview[1][iFelix] =
dynamic_cast<TH2Poly*
>(cl->
getHisto(Form(
"MVTXMON_%d",iFelix),
"MVTXMON_LaneStatus_laneStatusOverviewFlagERROR"));
377 mvtxmon_LaneStatusOverview[2][iFelix] =
dynamic_cast<TH2Poly*
>(cl->
getHisto(Form(
"MVTXMON_%d",iFelix),
"MVTXMON_LaneStatus_laneStatusOverviewFlagFAULT"));
378 mvtxmon_mGeneralOccupancy[iFelix] =
dynamic_cast<TH2Poly*
>(cl->
getHisto(Form(
"MVTXMON_%d",iFelix),
"MVTXMON_General_Occupancy"));
379 mvtxmon_mGeneralErrorPlots[iFelix] =
dynamic_cast<TH1D*
>(cl->
getHisto(Form(
"MVTXMON_%d",iFelix),
"MVTXMON_General_ErrorPlots"));
380 mvtxmon_mGeneralErrorFile[iFelix] =
dynamic_cast<TH2D*
>(cl->
getHisto(Form(
"MVTXMON_%d",iFelix),
"MVTXMON_General_ErrorFile"));
390 bitset = MergeServers<TH2Poly*>(mvtxmon_LaneStatusOverview[0]);
391 bitsetOR |= bitset; bitsetAND &= bitset;
392 bitset = MergeServers<TH2Poly*>(mvtxmon_LaneStatusOverview[1]);
393 bitsetOR |= bitset; bitsetAND &= bitset;
394 bitset = MergeServers<TH2Poly*>(mvtxmon_LaneStatusOverview[2]);
395 bitsetOR |= bitset; bitsetAND &= bitset;
396 bitset = MergeServers<TH2Poly*>(mvtxmon_mGeneralOccupancy);
397 bitsetOR |= bitset; bitsetAND &= bitset;
398 bitset = MergeServers<TH1D*>(mvtxmon_mGeneralErrorPlots);
399 bitsetOR |= bitset; bitsetAND &= bitset;
400 bitset = MergeServers<TH2D*>(mvtxmon_mGeneralErrorFile);
401 bitsetOR |= bitset; bitsetAND &= bitset;
403 for(
int i = 0;
i < 3;
i++){
404 if(mvtxmon_LaneStatusOverview[
i][NFlx]){
405 mvtxmon_LaneStatusOverview[
i][
NFlx]->SetStats(0);
406 mvtxmon_LaneStatusOverview[
i][
NFlx]->GetYaxis()->SetTitleOffset(0.6);
407 mvtxmon_LaneStatusOverview[
i][
NFlx]->SetMinimum(0);
408 mvtxmon_LaneStatusOverview[
i][
NFlx]->SetMaximum(1);
409 mvtxmon_LaneStatusOverview[
i][
NFlx]->SetBit(TH1::kIsAverage);
412 if(mvtxmon_mGeneralOccupancy[NFlx]) mvtxmon_mGeneralOccupancy[
NFlx]->GetYaxis()->SetTitleOffset(0.6);
414 if(mvtxmon_mGeneralErrorFile[NFlx]){
415 for(
int bin = 1; bin < mvtxmon_mGeneralErrorFile[
NFlx]->GetNbinsX()+1;bin++ ){
416 mvtxmon_mGeneralErrorFile[
NFlx]->GetXaxis()->SetBinLabel(bin,Form(
"%d",(bin-1)%8));
418 mvtxmon_mGeneralErrorFile[
NFlx]->GetXaxis()->SetTitleSize(0.045);
419 mvtxmon_mGeneralErrorFile[
NFlx]->GetYaxis()->SetTitleSize(0.045);
422 if (!gROOT->FindObject(
"MvtxMon_General"))
427 TC[canvasID]->SetEditable(
true);
428 TC[canvasID]->Clear(
"D");
430 Pad[padID]->Divide(4,2);
433 Pad[padID]->cd(4)->SetRightMargin(0.12);
434 Pad[padID]->cd(5)->SetLeftMargin(0.16);
435 Pad[padID]->cd(6)->SetTopMargin(0.16);
451 if(mvtxmon_mGeneralErrorPlots[NFlx]){
452 mvtxmon_mGeneralErrorPlots[
NFlx]->GetXaxis()->SetTitleSize(0.045);
453 mvtxmon_mGeneralErrorPlots[
NFlx]->GetYaxis()->SetTitleSize(0.045);
456 std::vector<MvtxMonDraw::Quality>
status;
457 status =
analyseForError(mvtxmon_LaneStatusOverview[0][NFlx],mvtxmon_LaneStatusOverview[1][NFlx],mvtxmon_LaneStatusOverview[2][NFlx],mvtxmon_mGeneralErrorFile[NFlx]);
470 TPaveText *ptt5 =
new TPaveText(.1,.85,.9,.95,
"blNDC");
471 ptt5->SetTextSize(0.04);
472 ptt5->SetFillColor(0);
473 ptt5->SetLineColor(0);
474 ptt5->SetBorderSize(1);
475 ptt5->AddText(
" FLX 0 FLX 1 FLX 2 FLX 3 FLX 4 FLX 5");
480 TPaveText *bulbRed =
new TPaveText(0.1, 0.82, 0.9, 0.92,
"NDC");
481 bulbRed->SetName(
"BulbRed");
482 formatPaveText(bulbRed, 0.05, kRed, 12,
"#color[2]{It's Burning! Call The Expert!!!}");
484 TPaveText *bulbYellow =
new TPaveText(0.1, 0.82, 0.9, 0.92,
"NDC");
485 bulbYellow->SetName(
"BulbYellow");
486 formatPaveText(bulbYellow, 0.05, kRed, 12,
"#color[808]{Did you break it? Call The Expert!}");
488 TPaveText *bulbGreen =
new TPaveText(0.1, 0.82, 0.9, 0.92,
"NDC");
489 bulbGreen->SetName(
"BulbGreen");
490 formatPaveText(bulbGreen, 0.05, kGreen, 12,
"#color[418]{Chill, Have Some Coffee}");
492 TPaveText *bulb =
new TPaveText(0.05, 0.05, 0.95, 0.95,
"NDC");
495 TPaveText *ptt4 =
new TPaveText(.1,.07,.9,.58,
"blNDC");
496 ptt4->SetTextSize(0.04);
497 ptt4->SetFillColor(0);
498 ptt4->SetTextAlign(22);
499 ptt4->SetLineColor(0);
500 ptt4->SetBorderSize(1);
501 ptt4->AddText(
"Alarms:");
504 if(status.at(9) == Quality::Good && status.at(10) == Quality::Good && status.at(11) == Quality::Good){
505 bulb->SetFillColor(kGreen);
507 bulbGreen->Draw(
"same");
510 if(status.at(9) == Quality::Medium || status.at(10) == Quality::Medium || status.at(11) == Quality::Medium){
511 if(status.at(9) == Quality::Medium) ptt4->AddText(
"#color[808]{QA Layer 0 Medium}");
512 if(status.at(10) == Quality::Medium) ptt4->AddText(
"#color[808]{QA Layer 1 Medium}");
513 if(status.at(11) == Quality::Medium) ptt4->AddText(
"#color[808]{QA Layer 2 Medium}");
514 bulb->SetFillColor(kYellow);
516 bulbYellow->Draw(
"same");
519 if(status.at(9) == Quality::Bad || status.at(10) == Quality::Bad || status.at(11) == Quality::Bad ||status.at(12) == Quality::Bad||status.at(13) == Quality::Bad||status.at(14) == Quality::Bad||status.at(15) == Quality::Bad||status.at(16) == Quality::Bad||status.at(17) == Quality::Bad ||(bitsetAND & 0x3F) != 0x3F){
520 if(status.at(9) == Quality::Bad) ptt4->AddText(
"#color[2]{QA Layer 0 Bad}");
521 if(status.at(10) == Quality::Bad) ptt4->AddText(
"#color[2]{QA Layer 1 Bad}");
522 if(status.at(11) == Quality::Bad) ptt4->AddText(
"#color[2]{QA Layer 2 Bad}");
523 if(status.at(12) == Quality::Bad) ptt4->AddText(
"#color[2]{Felix 0 Decoder Errors}");
524 if(status.at(13) == Quality::Bad) ptt4->AddText(
"#color[2]{Felix 1 Decoder Errors}");
525 if(status.at(14) == Quality::Bad) ptt4->AddText(
"#color[2]{Felix 2 Decoder Errors}");
526 if(status.at(15) == Quality::Bad) ptt4->AddText(
"#color[2]{Felix 3 Decoder Errors}");
527 if(status.at(16) == Quality::Bad) ptt4->AddText(
"#color[2]{Felix 4 Decoder Errors}");
528 if(status.at(17) == Quality::Bad) ptt4->AddText(
"#color[2]{Felix 5 Decoder Errors}");
529 if((bitsetAND & 0x3F) != 0x3F) ptt4->AddText(
"#color[2]{Some Servers are Offline or in Error}");
530 bulb->SetFillColor(kRed);
532 bulbRed->Draw(
"same");
539 TPaveText *tlegend =
new TPaveText(.2,.6,.8,.8,
"blNDC");
540 tlegend->SetTextSize(0.04);
541 tlegend->SetFillColor(0);
542 tlegend->SetTextAlign(22);
543 tlegend->SetLineColor(0);
544 tlegend->SetBorderSize(1);
545 tlegend->AddText(
"Legend:");
546 tlegend->AddText(
"#color[418]{Green = QA OK}");
547 tlegend->AddText(
"#color[808]{Yellow = QA Medium}");
548 tlegend->AddText(
"#color[2]{Red = QA Bad}");
552 TPaveText *
pt =
new TPaveText(.05,.1,.95,.8);
553 pt->AddText(
"Online Monitoring Server Status");
554 for (
int iFelix = 0; iFelix <
NFlx; iFelix++){
556 if((bitsetOR & (1<<iFelix)) == 1<<iFelix && (bitsetAND & (1<<iFelix)) == 1<<iFelix) serverStatus +=
" #color[418]{ONLINE} ";
557 if((bitsetOR & (1<<iFelix)) == 0 && (bitsetAND & (1<<iFelix)) == 0) serverStatus +=
" #color[2]{OFFLINE}";
558 if((bitsetOR & (1<<iFelix)) == 1<<iFelix && (bitsetAND & (1<<iFelix)) == 0) serverStatus +=
" #color[2]{ERROR}";
559 pt->AddText(serverStatus.c_str());
563 TC[canvasID]->SetEditable(
false);
564 return returnCode < 0 ? -1 : 0;
570 const int canvasID = 2;
573 TH2I* mTriggerVsFeeId[
NFlx+1] = {
nullptr};
574 TH1I* mTrigger[
NFlx+1] ={
nullptr};
576 TH2I* mLaneStatus[3][
NFlx+1] = {
nullptr};
577 TH2I* mLaneStatusCumulative[3][
NFlx+1] = {
nullptr};
578 TH1I* mLaneStatusSummary[3][
NFlx+1] = {
nullptr};
579 TH1I* mLaneStatusSummaryIB[
NFlx+1] = {
nullptr};
581 for (
int iFelix = 0; iFelix <
NFlx; iFelix++){
582 mTriggerVsFeeId[iFelix] =
dynamic_cast<TH2I*
>(cl->
getHisto(Form(
"MVTXMON_%d",iFelix),
"MVTXMON_FEE_TriggerVsFeeid"));
583 mTrigger[iFelix] =
dynamic_cast<TH1I*
>(cl->
getHisto(Form(
"MVTXMON_%d",iFelix),
"MVTXMON_FEE_TriggerFlag"));
585 mLaneStatusSummaryIB[iFelix]=
dynamic_cast<TH1I*
>(cl->
getHisto(Form(
"MVTXMON_%d",iFelix),
"MVTXMON_LaneStatusSummary_LaneStatusSummary"));
586 for (
int i = 0;
i < 3;
i++) {
587 mLaneStatus[
i][iFelix] =
dynamic_cast<TH2I*
>(cl->
getHisto(Form(
"MVTXMON_%d",iFelix),Form(
"MVTXMON_LaneStatus_laneStatusFlag%s",
mLaneStatusFlag[
i].c_str())));
588 mLaneStatusCumulative[
i][iFelix] =
dynamic_cast<TH2I*
>(cl->
getHisto(Form(
"MVTXMON_%d",iFelix),Form(
"MVTXMON_LaneStatus_laneStatusFlagCumulative%s",
mLaneStatusFlag[
i].c_str())));
589 mLaneStatusSummary[
i][iFelix] =
dynamic_cast<TH1I*
>(cl->
getHisto(Form(
"MVTXMON_%d",iFelix),Form(
"MVTXMON_LaneStatusSummary_LaneStatusSummaryL%i",
i)));
593 for (
int i = 0;
i < 3;
i++) {
594 MergeServers<TH2I*>(mLaneStatus[
i]);
595 MergeServers<TH2I*>(mLaneStatusCumulative[
i]);
596 MergeServers<TH1I*>(mLaneStatusSummary[
i]);
598 MergeServers<TH2I*>(mTriggerVsFeeId);
599 MergeServers<TH1I*>(mTrigger);
601 MergeServers<TH1I*>(mLaneStatusSummaryIB);
603 if (!gROOT->FindObject(
"MvtxMon_FEE"))
608 TC[canvasID]->SetEditable(
true);
609 TC[canvasID]->Clear(
"D");
610 Pad[padID]->Divide(4,3);
612 for (
int i = 0;
i < 3;
i++) {
613 if(mLaneStatus[
i][NFlx]){
614 mLaneStatus[
i][
NFlx]->GetXaxis()->SetTitleSize(0.055);
615 mLaneStatus[
i][
NFlx]->GetXaxis()->SetTitleOffset(0.85);
616 mLaneStatus[
i][
NFlx]->GetYaxis()->SetTitleSize(0.06);
617 mLaneStatus[
i][
NFlx]->GetXaxis()->SetLabelSize(0.05);
618 mLaneStatus[
i][
NFlx]->GetYaxis()->SetLabelSize(0.05);
620 if(mLaneStatusCumulative[
i][NFlx]){
621 mLaneStatusCumulative[
i][
NFlx]->GetXaxis()->SetTitleSize(0.055);
622 mLaneStatusCumulative[
i][
NFlx]->GetXaxis()->SetTitleOffset(0.85);
623 mLaneStatusCumulative[
i][
NFlx]->GetYaxis()->SetTitleSize(0.06);
624 mLaneStatusCumulative[
i][
NFlx]->GetXaxis()->SetLabelSize(0.05);
625 mLaneStatusCumulative[
i][
NFlx]->GetYaxis()->SetLabelSize(0.05);
627 if(mLaneStatusSummary[
i][NFlx]){
628 mLaneStatusSummary[
i][
NFlx]->GetXaxis()->SetLabelSize(0.07);
629 mLaneStatusSummary[
i][
NFlx]->GetYaxis()->SetTitleSize(0.06);
630 mLaneStatusSummary[
i][
NFlx]->GetYaxis()->SetLabelSize(0.05);
631 mLaneStatusSummary[
i][
NFlx]->GetYaxis()->SetTitleOffset(0.9);
634 if(mLaneStatusSummaryIB[NFlx]){
635 mLaneStatusSummaryIB[
NFlx]->GetXaxis()->SetLabelSize(0.07);
636 mLaneStatusSummaryIB[
NFlx]->GetYaxis()->SetTitleSize(0.06);
637 mLaneStatusSummaryIB[
NFlx]->GetYaxis()->SetLabelSize(0.05);
638 mLaneStatusSummaryIB[
NFlx]->GetYaxis()->SetTitleOffset(0.9);
640 if(mTriggerVsFeeId[NFlx]){
641 mTriggerVsFeeId[
NFlx]->GetXaxis()->SetTitleSize(0.055);
642 mTriggerVsFeeId[
NFlx]->GetXaxis()->SetTitleOffset(0.75);
643 mTriggerVsFeeId[
NFlx]->GetYaxis()->SetTitleOffset(1.2);
644 mTriggerVsFeeId[
NFlx]->GetYaxis()->SetTitleSize(0.06);
645 mTriggerVsFeeId[
NFlx]->GetYaxis()->SetLabelSize(0.06);
646 mTriggerVsFeeId[
NFlx]->GetXaxis()->SetLabelSize(0.05);
649 mTrigger[
NFlx]->GetXaxis()->SetTitleSize(0.055);
650 mTrigger[
NFlx]->GetXaxis()->SetTitleOffset(0.85);
651 mTrigger[
NFlx]->GetYaxis()->SetTitleSize(0.06);
652 mTrigger[
NFlx]->GetYaxis()->SetLabelSize(0.06);
653 mTrigger[
NFlx]->GetXaxis()->SetLabelSize(0.05);
654 mTrigger[
NFlx]->GetYaxis()->SetTitleOffset(0.85);
657 TPaveText *tlayer[3] = {
nullptr};
659 for (
int i = 0;
i < 3 ;
i++){
660 double shift[3] = {0,0.25,0.55};
661 tlayer[
i] =
new TPaveText(.14+shift[
i],.87,.24+shift[i],.93,
"blNDC");
662 tlayer[
i]->SetTextSize(0.05);
663 tlayer[
i]->SetFillColor(0);
664 tlayer[
i]->SetTextAlign(22);
665 tlayer[
i]->SetLineColor(0);
666 tlayer[
i]->SetBorderSize(1);
667 tlayer[
i]->AddText(Form(
"Layer %d", i));
670 Pad[padID]->cd(3)->SetTopMargin(0.16);
671 Pad[padID]->cd(4)->SetTopMargin(0.16);
672 Pad[padID]->cd(4)->SetTopMargin(0.145);
673 Pad[padID]->cd(7)->SetTopMargin(0.16);
674 Pad[padID]->cd(8)->SetTopMargin(0.16);
675 Pad[padID]->cd(11)->SetTopMargin(0.16);
676 Pad[padID]->cd(12)->SetTopMargin(0.16);
679 Pad[padID]->cd(1)->SetLeftMargin(0.16);
684 for(
int i = 0;
i<3;
i++)tlayer[
i]->
Draw();
686 for(
int i = 0;
i<3;
i++)tlayer[
i]->
Draw();
688 for(
int i = 0;
i<3;
i++)tlayer[
i]->
Draw();
690 for(
int i = 0;
i<3;
i++)tlayer[
i]->
Draw();
692 for(
int i = 0;
i<3;
i++)tlayer[
i]->
Draw();
694 for(
int i = 0;
i<3;
i++)tlayer[
i]->
Draw();
701 TC[canvasID]->SetEditable(
false);
702 return returnCode < 0 ? -1 : 0;
708 const int canvasID = 3;
711 TH1D* hOccupancyPlot[3][
NFlx+1] = {
nullptr};
712 TH2D* hChipStaveOccupancy[3][
NFlx+1] = {
nullptr};
713 TH1D *mvtxmon_ChipStave1D[
NFlx+1] = {
nullptr};
714 TH1D *mvtxmon_ChipFiredHis[
NFlx+1] = {
nullptr};
715 TH1I *hChipStrobes[
NFlx+1] = {
nullptr};
716 TH1I *hChipL1[
NFlx+1] = {
nullptr};
718 for (
int aLayer = 0; aLayer < 3; aLayer++) {
719 for (
int iFelix = 0; iFelix <
NFlx; iFelix++){
720 hOccupancyPlot[aLayer][iFelix] =
dynamic_cast<TH1D*
>(cl->
getHisto(Form(
"MVTXMON_%d",iFelix),Form(
"MVTXMON_Occupancy_Layer%dOccupancy", aLayer)));
721 hChipStaveOccupancy[aLayer][iFelix] =
dynamic_cast<TH2D*
>(cl->
getHisto(Form(
"MVTXMON_%d",iFelix),Form(
"MVTXMON_Occupancy_Layer%d_Layer%dChipStave", aLayer, aLayer)));
725 for (
int iFelix = 0; iFelix <
NFlx; iFelix++){
726 mvtxmon_ChipStave1D[iFelix] =
dynamic_cast<TH1D*
>(cl->
getHisto(Form(
"MVTXMON_%d",iFelix),
"MVTXMON_RawData_ChipStave1D"));
727 mvtxmon_ChipFiredHis[iFelix] =
dynamic_cast<TH1D*
>(cl->
getHisto(Form(
"MVTXMON_%d",iFelix),
"MVTXMON_RawData_ChipFiredHis"));
728 hChipStrobes[iFelix] =
dynamic_cast<TH1I*
>(cl->
getHisto(Form(
"MVTXMON_%d",iFelix),
"hChipStrobes"));
729 hChipL1[iFelix] =
dynamic_cast<TH1I*
>(cl->
getHisto(Form(
"MVTXMON_%d",iFelix),
"hChipL1"));
732 for (
int i = 0;
i < 3;
i++) {
733 MergeServers<TH1D*>(hOccupancyPlot[
i]);
734 MergeServers<TH2D*>(hChipStaveOccupancy[
i]);
737 TH2D *hChipStaveOccupancy_low[3] = {
nullptr};
739 for (
int i = 0;
i < 3;
i++) {
740 if(hOccupancyPlot[
i][NFlx]){
741 hOccupancyPlot[
i][
NFlx]->GetXaxis()->SetLabelSize(0.05);
742 hOccupancyPlot[
i][
NFlx]->GetXaxis()->SetTitleSize(0.05);
743 hOccupancyPlot[
i][
NFlx]->GetXaxis()->SetTitleOffset(0.85);
744 hOccupancyPlot[
i][
NFlx]->GetYaxis()->SetLabelSize(0.045);
745 hOccupancyPlot[
i][
NFlx]->GetYaxis()->SetTitleSize(0.05);
746 hOccupancyPlot[
i][
NFlx]->GetYaxis()->SetTitleOffset(1);
747 hChipStaveOccupancy[
i][
NFlx]->SetMinimum(0);
749 if(hChipStaveOccupancy[
i][NFlx]){
750 hChipStaveOccupancy[
i][
NFlx]->GetXaxis()->SetLabelSize(0.05);
751 hChipStaveOccupancy[
i][
NFlx]->GetXaxis()->SetTitleSize(0.05);
752 hChipStaveOccupancy[
i][
NFlx]->GetXaxis()->SetTitleOffset(0.85);
753 hChipStaveOccupancy[
i][
NFlx]->GetYaxis()->SetLabelSize(0.06);
754 hChipStaveOccupancy[
i][
NFlx]->GetYaxis()->SetTitleSize(0.05);
755 hChipStaveOccupancy[
i][
NFlx]->GetYaxis()->SetTitleOffset(0.7);
757 hChipStaveOccupancy_low[
i] = (TH2D*)(hChipStaveOccupancy[
i][NFlx])->Clone(Form(
"hChipStaveOccupancy_low_%d",
i));
758 TString
tmp =
"Chip Occupancy < 1\%";
759 hChipStaveOccupancy_low[
i]->SetTitle(tmp + Form(
" of average occupancy in layer %d",
i));
765 MergeServers<TH1D*>(mvtxmon_ChipStave1D);
766 MergeServers<TH1D*>(mvtxmon_ChipFiredHis);
767 MergeServers<TH1I*>(hChipStrobes);
768 MergeServers<TH1I*>(hChipL1);
770 if(mvtxmon_ChipStave1D[NFlx]){
771 mvtxmon_ChipStave1D[
NFlx]->GetXaxis()->SetLabelSize(0.05);
772 mvtxmon_ChipStave1D[
NFlx]->GetXaxis()->SetTitleSize(0.055);
773 mvtxmon_ChipStave1D[
NFlx]->GetXaxis()->SetTitleOffset(0.75);
774 mvtxmon_ChipStave1D[
NFlx]->GetYaxis()->SetLabelSize(0.045);
775 mvtxmon_ChipStave1D[
NFlx]->GetYaxis()->SetTitleSize(0.06);
776 mvtxmon_ChipStave1D[
NFlx]->GetYaxis()->SetTitleOffset(1.2);
779 if(mvtxmon_ChipFiredHis[NFlx]){
780 mvtxmon_ChipFiredHis[
NFlx]->GetXaxis()->SetLabelSize(0.05);
781 mvtxmon_ChipFiredHis[
NFlx]->GetXaxis()->SetTitleSize(0.055);
782 mvtxmon_ChipFiredHis[
NFlx]->GetXaxis()->SetTitleOffset(0.75);
783 mvtxmon_ChipFiredHis[
NFlx]->GetYaxis()->SetLabelSize(0.06);
784 mvtxmon_ChipFiredHis[
NFlx]->GetYaxis()->SetTitleSize(0.06);
785 mvtxmon_ChipFiredHis[
NFlx]->GetYaxis()->SetTitleOffset(1.2);
788 double avr_occ[3] = {0};
790 for (
int iLayer = 0; iLayer < 3; iLayer++) {
791 for (
int iStave = 0; iStave <
NStaves[iLayer]; iStave++) {
792 for (
int iChip = 0; iChip < 9; iChip++) {
793 double occ = hChipStaveOccupancy[iLayer][
NFlx]->GetBinContent(iChip+1,iStave+1)/(hChipStrobes[
NFlx]->GetBinContent((
StaveBoundary[iLayer]+iStave)*9+iChip+1)*1024*512);
794 if(occ > 10
e-50)hChipStaveOccupancy[iLayer][
NFlx]->SetBinContent(iChip+1,iStave+1,occ);
795 if(occ > 10
e-50)avr_occ[iLayer]+=occ;
800 for (
int iLayer = 0; iLayer < 3; iLayer++) {
801 avr_occ[iLayer]/=(
NStaves[iLayer]*9);
802 for (
int iStave = 0; iStave <
NStaves[iLayer]; iStave++) {
803 for (
int iChip = 0; iChip < 9; iChip++) {
804 double occ = hChipStaveOccupancy[iLayer][
NFlx]->GetBinContent(iChip+1,iStave+1);
805 if(occ <0.01* avr_occ[iLayer]) hChipStaveOccupancy_low[iLayer]->SetBinContent(iChip+1,iStave+1,1);
806 else hChipStaveOccupancy_low[iLayer]->SetBinContent(iChip+1,iStave+1,0);
813 if (!gROOT->FindObject(
"MvtxMon_OCC"))
820 TC[canvasID]->SetEditable(
true);
821 TC[canvasID]->Clear(
"D");
822 Pad[padID]->Divide(4,3);
823 Pad[padID]->cd(1)->SetLogy();
824 Pad[padID]->cd(2)->SetLogy();
825 Pad[padID]->cd(3)->SetLogy();
828 hChipStaveOccupancy[0][
NFlx]->GetZaxis()->SetTitle(
"");
829 hChipStaveOccupancy[1][
NFlx]->GetZaxis()->SetTitle(
"");
830 hChipStaveOccupancy[2][
NFlx]->GetZaxis()->SetTitle(
"");
832 hChipStrobes[
NFlx]->SetTitle(
"Chip Strobes (L1 triggers) vs Chip*Stave");
833 hChipStrobes[
NFlx]->GetYaxis()->SetTitle(
"Number of strobes");
852 Float_t rightmax = 2*hChipL1[
NFlx]->GetMaximum();
853 Float_t scale = hChipStrobes[
NFlx]->GetMaximum()/rightmax;
854 hChipL1[
NFlx]->SetLineColor(kRed);
855 hChipL1[
NFlx]->Scale(scale);
859 TGaxis *axis =
new TGaxis(48*9,hChipStrobes[NFlx]->GetMinimum(), 48*9, hChipStrobes[NFlx]->GetMaximum(),0,rightmax,510,
"+L");
860 axis->SetLineColor(kRed);
861 axis->SetLabelColor(kRed);
862 axis->SetLabelFont(42);
863 axis->SetTitleFont(42);
864 axis->SetTitleColor(kRed);
865 axis->SetTitle(
"Number of L1 triggers");
868 TPaveText *
pt =
new TPaveText(6,12,8.5,13);
869 pt->SetBorderSize(0);
871 TText *
t1 = pt->AddText(
"Not saved in .root");
872 t1->SetTextColor(kRed);
881 TC[canvasID]->SetEditable(
false);
882 return returnCode < 0 ? -1 : 0;
888 const int canvasID = 4;
891 TH2D* mDeadChipPos[3][
NFlx+1] = {
nullptr};
892 TH2D* mAliveChipPos[3][
NFlx+1] = {
nullptr};
894 TH1D* mOccupancyPlot[3][
NFlx+1] = {
nullptr};
896 TH2I* mErrorVsFeeid[
NFlx+1] = {
nullptr};
897 TH2Poly* mGeneralOccupancy[
NFlx+1] = {
nullptr};
898 TH2Poly* mGeneralNoisyPixel[
NFlx+1] = {
nullptr};
899 TH2D* mTotalDeadChipPos[
NFlx+1] = {
nullptr};
900 TH2D* mTotalAliveChipPos[
NFlx+1] = {
nullptr};
901 TH1D *mvtxmon_EvtHitChip[
NFlx+1] = {
nullptr};
902 TH1D *mvtxmon_EvtHitDis[
NFlx+1] = {
nullptr};
904 TH1I *mRCDAQevt[
NFlx+1] = {
nullptr};
906 TH2D* mChipStaveNoisy[3][
NFlx+1];
910 for (
int iFelix = 0; iFelix <
NFlx; iFelix++){
911 mErrorVsFeeid[iFelix] =
dynamic_cast<TH2I*
>(cl->
getHisto(Form(
"MVTXMON_%d",iFelix),
"MVTXMON_General_ErrorVsFeeid"));
912 mGeneralOccupancy[iFelix] =
dynamic_cast<TH2Poly*
>(cl->
getHisto(Form(
"MVTXMON_%d",iFelix),
"MVTXMON_General_Occupancy"));
913 mGeneralNoisyPixel[iFelix] =
dynamic_cast<TH2Poly*
>(cl->
getHisto(Form(
"MVTXMON_%d",iFelix),
"MVTXMON_General_Noisy_Pixel"));
914 mTotalDeadChipPos[iFelix] =
dynamic_cast<TH2D*
>(cl->
getHisto(Form(
"MVTXMON_%d",iFelix),
"MVTXMON_Occupancy_TotalDeadChipPos"));
915 mTotalAliveChipPos[iFelix] =
dynamic_cast<TH2D*
>(cl->
getHisto(Form(
"MVTXMON_%d",iFelix),
"MVTXMON_Occupancy_TotalAliveChipPos"));
916 mvtxmon_EvtHitChip[iFelix] =
dynamic_cast<TH1D*
>(cl->
getHisto(Form(
"MVTXMON_%d",iFelix),
"MVTXMON_RawData_EvtHitChip"));
917 mvtxmon_EvtHitDis[iFelix] =
dynamic_cast<TH1D*
>(cl->
getHisto(Form(
"MVTXMON_%d",iFelix),
"MVTXMON_RawData_EvtHitDis"));
918 mRCDAQevt[iFelix] =
dynamic_cast<TH1I*
>(cl->
getHisto(Form(
"MVTXMON_%d",iFelix),
"RCDAQ_evt"));
919 for (
int mLayer = 0; mLayer < 3; mLayer++) {
920 mDeadChipPos[mLayer][iFelix] =
dynamic_cast<TH2D*
>(cl->
getHisto(Form(
"MVTXMON_%d",iFelix),Form(
"MVTXMON_Occupancy_Layer%d_Layer%dDeadChipPos", mLayer, mLayer)));
921 if(mDeadChipPos[mLayer][iFelix]) nFLX[mLayer]++;
922 mAliveChipPos[mLayer][iFelix] =
dynamic_cast<TH2D*
>(cl->
getHisto(Form(
"MVTXMON_%d",iFelix),Form(
"MVTXMON_Occupancy_Layer%d_Layer%dAliveChipPos", mLayer, mLayer)));
924 mOccupancyPlot[mLayer][iFelix] =
dynamic_cast<TH1D*
>(cl->
getHisto(Form(
"MVTXMON_%d",iFelix),Form(
"MVTXMON_Occupancy_Layer%dOccupancy_LOG", mLayer)));
926 mChipStaveNoisy[mLayer][iFelix] =
dynamic_cast<TH2D*
>(cl->
getHisto(Form(
"MVTXMON_%d",iFelix),Form(
"MVTXMON_Noisy_Layer%d_ChipStave", mLayer)));
930 for (
int iFelix = 0; iFelix <
NFlx; iFelix++) {
931 for (
int mLayer = 0; mLayer < 3; mLayer++) {
932 if(mAliveChipPos[mLayer][iFelix] && mRCDAQevt[iFelix]) mAliveChipPos[mLayer][iFelix]->Scale(1./mRCDAQevt[iFelix]->Integral());
934 if(mChipStaveNoisy[mLayer][iFelix] && mRCDAQevt[iFelix]) mChipStaveNoisy[mLayer][iFelix]->Scale(1./mRCDAQevt[iFelix]->Integral());
936 if(mGeneralNoisyPixel[iFelix] && mRCDAQevt[iFelix]) mGeneralNoisyPixel[iFelix]->Scale(1./mRCDAQevt[iFelix]->Integral());
939 for (
int mLayer = 0; mLayer < 3; mLayer++) {
940 MergeServers<TH2D*>(mDeadChipPos[mLayer]);
941 MergeServers<TH2D*>(mAliveChipPos[mLayer]);
942 MergeServers<TH1D*>(mOccupancyPlot[mLayer]);
943 MergeServers<TH2D*>(mChipStaveNoisy[mLayer]);
944 if(mDeadChipPos[mLayer][NFlx]){
945 mDeadChipPos[mLayer][
NFlx]->SetMinimum(0);
946 mDeadChipPos[mLayer][
NFlx]->SetMaximum(1);
956 MergeServers<TH2I*>(mErrorVsFeeid);
957 MergeServers<TH2Poly*>(mGeneralOccupancy);
958 MergeServers<TH2Poly*>(mGeneralNoisyPixel);
959 MergeServers<TH2D*>(mTotalDeadChipPos);
960 MergeServers<TH2D*>(mTotalAliveChipPos);
961 MergeServers<TH1D*>(mvtxmon_EvtHitChip);
962 MergeServers<TH1D*>(mvtxmon_EvtHitDis);
963 MergeServers<TH1I*>(mRCDAQevt);
965 if(mTotalDeadChipPos[NFlx]){
966 mTotalDeadChipPos[
NFlx]->SetMinimum(0);
967 mTotalDeadChipPos[
NFlx]->SetMaximum(1);
974 for (
int mLayer = 0; mLayer < 3; mLayer++) {
975 if(mDeadChipPos[mLayer][NFlx]){
976 for (
int binx = 0; binx < mDeadChipPos[mLayer][
NFlx]->GetNbinsX(); binx++) {
977 for (
int biny = 0; biny < mDeadChipPos[mLayer][
NFlx]->GetNbinsY(); biny++) {
979 mDeadChipPos[mLayer][
NFlx]->SetBinContent(binx+1,biny+1,mDeadChipPos[mLayer][NFlx]->GetBinContent(binx+1,biny+1)-nFLX[mLayer]+1);
987 if (!gROOT->FindObject(
"MvtxMon_FHR"))
992 TC[canvasID]->SetEditable(
true);
993 TC[canvasID]->Clear(
"D");
994 Pad[padID]->Divide(5,3);
1024 TC[canvasID]->SetEditable(
false);
1025 return returnCode < 0 ? -1 : 0;
1032 int iret =
Draw(what);
1038 for (TCanvas *canvas :
TC)
1040 if (canvas ==
nullptr)
1054 int iret =
Draw(what);
1063 for (TCanvas *canvas :
TC)
1065 if (canvas ==
nullptr)
1096 const int canvasID = 5;
1097 const int padID = 5;
1099 int iret[
NFlx] = {0,0,0,0,0,0};
1102 std::vector<float> var[
NFlx];
1103 std::vector<float> varerr[
NFlx];
1111 for (
int iFelix = 0; iFelix <
NFlx; iFelix++){
1112 iret[iFelix] =
dbvars[iFelix]->
GetVar(begin, end, varname, timestamp[iFelix], runnumber[iFelix], var[iFelix], varerr[iFelix]);
1114 std::cout << __PRETTY_FUNCTION__ <<
" Error in db access: FELIX "<<iFelix << std::endl;
1120 if (!gROOT->FindObject(
"MvtxMon3"))
1124 TC[canvasID]->SetEditable(
true);
1125 TC[canvasID]->Clear(
"D");
1126 Pad[padID]->Divide(3,2);
1128 for (
int iFelix = 0; iFelix <
NFlx; iFelix++){
1130 float *
x =
new float[var[iFelix].size()];
1131 float *
y =
new float[var[iFelix].size()];
1132 float *ex =
new float[var[iFelix].size()];
1133 float *ey =
new float[var[iFelix].size()];
1134 int n = var[iFelix].size();
1135 for (
unsigned int i = 0;
i < var[iFelix].size();
i++)
1143 y[
i] = var[iFelix][
i];
1145 ey[
i] = varerr[iFelix][
i];
1147 Pad[padID]->cd(iFelix+1);
1152 gr[iFelix] =
new TGraphErrors(n, x, y, ex, ey);
1153 gr[iFelix]->SetMarkerColor(4);
1154 gr[iFelix]->SetMarkerStyle(21);
1155 gr[iFelix]->Draw(
"ALP");
1156 gr[iFelix]->GetXaxis()->SetTimeDisplay(1);
1157 gr[iFelix]->GetXaxis()->SetLabelSize(0.03);
1161 gr[iFelix]->GetXaxis()->SetNdivisions(-1006);
1163 gr[iFelix]->GetXaxis()->SetTimeFormat(
"%Y/%m/%d %H:%M");
1216 TC[canvasID]->Update();
1217 TC[canvasID]->SetEditable(
false);
1241 TCanvas *
c =
nullptr;
1253 TCanvas *
c =
nullptr;
1262 template <
typename T>
1264 bool cloned =
false;
1266 for (
int iFelix = 0; iFelix <
NFlx; iFelix++){
1267 if (cloned ==
false){
1269 h[
NFlx] =
dynamic_cast<T>(h[iFelix]->Clone());
1270 bitset |= (1U << (iFelix));
1277 h[
NFlx]->Add(h[iFelix],1.);
1278 bitset |= (1U << (iFelix));
1288 PrintRun.SetTextFont(62);
1289 PrintRun.SetTextSize(0.04);
1291 PrintRun.SetTextAlign(23);
1292 std::ostringstream runnostream;
1294 time_t evttime = cl->
EventTime(
"CURRENT");
1297 <<
", Time: " << ctime(&evttime);
1298 runstring = runnostream.str();
1300 PrintRun.DrawText(0.5, 1., runstring.c_str());
1307 aPT->SetTextSize(aTextSize);
1308 aPT->SetTextAlign(aTextAlign);
1309 aPT->SetFillColor(0);
1310 aPT->SetTextAlign(22);
1311 aPT->SetTextColor(aTextColor);
1312 aPT->AddText(aText);
1318 for (
int iflag = 0; iflag <
NFlags; iflag++) {
1319 for (
int ilayer = 0; ilayer <
NLAYERS; ilayer++) {
1320 result.at((3*iflag)+ilayer) = Quality::Good;
1324 for (
int iflag = 0; iflag <
NFlags; iflag++) {
1325 for (
int ilayer = 0; ilayer <
NLAYERS; ilayer++) {
1328 badStave[iflag][
ibin-1] =
false;
1329 double bincontent = 0;
1330 if(iflag==0 && over1) bincontent = over1->GetBinContent(
ibin);
1331 if(iflag==1 && over2) bincontent = over2->GetBinContent(
ibin);
1332 if(iflag==2 && over3) bincontent = over3->GetBinContent(
ibin);
1334 badStave[iflag][
ibin-1] =
true;
1337 result.at((3*iflag)+ilayer) = Quality::Medium;
1340 if (countStave > 0.25 *
NStaves[ilayer]) {
1341 result.at((3*iflag)+ilayer) = Quality::Bad;
1347 for (
int ilayer = 0; ilayer <
NLAYERS; ilayer++) {
1349 result.at(ilayer+9) = Quality::Good;
1351 if(badStave[0][
ibin-1] || badStave[1][
ibin-1] || badStave[2][
ibin-1]){
1352 result.at(ilayer+9) = Quality::Medium;
1356 if (countStave > 0.25 *
NStaves[ilayer]) {
1357 result.at(ilayer+9) = Quality::Bad;
1361 for (
int iflx = 0; iflx < 6; iflx++) {
1363 if(decErr->Integral(6*iflx+1,6*iflx+7)>0) result.at(12+iflx) = Quality::Bad;
1364 else result.at(12+iflx) = Quality::Good;
1366 else result.at(12+iflx) = Quality::Good;
1416 TPaveText *
pt =
new TPaveText(.4,.4,.6,.6,
"blNDC");
1417 pt->SetTextSize(0.04);
1418 pt->SetFillColor(0);
1419 pt->SetLineColor(0);
1420 pt->SetBorderSize(1);
1421 if(status.at(position) == Quality::Good && status.at(position+1) == Quality::Good && status.at(position+2) == Quality::Good) pt->AddText(
"#color[418]{QA OK}");
1422 if(status.at(position) == Quality::Medium) pt->AddText(
"#color[808]{QA Layer 0 Medium}");
1423 if(status.at(position+1) == Quality::Medium) pt->AddText(
"#color[808]{QA Layer 1 Medium}");
1424 if(status.at(position+2) == Quality::Medium) pt->AddText(
"#color[808]{QA Layer 2 Medium}");
1425 if(status.at(position) == Quality::Bad) pt->AddText(
"#color[2]{QA Layer 0 Bad}");
1426 if(status.at(position+1) == Quality::Bad) pt->AddText(
"#color[2]{QA Layer 1 Bad}");
1427 if(status.at(position+2) == Quality::Bad) pt->AddText(
"#color[2]{QA Layer 2 Bad}");
1435 time_t currtime = cl->
EventTime(
"CURRENT");