16 #include "TPaveStats.h" 33 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
36 auto iov = iovs.front();
41 std::vector<HcalSiPMCharacteristics> itemsVec;
42 std::pair<std::string,int> valMap;
49 TCanvas* can =
new TCanvas(
"RecoParamsSummary",
"RecoParamsSummary",2400, 1680);
54 label.SetTextAlign(26);
55 label.SetTextSize(0.05);
56 label.SetTextColor(2);
57 label.DrawLatex(0.5, 0.96,Form(
"Hcal SiPM Characteristics"));
58 std::vector<float>
line;
61 int nTypes = payload->getTypes();
62 float startPosY = 0.9, endPosY = 0.1;
63 float startPosX = 0.03, endPosX = 0.92;
65 std::vector<float>::iterator linEle;
66 std::vector<std::string>::iterator linStrEle;
70 std::vector<std::string> lblline = {
"Type",
"Pixels",
"parLin1",
"parLin2",
"parLin3",
"crossTalk"};
71 xDiff = (endPosX - startPosX)/(lblline.size()-1);
72 yDiff = (startPosY - endPosY)/nTypes;
75 label.SetTextAlign(12);
76 label.SetTextSize(0.05);
77 label.SetTextColor(1);
78 ll =
new TLine(startPosX -0.2*xDiff, startPosY + 0.5*yDiff, startPosX - 0.2*xDiff, startPosY - 0.5*yDiff);
80 for(linStrEle = lblline.begin(); linStrEle != lblline.end(); ++linStrEle) {
81 ll =
new TLine(startPosX + (j+0.5)*xDiff, startPosY + 0.5*yDiff, startPosX + (j+0.5)*xDiff, startPosY - 0.5*yDiff);
82 label.DrawLatex(startPosX + (j==0 ? -0.1 : (j-0.4))*xDiff , startPosY, (*linStrEle).c_str());
86 ll =
new TLine(0,startPosY - 0.5 * yDiff, 1, startPosY - 0.5 * yDiff);
92 val.SetTextSize(0.035);
93 for(
int i = 0;
i < nTypes;
i++){
94 type = payload->getType(
i);
97 line = {(
float)type, (
float)payload->getPixels(type), payload->getNonLinearities(type).at(0), payload->getNonLinearities(type).at(1), payload->getNonLinearities(type).at(2), payload->getCrossTalk(type)};
98 ll =
new TLine(startPosX -0.2*xDiff, startPosY - (
i+0.5)*yDiff, startPosX - 0.2*xDiff, startPosY - (
i+1.5)*yDiff);
102 for(linEle = line.begin(); linEle != line.end(); ++linEle) {
103 ll =
new TLine(startPosX + (j+0.5)*xDiff, startPosY - (
i+0.5)*yDiff, startPosX + (j+0.5)*xDiff, startPosY - (
i+1.5)*yDiff);
114 can->SaveAs(ImageName.c_str());
std::shared_ptr< PayloadType > fetchPayload(const cond::Hash &payloadHash)
void drawTable(int nbRows, int nbColumns)
#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)
std::string SciNotatStr(float num)
void setSingleIov(bool flag)