574 auto theIOVs = cond::payloadInspector::PlotBase::getTag<0>().iovs;
575 auto f_tagname = cond::payloadInspector::PlotBase::getTag<0>().
name;
577 auto firstiov = theIOVs.front();
578 std::tuple<cond::Time_t, cond::Hash> lastiov;
584 auto tag2iovs = cond::payloadInspector::PlotBase::getTag<1>().iovs;
585 l_tagname = cond::payloadInspector::PlotBase::getTag<1>().
name;
586 lastiov = tag2iovs.front();
588 lastiov = theIOVs.back();
597 TCanvas
canvas(
"Beam Spot Parameters Difference Summary",
"Beam Spot Parameters Difference summary", 1000, 1000);
600 canvas.cd(1)->SetTopMargin(0.08);
601 canvas.cd(1)->SetBottomMargin(0.06);
602 canvas.cd(1)->SetLeftMargin(0.14);
603 canvas.cd(1)->SetRightMargin(0.16);
608 auto h2_BSParameters = std::make_unique<TH2F>(
"Parameters",
"", 2, 0.0, 2.0, 8, 0, 8.);
609 h2_BSParameters->SetStats(
false);
610 h2_BSParameters->GetXaxis()->SetBinLabel(1,
"Value");
611 h2_BSParameters->GetXaxis()->SetBinLabel(2,
"Error");
612 h2_BSParameters->GetXaxis()->LabelsOption(
"h");
613 h2_BSParameters->GetYaxis()->SetLabelSize(0.05);
614 h2_BSParameters->GetXaxis()->SetLabelSize(0.05);
615 h2_BSParameters->SetMarkerSize(1.5);
622 std::stringstream ss1, ss2;
631 const auto diffPars = fBS.diffCentralValues(lBS);
632 const auto diffErrors = fBS.diffErrors(lBS);
636 unsigned int yBin = 8;
640 h2_BSParameters->GetYaxis()->SetBinLabel(
yBin, theLabel.c_str());
641 h2_BSParameters->SetBinContent(1,
yBin, diffPars[
foo]);
642 h2_BSParameters->SetBinContent(2,
yBin, diffErrors[
foo]);
647 auto h2_BSShadow = (TH2F*)(h2_BSParameters->Clone(
"shadow"));
648 h2_BSShadow->GetZaxis()->SetTitle(
"#Delta Parameter(payload A - payload B)");
649 h2_BSShadow->GetZaxis()->CenterTitle();
650 h2_BSShadow->GetZaxis()->SetTitleOffset(1.5);
653 double max = h2_BSShadow->GetMaximum();
654 double min = h2_BSShadow->GetMinimum();
655 double val_white = 0.;
656 double per_white = (
max !=
min) ? ((val_white -
min) / (
max -
min)) : 0.5;
659 double Red[
number] = {0., 1., 1.};
660 double Green[
number] = {0., 1., 0.};
661 double Blue[
number] = {1., 1., 0.};
662 double Stops[
number] = {0., per_white, 1.};
664 h2_BSShadow->SetContour(nb);
665 TColor::CreateGradientColorTable(
number, Stops, Red, Green, Blue, nb);
667 h2_BSShadow->Draw(
"colz");
668 h2_BSParameters->Draw(
"TEXTsame");
672 ltx.SetTextSize(0.025);
673 ltx.SetTextAlign(11);
683 gPad->GetLeftMargin() - 0.1,
684 1 - gPad->GetTopMargin() + 0.015,
686 "#splitline{A = #color[4]{%s}: %s}{B = #color[4]{%s}: %s}", f_tagname, f_runLSs, l_tagname, l_runLSs))
690 gPad->GetLeftMargin() - 0.1,
691 1 - gPad->GetTopMargin() + 0.015,
692 (fmt::sprintf(
"#splitline{#color[4]{%s}}{A = %s | B = %s}", f_tagname, l_runLSs, f_runLSs)).c_str());
std::string m_imageFileName
std::shared_ptr< PayloadType > l_payload
std::string getStringFromParamEnum(const parameters ¶meter, const bool addUnits=false)
static std::string to_string(const XMLCh *ch)
std::pair< unsigned int, unsigned int > unpack(cond::Time_t since)
PlotAnnotations m_plotAnnotations
std::shared_ptr< PayloadType > f_payload
Log< level::Warning, true > LogPrint
std::shared_ptr< PayloadType > fetchPayload(const cond::Hash &payloadHash)