18 BasicPayload_data0() :
cond::payloadInspector::HistoryPlot<
cond::BasicPayload,
float>(
"Example Trend",
"data0"){
20 ~BasicPayload_data0()
override =
default;
28 BasicPayload_data1() :
cond::payloadInspector::RunHistoryPlot<
cond::BasicPayload,
float>(
"Example Run-based Trend",
"data0"){
30 ~BasicPayload_data1()
override =
default;
38 BasicPayload_data2() :
cond::payloadInspector::TimeHistoryPlot<
cond::BasicPayload,
float>(
"Example Time-based Trend",
"data0"){
40 ~BasicPayload_data2()
override =
default;
51 ~BasicPayload_data3()
override =
default;
60 BasicPayload_data4() :
cond::payloadInspector::Histogram1D<
cond::BasicPayload>(
"Example Histo1d",
"x",10,0,10){
61 Base::setSingleIov(
true );
63 ~BasicPayload_data4()
override =
default;
65 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
66 for(
auto iov : iovs ) {
67 std::shared_ptr<cond::BasicPayload>
payload = Base::fetchPayload( std::get<1>(iov) );
69 for(
size_t j=0;j<100;j++ ) {
70 fillWithValue( j, payload->m_vec[j] );
80 BasicPayload_data5() :
cond::payloadInspector::Histogram2D<
cond::BasicPayload>(
"Example Histo2d",
"x",10,0,10,
"y",10,0,10){
81 Base::setSingleIov(
true );
83 ~BasicPayload_data5()
override =
default;
85 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
86 for(
auto iov : iovs ) {
87 std::shared_ptr<cond::BasicPayload> payload = Base::fetchPayload( std::get<1>(iov) );
89 for(
size_t i=0;
i<10;
i++ )
90 for(
size_t j=0;j<10;j++ ) {
91 fillWithValue( j,
i, payload->m_vec[
i*10+j] );
101 BasicPayload_data6() :
cond::payloadInspector::PlotImage<
cond::BasicPayload>(
"Example delivery picture" ){
102 setSingleIov(
true );
105 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
106 auto iov = iovs.front();
107 std::shared_ptr<cond::BasicPayload> payload = fetchPayload( std::get<1>(iov) );
111 TH2D h2D(
"h2D",
"Example",100,0.,
xmax,100,0.,
ymax);
114 if(payload->m_vec.size()==10000){
115 for(
size_t i=0;
i<100;
i++ )
116 for(
size_t j=0;j<100;j++ ) {
117 h2D.Fill(
i,j,payload->m_vec[
i*100+j]);
123 TCanvas
c(
"c",
"",10,10,900,500);
126 h2D.SetNdivisions(18,
"X");
127 h2D.GetXaxis()->SetTickLength(0.00);
128 h2D.GetYaxis()->SetTickLength(0.00);
129 h2D.GetXaxis()->SetTitle(
"iphi");
130 h2D.GetYaxis()->SetTitle(
"ieta");
140 l.DrawLine(
m, 0.,
m, 100.);
151 Tl.SetTextSize(0.04);
153 Tll.SetTextAlign(23);
154 Tll.SetTextSize(0.04);
157 for(
int i = 1;
i <=10;
i++){
159 char const *pchar = s.c_str();
161 Tl.DrawLatex(j-5,
int(
ymax)/1.33,pchar);
165 for(
int g = -10;
g <0;
g++){
167 char const *pchar1 = ss.c_str();
169 Tll.DrawLatex(z-5,
int(
ymax)/4,pchar1);
182 BasicPayload_data7() :
cond::payloadInspector::PlotImage<
cond::BasicPayload>(
"Example delivery picture" ){
186 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
187 auto iov0 = iovs.front();
188 auto iov1 = iovs.back();
189 std::shared_ptr<cond::BasicPayload> payload0 = fetchPayload( std::get<1>(iov0) );
190 std::shared_ptr<cond::BasicPayload> payload1 = fetchPayload( std::get<1>(iov1) );
194 TH2D h2D(
"h2D",
"Example",100,0.,
xmax,100,0.,
ymax);
196 if( payload0.get() && payload1.get() ){
197 if(payload0->m_vec.size()==10000 && payload1->m_vec.size()==10000 ){
198 for(
size_t i=0;
i<100;
i++ )
199 for(
size_t j=0;j<100;j++ ) {
200 auto diff =
abs(payload0->m_vec[
i*100+j] - payload1->m_vec[
i*100+j]);
207 TCanvas
c(
"c",
"",20,20,900,500);
210 h2D.SetNdivisions(18,
"X");
211 h2D.GetXaxis()->SetTickLength(0.00);
212 h2D.GetYaxis()->SetTickLength(0.00);
213 h2D.GetXaxis()->SetTitle(
"iphi");
214 h2D.GetYaxis()->SetTitle(
"ieta");
224 l.DrawLine(
m, 0.,
m, 100.);
235 Tl.SetTextSize(0.04);
237 Tll.SetTextAlign(23);
238 Tll.SetTextSize(0.04);
241 for(
int i = 1;
i <=10;
i++){
243 char const *pchar = s.c_str();
245 Tl.DrawLatex(j-5,
int(
ymax)/1.33,pchar);
249 for(
int g = -10;
g <0;
g++){
251 char const *pchar1 = ss.c_str();
253 Tll.DrawLatex(z-5,
int(
ymax)/4,pchar1);
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
#define PAYLOAD_INSPECTOR_CLASS(CLASS_NAME)
Abs< T >::type abs(const T &t)
#define PAYLOAD_INSPECTOR_MODULE(PAYLOAD_TYPENAME)
virtual Y getFromPayload(PayloadType &payload)=0