10 #define __STDC_FORMAT_MACROS
12 #include <QtCore/QDateTime>
36 _inputrate(inputrate),
37 _inputload(inputload),
38 _analyzerate(analyzerate)
42 output <<
"ProcessingInfo: ";
45 output <<
"ShowInfo '"<< std::boolalpha <<
_showInfo <<
"', ";
47 output <<
"ShowTime '"<< std::boolalpha <<
_showTime <<
"', ";
48 _timeformat = s.
value(
"TimeFormatString",
"dd-MMM-yy_HH:mm:ss ").toString().toStdString();
49 output <<
"Timeformat-string '" <<
_timeformat <<
"', ";
53 output <<
"UpdateInterval '" << _interval <<
"', ";
55 output <<
"ShowInputRate '"<< std::boolalpha <<
_showInputRate <<
"', ";
57 output <<
"ShowInputLoad '"<< std::boolalpha <<
_showInputLoad <<
"', ";
61 output <<
"ShowProcessRatio '"<< std::boolalpha <<
_showProgress <<
"', ";
67 output <<
"NewLine '"<< std::boolalpha <<
_newLine <<
"', ";
68 output <<
"ValueProcessors: ";
70 for (
int i = 0; i <
size; ++i)
74 proc.
name = s.
value(
"Name",
"Unknown").toString().toStdString();
77 proc.
unit = s.
value(
"Unit",
"").toString().toStdString();
78 if (proc.
name !=
"Unknown")
81 output <<
"Name '" << proc.
name <<
"', "
83 <<
"Precision '" << proc.
precision <<
"', "
84 <<
"Unit '" << proc.
unit <<
"', ";
106 std::ostream out(buf);
107 out << endl <<
"Quit" << endl;
125 output <<
"Input: " << std::setw(5) << std::fixed << std::setprecision(1)
152 output <<
" | Load: "
153 << std::setw(5) << std::fixed << std::setprecision(1)
158 output <<
" | Analyze: "
159 << std::setw(5) << std::fixed << std::setprecision(1)
164 output <<
" | Processed: "
165 << std::setw(5) << std::fixed << std::setprecision(1)
170 output <<
" | Events: "
176 output <<
" | Skipped Events: "
180 for (proclist_t::const_iterator it(
_procs.begin()); it !=
_procs.end(); ++it)
187 if (result->dim() != 0)
193 output <<
" | " << result->name() <<
": "
194 << std::setw(it->fieldWidth)
195 << std::fixed << std::setprecision(it->precision)
196 << result->getValue() << it->unit;
221 std::streambuf * buf;
232 std::ostream out(buf);
234 out << output.str() << flush;
std::string _filename
the filename to which the status will be written
bool _newLine
flag to tell whether the updated info should be put into a new line
bool _showAnalysisRate
flag to tell whether the analysis rate should be reported
find nbr of bragg peaks by taking background with pixels that are free of
class calculating a rate in Hz.
sleep(unsigned long secs)
file contains declaration of class calculating a rate
bool _showNProcessedEvents
flag to tell whether to report on how many events have been processed
Ratemeter & _analyzerate
reference to the workers (analysis) Ratemeter
std::tr1::shared_ptr< self_type > shared_pointer
a shared pointer of this class
int fieldWidth
how much space should be used for the output of the variable
void run()
the plotting loop
proclist_t _procs
list of value like processors that should be reported on
things written only at end of run H5Dump ProcessorSummary size
virtual ~RatePlotter()
destructor
std::string name
the name of the processor
std::string _timeformat
string to tell how to format the time output
static void add(Level level, const std::string &line)
add a string to the log
bool _showTime
flag to tell whether to display the time when the output was written
fromStdString(const std::string &str)
bool _showNSkippedEvents
flag to tell whether to report on how many events have been processed
beginReadArray(const QString &prefix)
Ratemeter & _inputload
reference to the input Ratemeter
static shared_pointer instance()
return the already created instance of this
file contains declaration of class to plot the rate calculated by ratemeters
int _interval
the interval in which the rate is plottet in s
int precision
how much digits after the decimal point should be used
contains the manager for the processors
double calculateRate()
retrieve the rate
Exception thrown when accessing invalid processor.
std::string unit
the unit that should be displayed after the value
value(const QString &key, const QVariant &defaultValue=QVariant()
wait(unsigned long time=ULONG_MAX)
Ratemeter & _inputrate
reference to the input Ratemeter
define the processor properties
file contains specialized class that do the settings for cass
static shared_pointer::element_type & reference()
return a reference to this instance
bool _showProgress
flag to tell whether the how much is processed ratio should be reported
Exception thrown when accessing invalid histogram.
bool _showInputLoad
flag to tell whether the input load should be reported
bool _showInputRate
flag to tell whether the input rate should be reported
contains a logger for cass
beginGroup(const QString &prefix)
bool _showInfo
flag to tell whether to show the info at all