|
DUNE-DAQ
DUNE Trigger and Data Acquisition software
|
This class manages and provides access to ERS streams. More...
#include <StreamManager.hpp>
Public Member Functions | |
| ~StreamManager () | |
| void | debug (const Issue &issue, int level) |
| sends an Issue to the debug stream | |
| void | error (const Issue &issue) |
| sends an issue to the error stream | |
| void | fatal (const Issue &issue) |
| sends an issue to the fatal stream | |
| void | information (const Issue &issue) |
| sends an issue to the information stream | |
| void | log (const Issue &issue) |
| sends an issue to the log stream | |
| void | warning (const Issue &issue) |
| sends an issue to the warning stream | |
| void | add_receiver (const std::string &stream, const std::string &filter, ers::IssueReceiver *receiver) |
| void | add_receiver (const std::string &stream, const std::initializer_list< std::string > ¶ms, ers::IssueReceiver *receiver) |
| void | remove_receiver (ers::IssueReceiver *receiver) |
| void | add_output_stream (ers::severity severityseverity, ers::OutputStream *new_stream) |
| void | report_issue (ers::severity type, const Issue &issue) |
Static Public Member Functions | |
| static StreamManager & | instance () |
| return the singleton | |
Private Member Functions | |
| StreamManager () | |
| OutputStream * | setup_stream (ers::severity severityseverity) |
| OutputStream * | setup_stream (const std::vector< std::string > &streams) |
Private Attributes | |
| PluginManager | m_plugin_manager |
| std::mutex | m_mutex |
| std::list< std::shared_ptr< InputStream > > | m_in_streams |
| std::shared_ptr< OutputStream > | m_init_streams [ers::Fatal+1] |
| array of pointers to streams per severity | |
| std::shared_ptr< OutputStream > | m_out_streams [ers::Fatal+1] |
| array of pointers to streams per severity | |
Friends | |
| class | StreamInitializer |
| class | ers::LocalStream |
| class | ers::ErrorHandler |
| template<class> | |
| class | SingletonCreator |
This class manages and provides access to ERS streams.
The StreamManager class is responsible for creating and handling all the ERS streams used by an application. It implements the singleton pattern and handles a table of the different stream attached to each severity. When issues occur they are dispatched to an appropriate stream by the singleton instance of this class. Users should not use this class directly. In order to report issues users should use global functions declared in the ers namespace.
Definition at line 69 of file StreamManager.hpp.
| ers::StreamManager::~StreamManager | ( | ) |
|
private |
Private constructor - can not be called by user code, use the instance() method instead
Definition at line 174 of file StreamManager.cpp.
| void ers::StreamManager::add_output_stream | ( | ers::severity | severity, |
| ers::OutputStream * | new_stream ) |
Definition at line 189 of file StreamManager.cpp.
| void ers::StreamManager::add_receiver | ( | const std::string & | stream, |
| const std::initializer_list< std::string > & | params, | ||
| ers::IssueReceiver * | receiver ) |
Definition at line 220 of file StreamManager.cpp.
| void ers::StreamManager::add_receiver | ( | const std::string & | stream, |
| const std::string & | filter, | ||
| ers::IssueReceiver * | receiver ) |
Definition at line 208 of file StreamManager.cpp.
| void ers::StreamManager::debug | ( | const Issue & | issue, |
| int | level ) |
sends an Issue to the debug stream
Sends an issue to the debug stream
| issue | the Issue to send |
| level | the debug level. |
Definition at line 337 of file StreamManager.cpp.
| void ers::StreamManager::error | ( | const Issue & | issue | ) |
sends an issue to the error stream
Sends an Issue to the error stream
| issue |
Definition at line 327 of file StreamManager.cpp.
| void ers::StreamManager::fatal | ( | const Issue & | issue | ) |
sends an issue to the fatal stream
Sends an Issue to the fatal error stream
| issue |
Definition at line 351 of file StreamManager.cpp.
| void ers::StreamManager::information | ( | const Issue & | issue | ) |
sends an issue to the information stream
Sends an issue to the info stream
| issue | the Issue to send |
Definition at line 369 of file StreamManager.cpp.
|
static |
return the singleton
This method returns the singleton instance. It should be used for every operation on the factory.
Singleton instance
Definition at line 162 of file StreamManager.cpp.
| void ers::StreamManager::log | ( | const Issue & | issue | ) |
sends an issue to the log stream
Sends an issue to the log stream
| issue | the Issue to send |
Definition at line 378 of file StreamManager.cpp.
| void ers::StreamManager::remove_receiver | ( | ers::IssueReceiver * | receiver | ) |
Definition at line 232 of file StreamManager.cpp.
| void ers::StreamManager::report_issue | ( | ers::severity | type, |
| const Issue & | issue ) |
Sends an Issue to an appropriate stream
| type | |
| issue |
Definition at line 316 of file StreamManager.cpp.
|
private |
Definition at line 280 of file StreamManager.cpp.
|
private |
Definition at line 246 of file StreamManager.cpp.
| void ers::StreamManager::warning | ( | const Issue & | issue | ) |
sends an issue to the warning stream
Sends an Issue to the warning stream
| issue | the issue to send |
Definition at line 360 of file StreamManager.cpp.
|
friend |
Definition at line 73 of file StreamManager.hpp.
|
friend |
Definition at line 72 of file StreamManager.hpp.
|
friend |
Definition at line 74 of file StreamManager.hpp.
|
friend |
Definition at line 71 of file StreamManager.hpp.
|
private |
Definition at line 116 of file StreamManager.hpp.
|
private |
array of pointers to streams per severity
Definition at line 117 of file StreamManager.hpp.
|
private |
Definition at line 115 of file StreamManager.hpp.
|
private |
array of pointers to streams per severity
Definition at line 118 of file StreamManager.hpp.
|
private |
Definition at line 114 of file StreamManager.hpp.