|
BOSS 8.0.0
BESIII Offline Software System
|
filtering stream More...
#include <FilterStream.h>
Public Member Functions | |
| FilterStream (Stream *target_ptr, const std::vector< std::string > &include_list, const std::vector< std::string > &exclude_list) | |
| ~FilterStream () | |
| destructor | |
| virtual bool | is_accept (const Issue *issue_ptr) |
| filter method | |
| virtual void | send (const Issue *issue_ptr) |
| send method | |
| virtual void | print_to (std::ostream &stream) const |
| FilterStream (Stream *target_ptr, const std::vector< std::string > &include_list, const std::vector< std::string > &exclude_list) | |
| ~FilterStream () | |
| destructor | |
| virtual bool | is_accept (const Issue *issue_ptr) |
| filter method | |
| virtual void | send (const Issue *issue_ptr) |
| send method | |
| virtual void | print_to (std::ostream &stream) const |
| FilterStream (Stream *target_ptr, const std::vector< std::string > &include_list, const std::vector< std::string > &exclude_list) | |
| ~FilterStream () | |
| destructor | |
| virtual bool | is_accept (const Issue *issue_ptr) |
| filter method | |
| virtual void | send (const Issue *issue_ptr) |
| send method | |
| virtual void | print_to (std::ostream &stream) const |
| Public Member Functions inherited from ers::Stream | |
| Stream () | |
| Stream (const Stream &other) | |
| operator std::string () const | |
| virtual | ~Stream () |
| virtual Issue * | receive () |
| Receives an issue from the stream. | |
| Stream () | |
| Stream (const Stream &other) | |
| operator std::string () const | |
| virtual | ~Stream () |
| virtual Issue * | receive () |
| Receives an issue from the stream. | |
| Stream () | |
| Stream (const Stream &other) | |
| operator std::string () const | |
| virtual | ~Stream () |
| virtual Issue * | receive () |
| Receives an issue from the stream. | |
Static Public Member Functions | |
| static FilterStream * | factory (const std::string &include_str, const ::std::string &exclude_str, const std::string &target_str) |
| factory method for partially parse information | |
| static FilterStream * | factory (const std::string ¶meters) |
| factory method for unparsed information | |
| static FilterStream * | factory (const std::string &include_str, const ::std::string &exclude_str, const std::string &target_str) |
| static FilterStream * | factory (const std::string ¶meters) |
| static FilterStream * | factory (const std::string &include_str, const ::std::string &exclude_str, const std::string &target_str) |
| static FilterStream * | factory (const std::string ¶meters) |
Static Public Attributes | |
| static const char *const | FILTER_STREAM_TAG = "filter" |
| tag used to identity this stream | |
| static const char *const | INCLUDE_TAG = "?" |
| tag used to mark the start of the include list | |
| static const char *const | EXCLUDE_TAG = "!" |
| tag used to mark the start of the exclude list | |
| static const char *const | TARGET_TAG = "@" |
| tag used to mark the target stream | |
| static const char *const | SEPARATORS = "," |
| separators between include and exclude qualifiers | |
| Static Public Attributes inherited from ers::Stream | |
| static const char *const | NULL_STREAM_KEY = "null" |
Protected Member Functions | |
| FilterStream () | |
| FilterStream (const FilterStream &other) | |
| FilterStream () | |
| FilterStream (const FilterStream &other) | |
| FilterStream () | |
| FilterStream (const FilterStream &other) | |
Protected Attributes | |
| Stream * | m_target_stream_ptr |
| chained target stream | |
| std::vector< std::string > | m_include |
| include list | |
| std::vector< std::string > | m_exclude |
| exclude list | |
filtering stream
This stream offers basic filtering capacities It basically hooks up in front of another stream and filters the data output. Filtering is based on two list and include list and and exclude list To be accepted an Issue needs two match two criteria
If the include list is empty, the second condition is not applied. This stream should only be used for severity levels where filtering makes sense, i.e warning, debugs, etc... The syntax to request a filter stream is the following:
filter:filter:?include_qualifier1,include_qualifier2!exclude_qualifier1,exclude_qualifier2@stream_identifier The stream_identifier can be any stream_key used by the ERS system (including a second filter).
For more information on associating a stream to a severity level, see the documentation on the StreamFactory class.
Definition at line 37 of file Event/ers/include/ers/FilterStream.h.
|
protected |
Disabled empty constructor
Definition at line 77 of file FilterStream.cxx.
Referenced by factory(), factory(), and FilterStream().
|
protected |
Disabled copy constructor
Definition at line 82 of file FilterStream.cxx.
| ers::FilterStream::FilterStream | ( | ers::Stream * | target_ptr, |
| const std::vector< std::string > & | include_list, | ||
| const std::vector< std::string > & | exclude_list ) |
Constructor
| target_ptr | pointer to the target stream, the target pointer is assumed to be allocated on the stack and owned by the current object, i.e it will be deleted upon destruction |
| include_list | collection of strings, at least one of these strings need to be present in the qualifiers in order for the Issue to be accepted. |
| exclude_list | collection of strings, no qualifier of the Issue must match those in this collection in order for the Issue to be accepted. |
Definition at line 94 of file FilterStream.cxx.
| ers::FilterStream::~FilterStream | ( | ) |
|
protected |
|
protected |
| ers::FilterStream::FilterStream | ( | Stream * | target_ptr, |
| const std::vector< std::string > & | include_list, | ||
| const std::vector< std::string > & | exclude_list ) |
| ers::FilterStream::~FilterStream | ( | ) |
destructor
|
protected |
|
protected |
| ers::FilterStream::FilterStream | ( | Stream * | target_ptr, |
| const std::vector< std::string > & | include_list, | ||
| const std::vector< std::string > & | exclude_list ) |
| ers::FilterStream::~FilterStream | ( | ) |
destructor
|
static |
factory method for partially parse information
Builds a stream out of a set of parameters
| include_str | string containing all the coma separated include qualifiers |
| exclude_str | string containing all the coma separated exclude qualifiers |
| target_str | string containing the key for the target stream, i.e the stream where accepted Issues are sent. |
Definition at line 45 of file FilterStream.cxx.
|
static |
|
static |
|
static |
factory method for unparsed information
Builds a stream out of a key string. This method parses the string and calls a more specialised version of the factory method.
| params | single string describing the requested filter stream |
Definition at line 61 of file FilterStream.cxx.
|
static |
|
static |
|
virtual |
filter method
Filtering method This method checks if an Issue is to be accepted or not.
| issue_ptr | the issue to check |
true if the Issue passes filtering, false otherwise. Definition at line 115 of file FilterStream.cxx.
Referenced by send().
|
virtual |
filter method
|
virtual |
filter method
|
virtual |
Prints stream description to stream
| stream | STL target stream |
Reimplemented from ers::Stream.
Definition at line 165 of file FilterStream.cxx.
|
virtual |
Reimplemented from ers::Stream.
|
virtual |
Reimplemented from ers::Stream.
|
virtual |
send method
Send method basically calls is_accept to check if the issue is accepted. If this is the case, the send method on the target is called with issue_ptr.
| issue_ptr | pointer to the issue to send. |
Reimplemented from ers::Stream.
Definition at line 147 of file FilterStream.cxx.
|
virtual |
send method
Reimplemented from ers::Stream.
|
virtual |
send method
Reimplemented from ers::Stream.
|
static |
tag used to mark the start of the exclude list
Definition at line 49 of file Event/ers/include/ers/FilterStream.h.
Referenced by factory(), FilterStream(), and print_to().
|
static |
tag used to identity this stream
Tag used to identify the stream
Definition at line 46 of file Event/ers/include/ers/FilterStream.h.
Referenced by FilterStream(), and print_to().
|
static |
tag used to mark the start of the include list
Definition at line 47 of file Event/ers/include/ers/FilterStream.h.
Referenced by factory(), FilterStream(), and print_to().
|
protected |
exclude list
Definition at line 41 of file Event/ers/include/ers/FilterStream.h.
Referenced by FilterStream(), is_accept(), and print_to().
|
protected |
include list
Definition at line 40 of file Event/ers/include/ers/FilterStream.h.
Referenced by FilterStream(), is_accept(), and print_to().
|
protected |
chained target stream
Definition at line 39 of file Event/ers/include/ers/FilterStream.h.
Referenced by FilterStream(), print_to(), send(), and ~FilterStream().
|
static |
separators between include and exclude qualifiers
Definition at line 52 of file Event/ers/include/ers/FilterStream.h.
Referenced by factory(), FilterStream(), and print_to().
|
static |
tag used to mark the target stream
Definition at line 51 of file Event/ers/include/ers/FilterStream.h.
Referenced by factory(), FilterStream(), and print_to().