18 BasicPayload_data0() :
cond::payloadInspector::HistoryPlot<
cond::BasicPayload,
float>(
"Example Trend",
"data0") {}
19 ~BasicPayload_data0()
override =
default;
26 :
cond::payloadInspector::RunHistoryPlot<
cond::BasicPayload,
float>(
"Example Run-based Trend",
"data0") {}
27 ~BasicPayload_data1()
override =
default;
34 :
cond::payloadInspector::TimeHistoryPlot<
cond::BasicPayload,
float>(
"Example Time-based Trend",
"data0") {}
35 ~BasicPayload_data2()
override =
default;
44 ~BasicPayload_data3()
override =
default;
53 BasicPayload_data4() :
cond::payloadInspector::Histogram1D<
cond::BasicPayload>(
"Example Histo1d",
"x", 10, 0, 10) {
54 Base::setSingleIov(
true);
56 ~BasicPayload_data4()
override =
default;
58 bool fill(
const std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs)
override {
59 for (
auto iov : iovs) {
60 std::shared_ptr<cond::BasicPayload>
payload = Base::fetchPayload(std::get<1>(iov));
62 for (
size_t j = 0;
j < 100;
j++) {
63 fillWithValue(
j, payload->m_vec[
j]);
74 :
cond::payloadInspector::Histogram2D<
cond::BasicPayload>(
"Example Histo2d",
"x", 10, 0, 10,
"y", 10, 0, 10) {
75 Base::setSingleIov(
true);
77 ~BasicPayload_data5()
override =
default;
79 bool fill(
const std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs)
override {
80 for (
auto iov : iovs) {
81 std::shared_ptr<cond::BasicPayload> payload = Base::fetchPayload(std::get<1>(iov));
83 for (
size_t i = 0;
i < 10;
i++)
84 for (
size_t j = 0;
j < 10;
j++) {
85 fillWithValue(
j,
i, payload->m_vec[
i * 10 +
j]);
95 BasicPayload_data6() :
cond::payloadInspector::PlotImage<
cond::BasicPayload>(
"Example delivery picture") {
99 bool fill(
const std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs)
override {
100 auto iov = iovs.front();
101 std::shared_ptr<cond::BasicPayload> payload = fetchPayload(std::get<1>(iov));
105 TH2D h2D(
"h2D",
"Example", 100, 0.,
xmax, 100, 0.,
ymax);
108 if (payload->m_vec.size() == 10000) {
109 for (
size_t i = 0;
i < 100;
i++)
110 for (
size_t j = 0;
j < 100;
j++) {
111 h2D.Fill(
i,
j, payload->m_vec[
i * 100 +
j]);
117 TCanvas
c(
"c",
"", 10, 10, 900, 500);
120 h2D.SetNdivisions(18,
"X");
121 h2D.GetXaxis()->SetTickLength(0.00);
122 h2D.GetYaxis()->SetTickLength(0.00);
123 h2D.GetXaxis()->SetTitle(
"iphi");
124 h2D.GetYaxis()->SetTitle(
"ieta");
134 l.DrawLine(
m, 0.,
m, 100.);
145 Tl.SetTextSize(0.04);
147 Tll.SetTextAlign(23);
148 Tll.SetTextSize(0.04);
151 for (
int i = 1;
i <= 10;
i++) {
153 char const* pchar = s.c_str();
155 Tl.DrawLatex(j - 5,
int(
ymax) / 1.33, pchar);
159 for (
int g = -10;
g < 0;
g++) {
161 char const* pchar1 = ss.c_str();
163 Tll.DrawLatex(z - 5,
int(
ymax) / 4, pchar1);
176 BasicPayload_data7() :
cond::payloadInspector::PlotImage<
cond::BasicPayload>(
"Example delivery picture") {
180 bool fill(
const std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs)
override {
181 auto iov0 = iovs.front();
182 auto iov1 = iovs.back();
183 std::shared_ptr<cond::BasicPayload> payload0 = fetchPayload(std::get<1>(iov0));
184 std::shared_ptr<cond::BasicPayload> payload1 = fetchPayload(std::get<1>(iov1));
188 TH2D h2D(
"h2D",
"Example", 100, 0.,
xmax, 100, 0.,
ymax);
190 if (payload0.get() && payload1.get()) {
191 if (payload0->m_vec.size() == 10000 && payload1->m_vec.size() == 10000) {
192 for (
size_t i = 0;
i < 100;
i++)
193 for (
size_t j = 0; j < 100; j++) {
194 auto diff =
abs(payload0->m_vec[
i * 100 + j] - payload1->m_vec[
i * 100 + j]);
195 h2D.Fill(
i, j,
diff);
201 TCanvas
c(
"c",
"", 20, 20, 900, 500);
204 h2D.SetNdivisions(18,
"X");
205 h2D.GetXaxis()->SetTickLength(0.00);
206 h2D.GetYaxis()->SetTickLength(0.00);
207 h2D.GetXaxis()->SetTitle(
"iphi");
208 h2D.GetYaxis()->SetTitle(
"ieta");
218 l.DrawLine(
m, 0.,
m, 100.);
229 Tl.SetTextSize(0.04);
231 Tll.SetTextAlign(23);
232 Tll.SetTextSize(0.04);
235 for (
int i = 1;
i <= 10;
i++) {
237 char const* pchar = s.c_str();
239 Tl.DrawLatex(j - 5,
int(
ymax) / 1.33, pchar);
243 for (
int g = -10;
g < 0;
g++) {
245 char const* pchar1 = ss.c_str();
247 Tll.DrawLatex(z - 5,
int(
ymax) / 4, pchar1);
#define PAYLOAD_INSPECTOR_CLASS(CLASS_NAME)
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Abs< T >::type abs(const T &t)
#define PAYLOAD_INSPECTOR_MODULE(PAYLOAD_TYPENAME)
virtual Y getFromPayload(PayloadType &payload)=0