template<class PayloadType, class StoreType, class TransientType>
class templateHelper::SiPixelTitles_Display< PayloadType, StoreType, TransientType >
Definition at line 39 of file SiPixelTemplateHelper.h.
template<class PayloadType , class StoreType , class TransientType >
Implements cond::payloadInspector::PlotImpl< IOV_M, 0 >.
Definition at line 54 of file SiPixelTemplateHelper.h.
References svgfig::canvas(), Exception, cond::payloadInspector::PlotImage< PayloadType, cond::payloadInspector::SINGLE_IOV >::fetchPayload(), MillePedeFileConverter_cfg::fileName, mps_fire::i, templateHelper::SiPixelTitles_Display< PayloadType, StoreType, TransientType >::isTemplate_, MainPageGenerator::l, templateHelper::SiPixelTitles_Display< PayloadType, StoreType, TransientType >::label_, mps_splice::line, groupFilesInBlocks::lines, cond::payloadInspector::PlotImage< PayloadType, cond::payloadInspector::SINGLE_IOV >::m_imageFileName, WZElectronSkims53X_cff::max, jetsAK4_Puppi_cff::payload, AlCaHLTBitMon_QueryRunRegistry::string, makeGlobalPositionRcd_cfg::tag, createPayload::tagname, and to_string().
55 auto tag = cond::payloadInspector::PlotBase::getTag<0>();
56 auto iov =
tag.iovs.front();
58 std::vector<StoreType> thePixelTemp_;
64 if (!TransientType::pushfile(*
payload, thePixelTemp_)) {
66 <<
" not filled correctly." 67 <<
" Check the conditions. Using " 68 << (
isTemplate_ ?
"SiPixelTemplateDBObject" :
"SiPixelGenErrorDBObject")
69 <<
" version " <<
payload->version() <<
"\n\n";
72 unsigned int mapsize = thePixelTemp_.size();
73 float pitch = 1. / (mapsize * 1.1);
76 std::vector<float> y_x1, y_x2, y_line;
77 std::vector<std::string> s_x1, s_x2, s_x3;
87 s_x1.push_back(Form(
"#scale[1.2]{%s}", (
isTemplate_ ?
"Template ID" :
"GenError ID")));
89 s_x2.push_back(Form(
"#scale[1.2]{#color[4]{%s} in IOV: #color[4]{%s}}",
tagname.c_str(), IOVsince.c_str()));
94 for (
const auto& element : thePixelTemp_) {
100 s_x2.push_back(Form(
"#color[2]{%s}", element.head.title));
102 y_line.push_back(
y - (pitch / 2.));
105 const auto& c_title = fmt::sprintf(
"%s titles", (
isTemplate_ ?
"Template" :
"GenError"));
106 TCanvas
canvas(c_title.c_str(), c_title.c_str(), 2000,
std::max(y_x1.size(), y_x2.size()) * 40);
111 float newpitch = 1 / (
std::max(y_x1.size(), y_x2.size()) * 1.1);
112 float factor = newpitch / pitch;
113 l.SetTextSize(newpitch - 0.002);
115 for (
unsigned int i = 0;
i < y_x1.size();
i++) {
116 l.DrawLatexNDC(
x1, 1 - (1 - y_x1[
i]) *
factor, s_x1[
i].c_str());
119 for (
unsigned int i = 0;
i < y_x2.size();
i++) {
120 l.DrawLatexNDC(
x2, 1 - (1 - y_x2[
i]) *
factor, s_x2[
i].c_str());
126 TLine
lines[y_line.size()];
128 for (
const auto&
line : y_line) {
130 lines[iL].SetLineWidth(1);
131 lines[iL].SetLineStyle(9);
132 lines[iL].SetLineColor(2);
133 lines[iL].Draw(
"same");
std::string m_imageFileName
static std::string to_string(const XMLCh *ch)
std::shared_ptr< PayloadType > fetchPayload(const cond::Hash &payloadHash)