![]() |
GWOLLUM 4.2.0
Tools for gravitational-wave analyses
|
Monitor a GWOLLUM processing. More...
#include <Monitor.h>


Public Member Functions | |
| string | GetProcessDate (void) |
| Returns the current process date (UTC) as a formatted string. | |
| unsigned int | GetProcessingTime (void) |
| Returns the current processing duration [s]. | |
| string | GetProcessingTimeString (void) |
| Returns the current processing duration as a string. | |
| bool | GetStatus (void) |
| Returns the object status. | |
| unsigned int | GetVerbosityLevel (void) |
| Returns the verbosity level. | |
| void | SetMessageType (const MonitorMessageType aMessageType) |
| Sets the message type. | |
| void | SetStatus (const bool aNewStatus) |
| Sets a new object status. | |
| void | SetVerbosityLevel (const unsigned int aVerbosity) |
| Sets the verbosity level. | |
| void | UpdateStatus (const bool aStatus) |
| Updates the object status. | |
Constructors and destructors | |
| Monitor (const string aProcessName) | |
| Constructor of the Monitor class. | |
| virtual | ~Monitor (void) |
| Destructor of the Monitor class. | |
Private Member Functions | |
| void | MakeMessage (char aChar) |
| Builds the message one character at a time. | |
| int | overflow (int aChar) override |
| Overrides the std::basic_streambuf::overflow() function. | |
| void | PrintMessage (void) |
| Prints the current message. | |
Private Attributes | |
| string | message |
| Message. | |
| MonitorMessageType | message_type |
| Message type. | |
| string | procname |
| Process name. | |
| struct tm * | ptm |
| GMT time. | |
| bool | status |
| Object status. | |
| time_t | timer |
| Timer. | |
| time_t | timer_start |
| Timer start. | |
| unsigned int | verbosity |
| Verbosity level. | |
Monitor a GWOLLUM processing.
This class is designed to monitor a GWOLLUM processing. It manages:
The verbosity level must be set with SetVerbosityLevel(). It defines the quantity of information printed in the standard C error output stream stdout. Before printing a message, the message type must be defined with SetMessageType(). Then use the << operator to output the message.
Similarly error message are printed in the standard C error output stream stderr.
| Monitor::Monitor | ( | const string | aProcessName | ) |
Constructor of the Monitor class.
| [in] | aProcessName | Process name. |
|
virtual |
Destructor of the Monitor class.
| string Monitor::GetProcessDate | ( | void | ) |
Returns the current process date (UTC) as a formatted string.
Formatted string: "YYYY-MM-DD, hh:mm:ss UTC"
|
inline |
Returns the current processing duration [s].
| string Monitor::GetProcessingTimeString | ( | void | ) |
Returns the current processing duration as a string.
|
inline |
Returns the object status.
|
inline |
Returns the verbosity level.
|
private |
Builds the message one character at a time.
The message is printed (PrintMessage()) when a new line is detected.
| [in] | aChar | Character. |
|
overrideprivate |
Overrides the std::basic_streambuf::overflow() function.
| [in] | aChar | Character. |
|
private |
Prints the current message.
Error/Fatal/Warning messages are always printed in the standard C error output stream stderr. Nominal messages are printed in the standard C error output stream stdout depending on the verbosity level.
|
inline |
Sets the message type.
| [in] | aMessageType | Message type. |
|
inline |
Sets a new object status.
| [in] | aNewStatus | New object status. |
|
inline |
Sets the verbosity level.
Verbosity levels:
| [in] | aVerbosity | Verbosity level. |
|
inline |
Updates the object status.
| [in] | aStatus | Status update. |
|
private |
Message.
|
private |
Message type.
|
private |
Process name.
|
private |
GMT time.
|
private |
Object status.
|
private |
Timer.
|
private |
Timer start.
|
private |
Verbosity level.