22 enum {TEMPLATESAMPLES=5};
35 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
36 TH2F**
barrel =
new TH2F*[TEMPLATESAMPLES];
37 double pEBmin[TEMPLATESAMPLES], pEBmax[TEMPLATESAMPLES];
38 std::string text[TEMPLATESAMPLES]= {
"ThresholdETLow",
"ThresholdETHigh",
"RatioLow",
"RatioHigh",
"LUT"};
41 for(
int s = 0;
s < TEMPLATESAMPLES; ++
s) {
42 char *
y =
new char[text[
s].length() + 1];
43 std::strcpy(y, text[
s].c_str());
48 uint32_t ThresholdETLow =0;
49 uint32_t ThresholdETHigh =0;
51 uint32_t RatioHigh =0;
54 auto iov = iovs.front();
56 unsigned int run = std::get<0>(iov);
59 const std::map<uint32_t, EcalTPGFineGrainConstEB> &towerMap = (*payload).getMap();
60 std::map<uint32_t, EcalTPGFineGrainConstEB>::const_iterator it = towerMap.begin();
73 fg.
getValues(ThresholdETLow,ThresholdETHigh,RatioLow,RatioHigh,LUT);
75 barrel[0]->Fill(iphi, ieta,ThresholdETLow);
76 barrel[1]->Fill(iphi, ieta,ThresholdETHigh);
77 barrel[2]->Fill(iphi, ieta,RatioLow);
78 barrel[3]->Fill(iphi, ieta,RatioHigh);
79 barrel[4]->Fill(iphi, ieta,LUT);
82 if(ThresholdETLow<pEBmin[0])pEBmin[0]=ThresholdETLow;
83 if(ThresholdETHigh<pEBmin[1])pEBmin[1]=ThresholdETHigh;
84 if(RatioLow<pEBmin[2])pEBmin[2]=RatioLow;
85 if(RatioHigh<pEBmin[3])pEBmin[3]=RatioHigh;
86 if(LUT<pEBmin[4])pEBmin[4]=
LUT;
88 if(ThresholdETLow>pEBmax[0])pEBmax[0]=ThresholdETLow;
89 if(ThresholdETHigh>pEBmax[1])pEBmax[1]=ThresholdETHigh;
90 if(RatioLow>pEBmax[2])pEBmax[2]=RatioLow;
91 if(RatioHigh>pEBmax[3])pEBmax[3]=RatioHigh;
92 if(LUT>pEBmax[4])pEBmax[4]=
LUT;
106 gStyle->SetPalette(1);
107 gStyle->SetOptStat(0);
108 TCanvas
canvas(
"CC map",
"CC map", 1600, 2800);
112 t1.SetTextSize(0.04);
113 t1.DrawLatex(0.5, 0.96, Form(
"Ecal TPGFine Grain EBIdMap, IOV %i", run));
118 TPad** pad =
new TPad*[TEMPLATESAMPLES];
119 for (
int s = 0;
s < TEMPLATESAMPLES;
s++) {
120 float yma = 0.94 - (0.16 *
s);
121 float ymi = yma - 0.14;
123 char *y =
new char[text[
s].length() + 1];
124 std::strcpy(y, text[
s].c_str());
126 pad[
s] =
new TPad(Form(
"Towers %i", EBcnt),y,xmi, ymi, xma, yma);
131 for(
int s = 0;
s < TEMPLATESAMPLES;
s++) {
134 if(pEBmin[
s] == pEBmax[
s]) {
135 pEBmin[
s] = pEBmin[
s] - 1.e-06;
136 pEBmax[
s] = pEBmax[
s] + 1.e-06;
140 barrel[
s]->SetMaximum(pEBmax[s]);
141 barrel[
s]->SetMinimum(pEBmin[s]);
142 barrel[
s]->Draw(
"colz");
144 TLine*
l =
new TLine(0., 0., 0., 0.);
147 Double_t
x = 4.+ (
i * 4);
148 l =
new TLine(x, -MAX_IETA, x, MAX_IETA);
156 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
void getValues(uint32_t &ThresholdETLow, uint32_t &ThresholdETHigh, uint32_t &RatioLow, uint32_t &RatioHigh, uint32_t &LUT) const
#define PAYLOAD_INSPECTOR_MODULE(PAYLOAD_TYPENAME)
void setSingleIov(bool flag)
std::vector< unsigned short int > LUT