Analysis Software
Documentation for sPHENIX simulation software
|
#include <online_distribution/blob/master/newbasic/filter_msg_buffer.h>
Public Member Functions | |
filter_msg_buffer (const int msglen=256) | |
filter_msg_buffer (const int type_max, const int source_max, const int sev_max, const int msglen=256) | |
virtual | ~filter_msg_buffer () |
the virtual destructor | |
virtual int | sync () |
the sync function overrides the streambuf's sync function | |
virtual int | set (const int msg_type, const int msg_source, const int msg_severity, const int value=OFF) |
virtual int | set_severity_below_threshold (const int threshold, const int value=OFF) |
Globally set all messages below a certain severity threshold to ON or OFF. | |
virtual int | set_type (const int type, const int value=OFF) |
Globally switch ON or OFF all messages of a certain type. | |
virtual int | set_source (const int source, const int value=OFF) |
Globally switch ON or OFF all messages from a certain source. | |
virtual int | all_off () |
Globally switch all messages off. | |
virtual int | all_on () |
Globally switch all messages on. | |
Public Member Functions inherited from msg_buffer | |
msg_buffer (const int msglen=256) | |
virtual | ~msg_buffer () |
virtual int | overflow (int ch) |
Protected Attributes | |
STREAMBUF * | original_streambuf |
int *** | state |
int | msg_type_max |
int | msg_source_max |
int | msg_sev_max |
Protected Attributes inherited from msg_buffer | |
char * | oBuffer |
int | pos |
int | maximum_position |
msg_control * | m |
Additional Inherited Members | |
Protected Member Functions inherited from msg_buffer | |
virtual char * | format (int *length, msgProfile *mp) |
This is the "filter" msg\_buffer class which allows you to filter
messages based on their profile. Its default behavior is to let all messages pass. You can use the member functions to tailor the kind of messages filtered and passed on.
Definition at line 17 of file filter_msg_buffer.h.
View newest version in sPHENIX GitHub at line 17 of file filter_msg_buffer.h
filter_msg_buffer::filter_msg_buffer | ( | const int | msglen = 256 | ) |
The msglen parameter specifies the initial length of the message string which is kept internally. If you exceed the length, it is automautically extended.
Definition at line 7 of file filter_msg_buffer.cc.
View newest version in sPHENIX GitHub at line 7 of file filter_msg_buffer.cc
References COUT, i, j, k, msg_sev_max, MSG_SEV_MAX, MSG_SOURCE_MAX, msg_source_max, MSG_TYPE_MAX, msg_type_max, ON, original_streambuf, state, and STREAMBUF.
filter_msg_buffer::filter_msg_buffer | ( | const int | type_max, |
const int | source_max, | ||
const int | sev_max, | ||
const int | msglen = 256 |
||
) |
This constructor defines a custom-sized matrix of type/source/severities.
Definition at line 39 of file filter_msg_buffer.cc.
View newest version in sPHENIX GitHub at line 39 of file filter_msg_buffer.cc
References COUT, i, j, k, msg_sev_max, msg_source_max, msg_type_max, ON, original_streambuf, state, and STREAMBUF.
|
virtual |
the virtual destructor
Definition at line 74 of file filter_msg_buffer.cc.
View newest version in sPHENIX GitHub at line 74 of file filter_msg_buffer.cc
References COUT, i, j, msg_source_max, msg_type_max, original_streambuf, and state.
|
virtual |
Globally switch all messages off.
Definition at line 180 of file filter_msg_buffer.cc.
View newest version in sPHENIX GitHub at line 180 of file filter_msg_buffer.cc
References i, j, k, msg_sev_max, msg_source_max, msg_type_max, OFF, and state.
|
virtual |
Globally switch all messages on.
Definition at line 190 of file filter_msg_buffer.cc.
View newest version in sPHENIX GitHub at line 190 of file filter_msg_buffer.cc
References i, j, k, msg_sev_max, msg_source_max, msg_type_max, ON, and state.
|
virtual |
the set function defines (ON or OFF) which messages are passed and which ones are filtered. This gives very fine-grained control. There are other functions which give you more global control.
Definition at line 124 of file filter_msg_buffer.cc.
View newest version in sPHENIX GitHub at line 124 of file filter_msg_buffer.cc
References msg_sev_max, msg_source_max, msg_type_max, parse_cmake_options::source, state, parse_cmake_options::type, and value.
|
virtual |
Globally set all messages below a certain severity threshold to ON or OFF.
Definition at line 140 of file filter_msg_buffer.cc.
View newest version in sPHENIX GitHub at line 140 of file filter_msg_buffer.cc
References i, j, k, msg_sev_max, msg_source_max, msg_type_max, and state.
|
virtual |
Globally switch ON or OFF all messages from a certain source.
Definition at line 167 of file filter_msg_buffer.cc.
View newest version in sPHENIX GitHub at line 167 of file filter_msg_buffer.cc
References i, k, msg_sev_max, msg_type_max, and state.
|
virtual |
Globally switch ON or OFF all messages of a certain type.
Definition at line 155 of file filter_msg_buffer.cc.
View newest version in sPHENIX GitHub at line 155 of file filter_msg_buffer.cc
References j, k, msg_sev_max, msg_source_max, msg_type_max, and state.
|
virtual |
the sync function overrides the streambuf's sync function
Reimplemented from msg_buffer.
Reimplemented in date_filter_msg_buffer.
Definition at line 95 of file filter_msg_buffer.cc.
View newest version in sPHENIX GitHub at line 95 of file filter_msg_buffer.cc
References msg_buffer::format(), G4PLUGDOOR::length, original_streambuf, msg_buffer::pos, msgProfile::severity, msgProfile::source, state, msgProfile::type, and ambiguity_solver_full_chain::x.
|
protected |
Definition at line 25 of file filter_msg_buffer.h.
View newest version in sPHENIX GitHub at line 25 of file filter_msg_buffer.h
Referenced by all_off(), all_on(), filter_msg_buffer(), set(), set_severity_below_threshold(), set_source(), and set_type().
|
protected |
Definition at line 24 of file filter_msg_buffer.h.
View newest version in sPHENIX GitHub at line 24 of file filter_msg_buffer.h
Referenced by all_off(), all_on(), filter_msg_buffer(), set(), set_severity_below_threshold(), set_type(), and ~filter_msg_buffer().
|
protected |
Definition at line 23 of file filter_msg_buffer.h.
View newest version in sPHENIX GitHub at line 23 of file filter_msg_buffer.h
Referenced by all_off(), all_on(), filter_msg_buffer(), set(), set_severity_below_threshold(), set_source(), set_type(), and ~filter_msg_buffer().
|
protected |
Definition at line 21 of file filter_msg_buffer.h.
View newest version in sPHENIX GitHub at line 21 of file filter_msg_buffer.h
Referenced by filter_msg_buffer(), date_filter_msg_buffer::sync(), sync(), and ~filter_msg_buffer().
|
protected |
Definition at line 22 of file filter_msg_buffer.h.
View newest version in sPHENIX GitHub at line 22 of file filter_msg_buffer.h
Referenced by all_off(), all_on(), filter_msg_buffer(), set(), set_severity_below_threshold(), set_source(), set_type(), date_filter_msg_buffer::sync(), sync(), and ~filter_msg_buffer().