27 EcalDCSTowerStatusSummaryPlot() :
32 bool fill(
const std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs)
override {
34 auto iov = iovs.front();
36 unsigned int run = std::get < 0 > (iov);
45 align =
new TH2F(
"Ecal DCS Tower Status Errors Total",
"EB/EE LV LVNOMINAL HV HVNOMINAL HVEED HVEEDNOMINAL TotalItems",
46 NbColumns, 0, NbColumns, NbRows, 0, NbRows);
48 float ebVals[]={0.0f,0.0f,0.0f,0.0f,0.0f,0.0f};
49 float eeVals[]={0.0f,0.0f,0.0f,0.0f,0.0f,0.0f};
51 long unsigned int ebTotal=(payload->barrelItems()).
size();
52 long unsigned int eeTotal=(payload->endcapItems()).
size();
54 getSummary(payload->barrelItems(),ebVals,ebTotal);
55 getSummary(payload->endcapItems(),eeVals,eeTotal);
58 double row = NbRows - 0.5;
61 align->Fill(0.5, row, 1);
64 align->Fill(1.5+
i, row, ebVals[
i]);
66 align->Fill(7.5, row, ebTotal);
72 align->Fill(0.5, row, 2);
75 align->Fill(1.5+
i, row, eeVals[
i]);
77 align->Fill(7.5, row, eeTotal);
84 gStyle->SetPalette(1);
85 gStyle->SetOptStat(0);
86 TCanvas
canvas(
"CC map",
"CC map", 1000, 1000);
92 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);
103 align->GetXaxis()->SetTickLength(0.);
104 align->GetXaxis()->SetLabelSize(0.);
105 align->GetYaxis()->SetTickLength(0.);
106 align->GetYaxis()->SetLabelSize(0.);
109 canvas.SaveAs(ImageName.c_str());
113 void getSummary(std::vector<EcalChannelStatusCode> vItems,
float vals[],
long unsigned int &
total){
115 unsigned int statusCode;
117 for(std::vector<EcalChannelStatusCode>::const_iterator iItems = vItems.begin(); iItems != vItems.end(); ++iItems){
118 statusCode = iItems->getStatusCode();
119 for (shift = 0; shift < 6; ++
shift){
121 if (statusCode &
mask){
std::shared_ptr< PayloadType > fetchPayload(const cond::Hash &payloadHash)
#define PAYLOAD_INSPECTOR_CLASS(CLASS_NAME)
virtual bool fill(const std::vector< std::tuple< cond::Time_t, cond::Hash > > &iovs)=0
#define PAYLOAD_INSPECTOR_MODULE(PAYLOAD_TYPENAME)
void setSingleIov(bool flag)
static unsigned int const shift
void drawTable(int nbRows, int nbColumns)