CFEL - ASG Software Suite
2.5.0
CASS
|
Plotting information about the ongoing processing. More...
#include <rate_plotter.h>
Classes | |
struct | ProcProperties |
define the processor properties More... | |
Public Types | |
typedef std::tr1::shared_ptr< RatePlotter > | shared_pointer |
a shared pointer of this type More... | |
Public Member Functions | |
RatePlotter (Ratemeter &inputrate, Ratemeter &inputload, Ratemeter &analyzerate, QObject *parent=0) | |
constructor. More... | |
virtual | ~RatePlotter () |
destructor More... | |
![]() | |
QThread (QObject *parent=0) | |
currentThread () | |
HANDLE QThread::currentThreadId() | |
exec () | |
exit (int returnCode=0) | |
finished () | |
idealThreadCount () | |
isFinished () | |
isRunning () | |
msleep (unsigned long msecs) | |
priority () | |
quit () | |
run () | |
setPriority (Priority priority) | |
setStackSize (uint stackSize) | |
setTerminationEnabled (bool enabled=true) | |
sleep (unsigned long secs) | |
stackSize () | |
start (Priority priority=InheritPriority) | |
started () | |
terminate () | |
terminated () | |
usleep (unsigned long usecs) | |
wait (unsigned long time=ULONG_MAX) | |
yieldCurrentThread () | |
Protected Member Functions | |
void | run () |
the plotting loop More... | |
Private Types | |
typedef std::list< ProcProperties > | proclist_t |
define the processor list More... | |
Private Attributes | |
Ratemeter & | _inputrate |
reference to the input Ratemeter More... | |
Ratemeter & | _inputload |
reference to the input Ratemeter More... | |
Ratemeter & | _analyzerate |
reference to the workers (analysis) Ratemeter More... | |
bool | _showInfo |
flag to tell whether to show the info at all More... | |
int | _interval |
the interval in which the rate is plottet in s More... | |
std::string | _filename |
the filename to which the status will be written More... | |
bool | _showInputRate |
flag to tell whether the input rate should be reported More... | |
bool | _showInputLoad |
flag to tell whether the input load should be reported More... | |
bool | _showAnalysisRate |
flag to tell whether the analysis rate should be reported More... | |
bool | _showProgress |
flag to tell whether the how much is processed ratio should be reported More... | |
bool | _showNProcessedEvents |
flag to tell whether to report on how many events have been processed More... | |
bool | _showNSkippedEvents |
flag to tell whether to report on how many events have been processed More... | |
bool | _newLine |
flag to tell whether the updated info should be put into a new line More... | |
bool | _showTime |
flag to tell whether to display the time when the output was written More... | |
std::string | _timeformat |
string to tell how to format the time output More... | |
proclist_t | _procs |
list of value like processors that should be reported on More... | |
Plotting information about the ongoing processing.
class that will plot various information about the ongoing process
ProcessingStatistics/{ShowInfo}
If true, it will display the requested information. If false, no output is generated. Default is true.
ProcessingStatistics/{Output}
Filename to which the info will be written. If no parameter is given, output will be directed to cout.
ProcessingStatistics/{UpdateInterval}
The updating interval in s. Default is 1.
ProcessingStatistics/{ShowTime}
Show the current time before plotting any other information. Default is false.
ProcessingStatistics/{TimeFormatString}
The format string in which the time will be plotted. Default is "dd-MMM-yy_HH:mm:ss".
ProcessingStatistics/{ShowInputRate}
If true, it will show the input rate. Default is true.
ProcessingStatistics/{ShowInputLoad}
If true, it will show the input load. Default is true.
ProcessingStatistics/{ShowAnalysisRate}
If true, it will show the analysis rate. Default is true.
ProcessingStatistics/{ShowProgress}
If true, it will show the progress of the process. Default is true.
ProcessingStatistics/{ShowNbrProcessedEvents}
If true, it will show the number of events processed. Default is false.
ProcessingStatistics/{ShowNbrSkippedEvents}
If true, it will show the number of events skipped. Default is false.
ProcessingStatistics/{NewLine}
If true, it will show the input rate. Default is true.
ProcessingStatistics/ValueProcessors/{size}
the number of value like processors to be plotted.
ProcessingStatistics/ValueProcessors/%id%/{Name}
Name of the value like processor. If Unknown, then it won't be added to the list. Default is Unknown.
ProcessingStatistics/ValueProcessors/%id%/{FieldWidth}
Width of the value field. Used in setw(). Default is 10.
ProcessingStatistics/ValueProcessors/%id%/{Precision}
Precsion after the decimal point for floating. Used in setprecision(). Default is 7.
ProcessingStatistics/ValueProcessors/%id%/{Unit}
The unit to be displayed after the value. Default is "".
Definition at line 76 of file rate_plotter.h.
|
private |
define the processor list
Definition at line 172 of file rate_plotter.h.
typedef std::tr1::shared_ptr<RatePlotter> cass::RatePlotter::shared_pointer |
a shared pointer of this type
Definition at line 80 of file rate_plotter.h.
RatePlotter::RatePlotter | ( | Ratemeter & | inputrate, |
Ratemeter & | inputload, | ||
Ratemeter & | analyzerate, | ||
QObject * | parent = 0 |
||
) |
constructor.
inputrate | the ratemeter of the input thread |
inputload | ratemeter to measure the data load |
analyzerate | the ratemeter of the worker threads |
parent | the qt parent of this object |
Definition at line 31 of file rate_plotter.cpp.
References _filename, _interval, _newLine, _procs, _showAnalysisRate, _showInfo, _showInputLoad, _showInputRate, _showNProcessedEvents, _showNSkippedEvents, _showProgress, _showTime, _timeformat, cass::Log::add(), QSettings::beginGroup(), QSettings::beginReadArray(), cass::RatePlotter::ProcProperties::fieldWidth, cass::Log::INFO, cass::RatePlotter::ProcProperties::name, cass::RatePlotter::ProcProperties::precision, QSettings::setArrayIndex(), size, cass::RatePlotter::ProcProperties::unit, and QSettings::value().
|
virtual |
destructor
checks whether thread is still running in which case it will be terminated. Then waits until thread has finished.
Definition at line 90 of file rate_plotter.cpp.
References _filename, QThread::isRunning(), of, QThread::terminate(), and QThread::wait().
|
protected |
the plotting loop
sleep for interval time and then retrieve the rate from the ratemeters and plot it.
Definition at line 110 of file rate_plotter.cpp.
References _analyzerate, _filename, _inputload, _inputrate, _interval, _newLine, _procs, _showAnalysisRate, _showInfo, _showInputLoad, _showInputRate, _showNProcessedEvents, _showNSkippedEvents, _showProgress, _showTime, _timeformat, cass::Log::add(), cass::Ratemeter::calculateRate(), QDateTime::currentDateTime(), cass::Log::ERROR, QString::fromStdString(), cass::ProcessorManager::instance(), of, cass::InputBase::reference(), cass::ProcessorManager::reference(), size, and QThread::sleep().
|
private |
reference to the workers (analysis) Ratemeter
Definition at line 117 of file rate_plotter.h.
Referenced by run().
|
private |
the filename to which the status will be written
Definition at line 126 of file rate_plotter.h.
Referenced by RatePlotter(), run(), and ~RatePlotter().
|
private |
reference to the input Ratemeter
Definition at line 114 of file rate_plotter.h.
Referenced by run().
|
private |
reference to the input Ratemeter
Definition at line 111 of file rate_plotter.h.
Referenced by run().
|
private |
the interval in which the rate is plottet in s
Definition at line 123 of file rate_plotter.h.
Referenced by RatePlotter(), and run().
|
private |
flag to tell whether the updated info should be put into a new line
Definition at line 147 of file rate_plotter.h.
Referenced by RatePlotter(), and run().
|
private |
list of value like processors that should be reported on
Definition at line 175 of file rate_plotter.h.
Referenced by RatePlotter(), and run().
|
private |
flag to tell whether the analysis rate should be reported
Definition at line 135 of file rate_plotter.h.
Referenced by RatePlotter(), and run().
|
private |
flag to tell whether to show the info at all
Definition at line 120 of file rate_plotter.h.
Referenced by RatePlotter(), and run().
|
private |
flag to tell whether the input load should be reported
Definition at line 132 of file rate_plotter.h.
Referenced by RatePlotter(), and run().
|
private |
flag to tell whether the input rate should be reported
Definition at line 129 of file rate_plotter.h.
Referenced by RatePlotter(), and run().
|
private |
flag to tell whether to report on how many events have been processed
Definition at line 141 of file rate_plotter.h.
Referenced by RatePlotter(), and run().
|
private |
flag to tell whether to report on how many events have been processed
Definition at line 144 of file rate_plotter.h.
Referenced by RatePlotter(), and run().
|
private |
flag to tell whether the how much is processed ratio should be reported
Definition at line 138 of file rate_plotter.h.
Referenced by RatePlotter(), and run().
|
private |
flag to tell whether to display the time when the output was written
Definition at line 150 of file rate_plotter.h.
Referenced by RatePlotter(), and run().
|
private |
string to tell how to format the time output
Definition at line 153 of file rate_plotter.h.
Referenced by RatePlotter(), and run().