CFEL - ASG Software Suite  2.5.0
CASS
Classes | Public Types | Public Member Functions | Protected Member Functions | Private Types | Private Attributes | List of all members
cass::RatePlotter Class Reference

Plotting information about the ongoing processing. More...

#include <rate_plotter.h>

+ Inheritance diagram for cass::RatePlotter:
+ Collaboration diagram for cass::RatePlotter:

Classes

struct  ProcProperties
 define the processor properties More...
 

Public Types

typedef std::tr1::shared_ptr< RatePlottershared_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...
 
- Public Member Functions inherited from QThread
 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< ProcPropertiesproclist_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...
 

Detailed Description

Plotting information about the ongoing processing.

class that will plot various information about the ongoing process

User definable Parameters:

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 "".

Author
Lutz Foucar

Definition at line 76 of file rate_plotter.h.

Member Typedef Documentation

typedef std::list<ProcProperties> cass::RatePlotter::proclist_t
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.

Constructor & Destructor Documentation

RatePlotter::RatePlotter ( Ratemeter inputrate,
Ratemeter inputload,
Ratemeter analyzerate,
QObject parent = 0 
)
RatePlotter::~RatePlotter ( )
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().

Member Function Documentation

void RatePlotter::run ( )
protected

Member Data Documentation

Ratemeter& cass::RatePlotter::_analyzerate
private

reference to the workers (analysis) Ratemeter

Definition at line 117 of file rate_plotter.h.

Referenced by run().

std::string cass::RatePlotter::_filename
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().

Ratemeter& cass::RatePlotter::_inputload
private

reference to the input Ratemeter

Definition at line 114 of file rate_plotter.h.

Referenced by run().

Ratemeter& cass::RatePlotter::_inputrate
private

reference to the input Ratemeter

Definition at line 111 of file rate_plotter.h.

Referenced by run().

int cass::RatePlotter::_interval
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().

bool cass::RatePlotter::_newLine
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().

proclist_t cass::RatePlotter::_procs
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().

bool cass::RatePlotter::_showAnalysisRate
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().

bool cass::RatePlotter::_showInfo
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().

bool cass::RatePlotter::_showInputLoad
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().

bool cass::RatePlotter::_showInputRate
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().

bool cass::RatePlotter::_showNProcessedEvents
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().

bool cass::RatePlotter::_showNSkippedEvents
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().

bool cass::RatePlotter::_showProgress
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().

bool cass::RatePlotter::_showTime
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().

std::string cass::RatePlotter::_timeformat
private

string to tell how to format the time output

Definition at line 153 of file rate_plotter.h.

Referenced by RatePlotter(), and run().


The documentation for this class was generated from the following files: