27 EcalDCSTowerStatusSummaryPlot()
32 bool fill(
const std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs)
override {
33 auto iov = iovs.front();
34 std::shared_ptr<EcalDCSTowerStatus>
payload =
36 unsigned int run = std::get<0>(iov);
44 align =
new TH2F(
"Ecal DCS Tower Status Errors Total",
45 "EB/EE LV LVNOMINAL HV HVNOMINAL HVEED HVEEDNOMINAL TotalItems",
53 float ebVals[] = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f};
54 float eeVals[] = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f};
56 long unsigned int ebTotal = (
payload->barrelItems()).
size();
57 long unsigned int eeTotal = (
payload->endcapItems()).
size();
59 getSummary(
payload->barrelItems(), ebVals, ebTotal);
60 getSummary(
payload->endcapItems(), eeVals, eeTotal);
62 double row = NbRows - 0.5;
65 align->Fill(0.5, row, 1);
67 for (
int i = 0;
i < 6;
i++) {
68 align->Fill(1.5 +
i, row, ebVals[
i]);
70 align->Fill(7.5, row, ebTotal);
74 align->Fill(0.5, row, 2);
76 for (
int i = 0;
i < 6;
i++) {
77 align->Fill(1.5 +
i, row, eeVals[
i]);
79 align->Fill(7.5, row, eeTotal);
85 gStyle->SetPalette(1);
86 gStyle->SetOptStat(0);
87 TCanvas
canvas(
"CC map",
"CC map", 1000, 1000);
93 t1.DrawLatex(0.5, 0.96, Form(
"Ecal DCSTower Status Errors Total, IOV %i",
run));
95 TPad* pad =
new TPad(
"pad",
"pad", 0.0, 0.0, 1.0, 0.94);
102 align->GetXaxis()->SetTickLength(0.);
103 align->GetXaxis()->SetLabelSize(0.);
104 align->GetYaxis()->SetTickLength(0.);
105 align->GetYaxis()->SetLabelSize(0.);
108 canvas.SaveAs(ImageName.c_str());
112 void getSummary(std::vector<EcalChannelStatusCode> vItems,
float vals[],
long unsigned int&
total) {
113 unsigned int shift = 0, mask = 1;
114 unsigned int statusCode;
116 for (std::vector<EcalChannelStatusCode>::const_iterator iItems = vItems.begin(); iItems != vItems.end();
118 statusCode = iItems->getStatusCode();
121 if (statusCode & mask) {
#define PAYLOAD_INSPECTOR_CLASS(CLASS_NAME)
#define PAYLOAD_INSPECTOR_MODULE(PAYLOAD_TYPENAME)
static unsigned int const shift
void drawTable(int nbRows, int nbColumns)
std::shared_ptr< PayloadType > fetchPayload(const cond::Hash &payloadHash)