1 #ifndef DDTMODULARPLOTFUNCTIONS_H 2 #define DDTMODULARPLOTFUNCTIONS_H 22 g->SetMarkerColor(color);
23 g->SetMarkerStyle(style);
30 a->SetLabelSize(0.03);
31 a->SetTimeFormat(time_format);
32 a->SetLimits(time_earlier,time_later);
33 a->SetTitle(
"(central time)");
38 p->SetFillStyle(4000);
40 p->SetFrameFillStyle(4000);
63 TPaveText *GoodValues =
new TPaveText(0.10,0.90,0.40,0.93,
"NDC");
64 GoodValues->SetLineColor(1);
65 GoodValues->SetFillColor(0);
66 GoodValues->SetBorderSize(1);
69 sprintf(gvtext,
"Good Values: [%f, %f]", gv_low, gv_high);
71 GoodValues->AddText(gvtext);
88 TPaveText *LastPoint =
new TPaveText(0.50,0.90,0.90,0.93,
"NDC");
89 LastPoint->SetLineColor(1);
90 LastPoint->SetFillColor(0);
91 LastPoint->SetBorderSize(1);
96 if (g1->GetN() > 0) { no_g1 =
false; }
97 if (g2->GetN() > 0) { no_g2 =
false; }
104 if ( ! no_g1 && ! no_g2 ) {
105 if (g1->GetX()[g1->GetN()-1] >= g2->GetX()[g2->GetN()-1]) {
106 latest_Y = g1->GetY()[g1->GetN()-1]; }
108 latest_Y = g2->GetY()[g2->GetN()-1]; } }
111 else if ( ! no_g1 ) {
112 latest_Y = g1->GetY()[g1->GetN()-1]; }
115 else if ( ! no_g2 ) {
116 latest_Y = g2->GetY()[g2->GetN()-1]; }
123 sprintf(lptext,
"Last Point = %f / Average (Good Values) = %f", latest_Y, g1->GetMean(2));
125 LastPoint->AddText(lptext);
135 TPaveText *Updated =
new TPaveText(0.1, 0.0, 0.5, 0.05,
"NDC");
136 TDatime *Ttemp =
new TDatime;
138 TDatime *Tfinish =
new TDatime(Xfin);
139 Updated->SetLineColor(0);
140 Updated->SetFillColor(0);
141 Updated->SetBorderSize(1);
142 Updated->SetMargin(0.0);
143 Updated->SetTextAlign(11);
145 sprintf(buff1,
"Last updated on: %s (central time)", Tfinish->AsString());
146 Updated->AddText(buff1);
148 sprintf(buff2,
"Last run / subrun: %d / %d", LastRun, LastSR);
149 Updated->AddText(buff2);
TPaveText * GoodValuesText(const double gv_low, const double gv_high)
TPaveText * UpdatedText(const int GMToffset, const unsigned int LastRun, const unsigned int LastSR)
void configure_time_axis(TAxis *a, const int time_earlier, const int time_later, const char *time_format)
void print_plot(TCanvas *c, const char *filename)
TPaveText * LastPointText(const TGraph *g1, const TGraph *g2)
void transparent_pad(TPad *p)
void configure_tgraph(TGraph *g, const Color_t color, const Style_t style, const char *title)