Analysis Software
Documentation for sPHENIX simulation software
|
#include <online_distribution/blob/master/newbasic/msg_control.h>
Public Member Functions | |
msg_control (const int mtype=MSG_TYPE_DEFAULT, const int source=MSG_SOURCE_DEFAULT, const int severity=MSG_SEV_DEFAULT, const char *sourcecomponent="ONLINE") | |
virtual | ~msg_control () |
virtual void | set_severity (const int severity) |
virtual int | get_severity () const |
virtual void | reset_severity () |
virtual void | set_source (const int source) |
virtual int | get_source () const |
virtual void | set_sourcecomponent (const char *msgsourcecomponent="ONLINE") |
virtual const char * | get_sourcecomponent () |
Static Public Attributes | |
static int | xx_active =0 |
Protected Member Functions | |
int | activate () |
int | deactivate () |
Protected Attributes | |
int | msg_type |
int | msg_source |
int | msg_severity |
int | storedseverity |
char * | msg_sourcecomponent |
Friends | |
class | msg_buffer |
OSTREAM & | operator<< (OSTREAM &, msg_control &) |
Objects of the msg_control class maintain the profiling information for your messages. They add a few tokens to the output stream which can be parsed by the msg_buffer's routines, which so learns about the profile. Use it, for example, like this: {verbatim} msg_control *mvd_warning = new msg_control(MSG_TYPE_CODEDEBUG, MSG_SOURCE_MVD, MSG_SEV_WARNING); COUT << *mvd_info << " this is a info message from MVD" << endl; {verbatim}
The mvd_info's "<<" operator adds now the profiling information to the message, which is then parsed again and stripped off by our custom streambuf.
If we do not have a custom streambuf, the msg_control objects maintain silence. They have to be activated by one of our custom streambufs first.
: 2.0 ejd add string for component source of message
Definition at line 30 of file msg_control.h.
View newest version in sPHENIX GitHub at line 30 of file msg_control.h
msg_control::msg_control | ( | const int | mtype = MSG_TYPE_DEFAULT , |
const int | source = MSG_SOURCE_DEFAULT , |
||
const int | severity = MSG_SEV_DEFAULT , |
||
const char * | sourcecomponent = "ONLINE" |
||
) |
Definition at line 10 of file msg_control.cc.
View newest version in sPHENIX GitHub at line 10 of file msg_control.cc
References msg_severity, msg_source, msg_sourcecomponent, msg_type, parse_cmake_options::source, and storedseverity.
|
virtual |
Definition at line 23 of file msg_control.cc.
View newest version in sPHENIX GitHub at line 23 of file msg_control.cc
References msg_sourcecomponent.
|
protected |
Definition at line 28 of file msg_control.cc.
View newest version in sPHENIX GitHub at line 28 of file msg_control.cc
References xx_active.
Referenced by msg_buffer::msg_buffer().
|
protected |
Definition at line 36 of file msg_control.cc.
View newest version in sPHENIX GitHub at line 36 of file msg_control.cc
References xx_active.
Referenced by msg_buffer::~msg_buffer().
|
inlinevirtual |
Definition at line 59 of file msg_control.h.
View newest version in sPHENIX GitHub at line 59 of file msg_control.h
References msg_severity.
|
inlinevirtual |
Definition at line 63 of file msg_control.h.
View newest version in sPHENIX GitHub at line 63 of file msg_control.h
References msg_source.
|
inlinevirtual |
Definition at line 65 of file msg_control.h.
View newest version in sPHENIX GitHub at line 65 of file msg_control.h
|
inlinevirtual |
Definition at line 60 of file msg_control.h.
View newest version in sPHENIX GitHub at line 60 of file msg_control.h
References msg_severity, and storedseverity.
|
virtual |
Definition at line 55 of file msg_control.cc.
View newest version in sPHENIX GitHub at line 55 of file msg_control.cc
References msg_severity, and storedseverity.
Referenced by MessageSystem::send_message().
|
inlinevirtual |
Definition at line 62 of file msg_control.h.
View newest version in sPHENIX GitHub at line 62 of file msg_control.h
References msg_source, and parse_cmake_options::source.
Referenced by MessageSystem::send_message().
|
virtual |
Definition at line 44 of file msg_control.cc.
View newest version in sPHENIX GitHub at line 44 of file msg_control.cc
References msg_sourcecomponent.
|
friend |
Definition at line 32 of file msg_control.h.
View newest version in sPHENIX GitHub at line 32 of file msg_control.h
|
friend |
Definition at line 61 of file msg_control.cc.
View newest version in sPHENIX GitHub at line 61 of file msg_control.cc
|
protected |
Definition at line 40 of file msg_control.h.
View newest version in sPHENIX GitHub at line 40 of file msg_control.h
Referenced by get_severity(), msg_control(), operator<<(), reset_severity(), and set_severity().
|
protected |
Definition at line 39 of file msg_control.h.
View newest version in sPHENIX GitHub at line 39 of file msg_control.h
Referenced by get_source(), msg_control(), operator<<(), and set_source().
|
protected |
Definition at line 42 of file msg_control.h.
View newest version in sPHENIX GitHub at line 42 of file msg_control.h
Referenced by msg_control(), operator<<(), set_sourcecomponent(), and ~msg_control().
|
protected |
Definition at line 38 of file msg_control.h.
View newest version in sPHENIX GitHub at line 38 of file msg_control.h
Referenced by msg_control(), and operator<<().
|
protected |
Definition at line 41 of file msg_control.h.
View newest version in sPHENIX GitHub at line 41 of file msg_control.h
Referenced by msg_control(), reset_severity(), and set_severity().
|
static |
Definition at line 65 of file msg_control.h.
View newest version in sPHENIX GitHub at line 65 of file msg_control.h
Referenced by activate(), deactivate(), and operator<<().