18 BasicPayload_data0() :
cond::payloadInspector::HistoryPlot<
cond::BasicPayload,
float>(
"Example Trend",
"data0") {}
19 ~BasicPayload_data0()
override =
default;
25 BasicPayload_data0_withInput()
26 :
cond::payloadInspector::HistoryPlot<
cond::BasicPayload,
float>(
"Example Trend",
"data0") {
31 ~BasicPayload_data0_withInput()
override =
default;
35 auto ip = paramValues.find(
"Factor");
36 if (ip != paramValues.end()) {
37 v =
v * boost::lexical_cast<float>(ip->second);
39 ip = paramValues.find(
"Offset");
40 if (ip != paramValues.end()) {
41 v =
v + boost::lexical_cast<float>(ip->second);
43 ip = paramValues.find(
"Scale");
44 if (ip != paramValues.end()) {
45 v =
v * boost::lexical_cast<float>(ip->second);
54 :
cond::payloadInspector::RunHistoryPlot<
cond::BasicPayload,
float>(
"Example Run-based Trend",
"data0") {}
55 ~BasicPayload_data1()
override =
default;
62 :
cond::payloadInspector::TimeHistoryPlot<
cond::BasicPayload,
float>(
"Example Time-based Trend",
"data0") {}
63 ~BasicPayload_data2()
override =
default;
72 ~BasicPayload_data3()
override =
default;
81 BasicPayload_data4() :
cond::payloadInspector::
Histogram1D<
cond::BasicPayload>(
"Example Histo1d",
"x", 10, 0, 10) {
82 Base::setSingleIov(
true);
84 ~BasicPayload_data4()
override =
default;
86 bool fill()
override {
87 auto tag = PlotBase::getTag<0>();
88 for (
auto iov :
tag.iovs) {
91 for (
size_t j = 0;
j < 100;
j++) {
100 class BasicPayload_data5
105 "Example Histo2d",
"x", 10, 0, 10,
"y", 10, 0, 10) {}
106 ~BasicPayload_data5()
override =
default;
108 bool fill()
override {
109 auto tag = PlotBase::getTag<0>();
110 for (
auto iov :
tag.iovs) {
113 for (
size_t i = 0;
i < 10;
i++)
114 for (
size_t j = 0;
j < 10;
j++) {
123 class BasicPayload_data6
128 "Example delivery picture") {}
130 bool fill()
override {
131 auto tag = PlotBase::getTag<0>();
132 auto iov =
tag.iovs.front();
137 TH2D h2D(
"h2D",
"Example", 100, 0.,
xmax, 100, 0.,
ymax);
140 if (
payload->m_vec.size() == 10000) {
141 for (
size_t i = 0;
i < 100;
i++)
142 for (
size_t j = 0;
j < 100;
j++) {
149 TCanvas
c(
"c",
"", 10, 10, 900, 500);
152 h2D.SetNdivisions(18,
"X");
153 h2D.GetXaxis()->SetTickLength(0.00);
154 h2D.GetYaxis()->SetTickLength(0.00);
155 h2D.GetXaxis()->SetTitle(
"iphi");
156 h2D.GetYaxis()->SetTitle(
"ieta");
166 l.DrawLine(
m, 0.,
m, 100.);
177 Tl.SetTextSize(0.04);
179 Tll.SetTextAlign(23);
180 Tll.SetTextSize(0.04);
183 for (
int i = 1;
i <= 10;
i++) {
185 char const* pchar =
s.c_str();
187 Tl.DrawLatex(
j - 5,
int(
ymax) / 1.33, pchar);
191 for (
int g = -10;
g < 0;
g++) {
193 char const* pchar1 =
ss.c_str();
195 Tll.DrawLatex(
z - 5,
int(
ymax) / 4, pchar1);
208 BasicPayload_data7() :
cond::payloadInspector::PlotImage<
cond::BasicPayload>(
"Example delivery picture") {
212 bool fill(
const std::vector<std::tuple<cond::Time_t, cond::Hash>>& iovs)
override {
213 auto iov0 = iovs.front();
214 auto iov1 = iovs.back();
215 std::shared_ptr<cond::BasicPayload> payload0 =
fetchPayload(std::get<1>(iov0));
216 std::shared_ptr<cond::BasicPayload> payload1 =
fetchPayload(std::get<1>(iov1));
220 TH2D h2D(
"h2D",
"Example", 100, 0.,
xmax, 100, 0.,
ymax);
222 if (payload0.get() && payload1.get()) {
223 if (payload0->m_vec.size() == 10000 && payload1->m_vec.size() == 10000) {
224 for (
size_t i = 0;
i < 100;
i++)
225 for (
size_t j = 0;
j < 100;
j++) {
226 auto diff =
abs(payload0->m_vec[
i * 100 +
j] - payload1->m_vec[
i * 100 +
j]);
233 TCanvas
c(
"c",
"", 20, 20, 900, 500);
236 h2D.SetNdivisions(18,
"X");
237 h2D.GetXaxis()->SetTickLength(0.00);
238 h2D.GetYaxis()->SetTickLength(0.00);
239 h2D.GetXaxis()->SetTitle(
"iphi");
240 h2D.GetYaxis()->SetTitle(
"ieta");
250 l.DrawLine(
m, 0.,
m, 100.);
261 Tl.SetTextSize(0.04);
263 Tll.SetTextAlign(23);
264 Tll.SetTextSize(0.04);
267 for (
int i = 1;
i <= 10;
i++) {
269 char const* pchar =
s.c_str();
271 Tl.DrawLatex(
j - 5,
int(
ymax) / 1.33, pchar);
275 for (
int g = -10;
g < 0;
g++) {
277 char const* pchar1 =
ss.c_str();
279 Tll.DrawLatex(
z - 5,
int(
ymax) / 4, pchar1);