Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
msg_control Class Reference

#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
 
OSTREAMoperator<< (OSTREAM &, msg_control &)
 

Detailed Description

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

Constructor & Destructor Documentation

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.

msg_control::~msg_control ( )
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.

Member Function Documentation

int msg_control::activate ( )
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().

+ Here is the caller graph for this function:

int msg_control::deactivate ( )
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().

+ Here is the caller graph for this function:

virtual int msg_control::get_severity ( ) const
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.

virtual int msg_control::get_source ( ) const
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.

virtual const char* msg_control::get_sourcecomponent ( )
inlinevirtual

Definition at line 65 of file msg_control.h.

View newest version in sPHENIX GitHub at line 65 of file msg_control.h

virtual void msg_control::reset_severity ( )
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.

void msg_control::set_severity ( const int  severity)
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().

+ Here is the caller graph for this function:

virtual void msg_control::set_source ( const int  source)
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().

+ Here is the caller graph for this function:

void msg_control::set_sourcecomponent ( const char *  msgsourcecomponent = "ONLINE")
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.

Friends And Related Function Documentation

friend class msg_buffer
friend

Definition at line 32 of file msg_control.h.

View newest version in sPHENIX GitHub at line 32 of file msg_control.h

OSTREAM& operator<< ( OSTREAM os,
msg_control mc 
)
friend

Definition at line 61 of file msg_control.cc.

View newest version in sPHENIX GitHub at line 61 of file msg_control.cc

Member Data Documentation

int msg_control::msg_severity
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().

int msg_control::msg_source
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().

char* msg_control::msg_sourcecomponent
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().

int msg_control::msg_type
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<<().

int msg_control::storedseverity
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().

int msg_control::xx_active =0
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<<().


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