886 auto tag = cond::payloadInspector::PlotBase::getTag<0>();
887 auto iov =
tag.iovs.front();
889 gStyle->SetOptStat(
"emr");
893 TCanvas
canvas(
"Canv",
"Canv", 1400, 800);
897 float minimum(9999.);
898 float maximum(-9999.);
902 maximum =
payload->getGainHigh();
903 minimum =
payload->getGainLow();
906 maximum =
payload->getPedHigh();
907 minimum =
payload->getPedLow();
914 auto hBPix = std::make_shared<TH1F>(Form(
"%s BPIX",
TypeName[myType]),
915 Form(
"SiPixel Gain Calibration %s BPIx -%s;per %s %s (BPix);# %ss",
925 auto hFPix = std::make_shared<TH1F>(Form(
"%s FPIX",
TypeName[myType]),
926 Form(
"SiPixel Gain Calibration %s FPix -%s;per %s %s (FPix);# %ss",
936 for (
unsigned int i : {1, 2}) {
946 hBPix->GetYaxis()->SetRangeUser(0.1, hBPix->GetMaximum() * 10);
947 hBPix->SetFillColor(kBlue);
948 hBPix->SetMarkerStyle(20);
949 hBPix->SetMarkerSize(1);
953 hBPix->SetStats(
true);
957 hFPix->GetYaxis()->SetRangeUser(0.1, hFPix->GetMaximum() * 10);
958 hFPix->SetFillColor(kBlue);
959 hFPix->SetMarkerStyle(20);
960 hFPix->SetMarkerSize(1);
964 hFPix->SetStats(
true);
968 TLegend
legend = TLegend(0.32, 0.92, 0.97, 0.95);
969 legend.SetHeader((
"Payload hash: #bf{" + (std::get<1>(iov)) +
"}").c_str(),
973 legend.SetTextSize(0.025);
980 TPaveStats* st1 = (TPaveStats*)hBPix->FindObject(
"stats");
981 st1->SetTextSize(0.03);
985 TPaveStats* st2 = (TPaveStats*)hFPix->FindObject(
"stats");
986 st2->SetTextSize(0.03);
992 ltx.SetTextSize(0.045);
993 ltx.SetTextAlign(11);
995 ltx.DrawLatexNDC(gPad->GetLeftMargin() + 0.01,
996 1 - gPad->GetTopMargin() + 0.01,
997 (
"SiPixel Gain Calibration IOV:" +
std::to_string(std::get<0>(iov))).c_str());
1000 ltx.DrawLatexNDC(gPad->GetLeftMargin() + 0.01,
1001 1 - gPad->GetTopMargin() + 0.01,
1002 (
"SiPixel Gain Calibration IOV:" +
std::to_string(std::get<0>(iov))).c_str());
std::string m_imageFileName
std::string to_string(const V &value)
Log< level::Error, false > LogError
constexpr char const * TypeName[2]
void adjustCanvasMargins(TVirtualPad *pad, float top, float bottom, float left, float right)
void adjustStats(TPaveStats *stats, float X1, float Y1, float X2, float Y2)
void makeNicePlotStyle(TH1 *hist)
static void fillTheHistos(const std::shared_ptr< PayloadType > &payload, std::shared_ptr< TH1 > hBPix, std::shared_ptr< TH1 > hFPix, gainCalibPI::type theType)
std::shared_ptr< PayloadType > fetchPayload(const cond::Hash &payloadHash)