17 #include "TPaveStats.h"
27 EcalSRSettingsSummaryPlot() : cond::payloadInspector::PlotImage<
EcalSRSettings>(
"Ecal SR Settings Summary - map ") {
32 const int maxInCol = 27;
34 auto iov =
iovs.front();
36 unsigned int run = std::get<0>(iov);
48 gridRows = (NbRows <= maxInCol) ? NbRows : maxInCol;
49 offset =
ceil(1.0 * NbRows / maxInCol);
50 NbColumns = offset * 2 + 3;
53 new TH2F(
"Ecal SR Settings Summary",
54 "ebDccAdcToGeV eeDccAdcToGeV Rows# srpLowInterestChannelZS srpHighInterestChannelZS",
62 double row = gridRows - 0.5;
69 for (
int i = 0;
i < gridRows;
i++) {
70 align->Fill(2.5, gridRows -
i - 0.5,
i + 1);
76 align->Fill(column, row, *it);
79 column = floor(1.0 * cnt / maxInCol) + 3.5;
80 row = (row == 0.5 ? (gridRows - 0.5) : row - 1);
90 align->Fill(column + offset, row, *it);
93 column = floor(1.0 * cnt / maxInCol) + 3.5;
94 row = (row == 0.5 ? (gridRows - 0.5) : row - 1);
100 gStyle->SetPalette(1);
101 gStyle->SetOptStat(0);
102 TCanvas
canvas(
"CC map",
"CC map", 1000, 1000);
106 t1.SetTextSize(0.05);
108 t1.DrawLatex(0.5, 0.96, Form(
"Ecal SRSettings Summary, IOV %i", run));
110 TPad* pad =
new TPad(
"pad",
"pad", 0.0, 0.0, 1.0, 0.94);
117 align->GetXaxis()->SetTickLength(0.);
118 align->GetXaxis()->SetLabelSize(0.);
119 align->GetYaxis()->SetTickLength(0.);
120 align->GetYaxis()->SetLabelSize(0.);
123 canvas.SaveAs(ImageName.c_str());
constexpr int32_t ceil(float num)
std::vector< float > srpHighInterestChannelZS_
#define PAYLOAD_INSPECTOR_CLASS(CLASS_NAME)
#define PAYLOAD_INSPECTOR_MODULE(PAYLOAD_TYPENAME)
float ebDccAdcToGeV_
ADC to GeV conversion factor used in ZS filter for EB.
std::vector< float > srpLowInterestChannelZS_
float eeDccAdcToGeV_
ADC to GeV conversion factor used in ZS filter for EE.
void drawTable(int nbRows, int nbColumns)
std::shared_ptr< PayloadType > fetchPayload(const cond::Hash &payloadHash)