495 auto theIOVs = cond::payloadInspector::PlotBase::getTag<0>().iovs;
496 auto f_tagname = cond::payloadInspector::PlotBase::getTag<0>().
name;
498 auto firstiov = theIOVs.front();
499 std::tuple<cond::Time_t, cond::Hash> lastiov;
505 auto tag2iovs = cond::payloadInspector::PlotBase::getTag<1>().iovs;
506 l_tagname = cond::payloadInspector::PlotBase::getTag<1>().
name;
507 lastiov = tag2iovs.front();
509 lastiov = theIOVs.back();
518 TCanvas
canvas(
"Beam Spot Parameters Difference Summary",
"Beam Spot Parameters Difference summary", 1000, 1000);
521 canvas.cd(1)->SetTopMargin(0.08);
522 canvas.cd(1)->SetBottomMargin(0.06);
523 canvas.cd(1)->SetLeftMargin(0.14);
524 canvas.cd(1)->SetRightMargin(0.16);
529 auto h2_BSParameters = std::make_unique<TH2F>(
"Parameters",
"", 2, 0.0, 2.0, 8, 0, 8.);
530 h2_BSParameters->SetStats(
false);
531 h2_BSParameters->GetXaxis()->SetBinLabel(1,
"Value");
532 h2_BSParameters->GetXaxis()->SetBinLabel(2,
"Error");
533 h2_BSParameters->GetXaxis()->LabelsOption(
"h");
534 h2_BSParameters->GetYaxis()->SetLabelSize(0.05);
535 h2_BSParameters->GetXaxis()->SetLabelSize(0.05);
536 h2_BSParameters->SetMarkerSize(1.5);
543 std::stringstream ss1, ss2;
552 const auto diffPars = fBS.diffCentralValues(lBS);
553 const auto diffErrors = fBS.diffErrors(lBS);
557 unsigned int yBin = 8;
561 h2_BSParameters->GetYaxis()->SetBinLabel(
yBin, theLabel.c_str());
562 h2_BSParameters->SetBinContent(1,
yBin, diffPars[foo]);
563 h2_BSParameters->SetBinContent(2,
yBin, diffErrors[foo]);
568 auto h2_BSShadow = (TH2F*)(h2_BSParameters->Clone(
"shadow"));
569 h2_BSShadow->GetZaxis()->SetTitle(
"#Delta Parameter(payload A - payload B)");
570 h2_BSShadow->GetZaxis()->CenterTitle();
571 h2_BSShadow->GetZaxis()->SetTitleOffset(1.5);
574 double max = h2_BSShadow->GetMaximum();
575 double min = h2_BSShadow->GetMinimum();
576 double val_white = 0.;
577 double per_white = (
max !=
min) ? ((val_white -
min) / (
max -
min)) : 0.5;
580 double Red[
Number] = {0., 1., 1.};
581 double Green[
Number] = {0., 1., 0.};
582 double Blue[
Number] = {1., 1., 0.};
583 double Stops[
Number] = {0., per_white, 1.};
585 h2_BSShadow->SetContour(nb);
586 TColor::CreateGradientColorTable(
Number, Stops, Red, Green, Blue, nb);
588 h2_BSShadow->Draw(
"colz");
589 h2_BSParameters->Draw(
"TEXTsame");
593 ltx.SetTextSize(0.025);
594 ltx.SetTextAlign(11);
604 gPad->GetLeftMargin() - 0.1,
605 1 - gPad->GetTopMargin() + 0.015,
607 "#splitline{A = #color[4]{%s}: %s}{B = #color[4]{%s}: %s}", f_tagname, f_runLSs, l_tagname, l_runLSs))
611 gPad->GetLeftMargin() - 0.1,
612 1 - gPad->GetTopMargin() + 0.015,
613 (fmt::sprintf(
"#splitline{#color[4]{%s}}{A = %s | B = %s}", f_tagname, l_runLSs, f_runLSs)).c_str());
std::string m_imageFileName
std::pair< unsigned int, unsigned int > unpack(cond::Time_t since)
std::string to_string(const V &value)
PlotAnnotations m_plotAnnotations
Log< level::Warning, true > LogPrint
std::shared_ptr< PayloadType > f_payload
std::string getStringFromParamEnum(const parameters ¶meter, const bool addUnits=false)
std::shared_ptr< PayloadType > l_payload
std::shared_ptr< PayloadType > fetchPayload(const cond::Hash &payloadHash)