27 #define BOTANY_BAY_OH_NO(x) x < 0?"−":"", fabs(x) 28 #define BOTANY_BAY_OH_INT(x) x < 0?"−":"", abs((int)x) 37 gtk_text_buffer_set_text(
stattext[boxn], buf, strlen(buf));
39 gtk_widget_draw(
statbox[boxn], NULL);
50 "(%'d/%'d %s, %.0f%% loaded)",
64 int pos = snprintf(status1,
MAXSTATUS,
"Ticks %s%d through %d. ",
67 pos += snprintf(status1+pos,
MAXSTATUS-pos,
68 "Showing ticks %s%d through %s%d (%s%.3f through %s%.3f μs)",
79 pos += snprintf(status1+pos,
MAXSTATUS-pos,
80 "Showing tick %s%d (%s%.3f μs)",
86 snprintf(status1,
MAXSTATUS,
"Empty event");
99 int pos = snprintf(status2,
MAXSTATUS,
"Plane %d, cell %d: ",
104 bool needseparator =
false;
107 const int maxmatches = 3;
109 for(
unsigned int i = 0;
i < THEhits.size();
i++){
115 if(matches <= maxmatches){
117 "%sTDC = %s%d (%s%.3f μs), TNS = %s%.3f μs%s, ADC = %s%d",
118 needseparator?
"; ":
"",
122 THEhits[
i].good_tns?
"":
"(bad)",
124 needseparator =
true;
126 else if(matches == maxmatches+1){
149 pos += snprintf(status+pos,
MAXSTATUS-pos,
"at (%.1f, %.1f, %.1f)\n",
153 pos += snprintf(status+pos,
MAXSTATUS-pos,
"time %.4f %c%cs",
173 pos += snprintf(status+pos,
MAXSTATUS-pos,
"start (%.1f, %.1f, %.1f)\n" 174 "stop (%.1f, %.1f, %.1f)\n",
181 pos += snprintf(status+pos,
MAXSTATUS-pos,
"time %.4f %c%cs",
void set_eventn_status_progress(const int nhit, const int tothits)
static const int MAXSTATUS
void set_eventn_status_vertex()
void set_status(const int boxn, const char *format,...)
std::vector< noeevent > theevents
GtkTextBuffer * stattext[NSTATBOXES]
std::string format(const int32_t &value, const int &ndigits=8)
void set_eventn_status_runevent()
void set_eventn_status_timing()
void set_eventn_status_hit()
GtkWidget * statbox[NSTATBOXES]
#define BOTANY_BAY_OH_NO(x)
#define BOTANY_BAY_OH_INT(x)
bool theevents_memory_limited
void set_eventn_status_track()