EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
msg_buffer Class Reference

#include <online_distribution/blob/master/newbasic/msg_buffer.h>

+ Inheritance diagram for msg_buffer:
+ Collaboration diagram for msg_buffer:

Public Member Functions

 msg_buffer (const int msglen=256)
 
virtual ~msg_buffer ()
 
virtual int overflow (int ch)
 
virtual int sync ()
 

Protected Member Functions

virtual char * format (int *length, msgProfile *mp)
 

Protected Attributes

char * oBuffer
 
int pos
 
int maximum_position
 
msg_controlm
 

Detailed Description

This is the base class for the type of message buffers which we want to use for messaging. It can easily be subclassed.

This base class defines the "static" behavior of all the msg_buffer classes derived from it. It provides the parsing routine which decodes the profile tags, provides a "add_date" routine to conveniently prepend a date tag to each message if so desired, and deals with the msg_control objects in the system which it is a friend of. If created, the msg_buffer object tells all msg_control object to go active and produce the profiling information; otherwise they maintain silence.

This class is meant to be subclassed, and the dispatch mechanism which you want has to be provided by the subclass.

Definition at line 67 of file msg_buffer.h.

View newest version in sPHENIX GitHub at line 67 of file msg_buffer.h

Constructor & Destructor Documentation

msg_buffer::msg_buffer ( const int  msglen = 256)

Definition at line 8 of file msg_buffer.cc.

View newest version in sPHENIX GitHub at line 8 of file msg_buffer.cc

References msg_control::activate(), m, maximum_position, and pos.

+ Here is the call graph for this function:

msg_buffer::~msg_buffer ( )
virtual

Definition at line 25 of file msg_buffer.cc.

View newest version in sPHENIX GitHub at line 25 of file msg_buffer.cc

References msg_control::deactivate(), m, and oBuffer.

+ Here is the call graph for this function:

Member Function Documentation

char * msg_buffer::format ( int *  length,
msgProfile mp 
)
protectedvirtual

Definition at line 66 of file msg_buffer.cc.

View newest version in sPHENIX GitHub at line 66 of file msg_buffer.cc

References c, G4BARRELHCAL::length, MSG_SEV_DEFAULT, MSG_SOURCE_DEFAULT, MSG_TYPE_DEFAULT, n, oBuffer, pos, msgProfile::reserved1, msgProfile::reserved2, msgProfile::reserved3, Acts::UnitConstants::s, msgProfile::severity, msgProfile::source, msgProfile::sourcecomponent, strnstr(), and msgProfile::type.

Referenced by pydump(), date_filter_msg_buffer::sync(), and filter_msg_buffer::sync().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int msg_buffer::overflow ( int  ch)
virtual

Definition at line 46 of file msg_buffer.cc.

View newest version in sPHENIX GitHub at line 46 of file msg_buffer.cc

References maximum_position, MSG_EXTENSION_AMOUNT, n, oBuffer, and pos.

int msg_buffer::sync ( )
virtual

Reimplemented in remote_msg_buffer, filter_msg_buffer, and date_filter_msg_buffer.

Definition at line 37 of file msg_buffer.cc.

View newest version in sPHENIX GitHub at line 37 of file msg_buffer.cc

References pos.

Member Data Documentation

msg_control* msg_buffer::m
protected

Definition at line 74 of file msg_buffer.h.

View newest version in sPHENIX GitHub at line 74 of file msg_buffer.h

Referenced by msg_buffer(), and ~msg_buffer().

int msg_buffer::maximum_position
protected

Definition at line 73 of file msg_buffer.h.

View newest version in sPHENIX GitHub at line 73 of file msg_buffer.h

Referenced by msg_buffer(), and overflow().

char* msg_buffer::oBuffer
protected

Definition at line 71 of file msg_buffer.h.

View newest version in sPHENIX GitHub at line 71 of file msg_buffer.h

Referenced by format(), overflow(), and ~msg_buffer().

int msg_buffer::pos
protected

Definition at line 72 of file msg_buffer.h.

View newest version in sPHENIX GitHub at line 72 of file msg_buffer.h

Referenced by format(), msg_buffer(), overflow(), date_filter_msg_buffer::sync(), filter_msg_buffer::sync(), and sync().


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