27 EcalDAQTowerStatusSummaryPlot()
32 bool fill(
const std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs)
override {
33 auto iov = iovs.front();
34 std::shared_ptr<EcalDAQTowerStatus>
payload =
36 unsigned int run = std::get<0>(iov);
44 align =
new TH2F(
"Ecal DAQ Tower Status Summary",
45 "EB/EE bit 0 -> towers excluded from the DAQ",
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);
66 align->Fill(1.5, row, ebVals);
67 align->Fill(2.5, row, ebTotal);
71 align->Fill(0.5, row, 2);
72 align->Fill(1.5, row, eeVals);
73 align->Fill(2.5, row, eeTotal);
79 gStyle->SetPalette(1);
80 gStyle->SetOptStat(0);
81 TCanvas
canvas(
"CC map",
"CC map", 1000, 1000);
87 t1.DrawLatex(0.5, 0.96, Form(
"Ecal DAQTower Status Summary, IOV %i",
run));
89 TPad* pad =
new TPad(
"pad",
"pad", 0.0, 0.0, 1.0, 0.94);
96 align->GetXaxis()->SetTickLength(0.);
97 align->GetXaxis()->SetLabelSize(0.);
98 align->GetYaxis()->SetTickLength(0.);
99 align->GetYaxis()->SetLabelSize(0.);
102 canvas.SaveAs(ImageName.c_str());
106 void getSummary(std::vector<EcalDAQStatusCode> vItems,
float& vals,
long unsigned int&
total) {
107 for (std::vector<EcalDAQStatusCode>::const_iterator iItems = vItems.begin(); iItems != vItems.end(); ++iItems) {
108 if (iItems->getStatusCode() > 0)
#define PAYLOAD_INSPECTOR_CLASS(CLASS_NAME)
#define PAYLOAD_INSPECTOR_MODULE(PAYLOAD_TYPENAME)
void drawTable(int nbRows, int nbColumns)
std::shared_ptr< PayloadType > fetchPayload(const cond::Hash &payloadHash)