17 #include "TPaveStats.h" 27 EcalTPGLutIdMapPlot():
32 bool fill(
const std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs)
override {
33 auto iov=iovs.front();
35 unsigned int run=std::get<0> (iov);
44 align =
new TH2F(
"Ecal TPG LutId Map",
"EB LutEcalTPGLut EE LutEcalTPGLut",
45 4, 0, 4, NbRows, 0, NbRows);
47 double row = NbRows - 0.5;
52 uint32_t mapKey=it->first;
54 const unsigned int*
lut=(ecaltpgLut.
getLut());
56 for(
int i=0;
i<30;
i++){
58 align->Fill(0.5+columnBase, row, mapKey+1);
60 align->Fill(1.5+columnBase, row, *(lut+
i));
73 gStyle->SetPalette(1);
74 gStyle->SetOptStat(0);
75 TCanvas
canvas(
"CC map",
"CC map", 1000, 1000);
81 t1.DrawLatex(0.5, 0.96,Form(
"ECAL TPG LutId Map, IOV %i", run));
83 TPad* pad =
new TPad(
"pad",
"pad", 0.0, 0.0, 1.0, 0.94);
89 for (
int i = 1;
i < NbRows;
i++) {
90 double y = (double)
i;
91 l =
new TLine(1., y, 2., y);
95 for (
int i = 1;
i < NbRows;
i++) {
96 double y = (double)
i;
97 l =
new TLine(3., y, 4., y);
101 for (
int i = 1;
i < 4;
i++) {
102 double x = (double)
i;
103 double y = (double) NbRows;
104 l =
new TLine(x, 0., x, y);
108 align->GetXaxis()->SetTickLength(0.);
109 align->GetXaxis()->SetLabelSize(0.);
110 align->GetYaxis()->SetTickLength(0.);
111 align->GetYaxis()->SetLabelSize(0.);
114 canvas.SaveAs(ImageName.c_str());
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)
std::map< uint32_t, EcalTPGLut > EcalTPGLutMap
const unsigned int * getLut() const
std::map< uint32_t, EcalTPGLut >::const_iterator EcalTPGLutMapItr