20 info() <<
"initialize" <<
endmsg;
22 for (
const auto& itr : m_pFilter.value() ) {
26 parseFilter( itr, fnc, lib );
30 m_filterfnc.insert( fnc );
35 m_filterlib.insert( lib );
47 info() <<
"reinitialize" <<
endmsg;
56 if ( !m_dat.empty() ) {
58 info() <<
"listing all unchecked return codes:" <<
endmsg;
64 if ( msgLevel(
MSG::DEBUG ) ) debug() <<
"all StatusCode instances where checked" <<
endmsg;
89 if ( fnc ==
"_PyObject_GC_Malloc" )
return;
91 if ( fnc ==
"PyThread_get_thread_ident" )
return;
92 if ( fnc ==
"local" )
return;
95 const string rlib = lib.
substr( lib.
rfind(
"/" ) + 1 );
97 if ( m_filterfnc.find( fnc ) != m_filterfnc.end() || m_filterlib.find( rlib ) != m_filterlib.end() ) {
103 fatal() <<
"Unchecked StatusCode in " << fnc <<
" from lib " << lib <<
endmsg;
107 string key = fnc + lib;
109 auto itr = m_dat.
find( key );
111 if ( itr != m_dat.end() ) {
112 itr->second.count += 1;
115 const string rlib = lib.substr( lib.rfind(
"/" ) + 1 );
132 os <<
"Num | Function | Source Library" <<
endl;
133 os <<
"----+--------------------------------+-------------------" 134 <<
"-----------------------" <<
endl;
136 for (
const auto& itr : m_dat ) {
137 const auto& dat = itr.second;
140 os.
setf( ios_base::right, ios_base::adjustfield );
145 os.
setf( ios_base::left, ios_base::adjustfield );
149 os.
setf( ios_base::left, ios_base::adjustfield );
164 if ( itr !=
std::end( m_dat ) ) m_dat.erase( itr );
173 if ( itr !=
std::end( m_dat ) ) m_dat.erase( itr );
181 auto loc = str.
find(
"=" );
182 if ( loc == std::string::npos ) {
186 string key = str.
substr( 0, loc );
187 string val = str.
substr( loc + 1 );
191 if ( key ==
"FCN" || key ==
"FNC" ) {
194 }
else if ( key ==
"LIB" ) {
201 warning() <<
"ignoring unknown token in Filter: " << str <<
endmsg;
StatusCode initialize() override
StatusCode reinitialize() override
void parseFilter(const std::string &str, std::string &fnc, std::string &lib)
#define DECLARE_COMPONENT(type)
StatusCode initialize() override
This class is used for returning status codes from appropriate routines.
constexpr static const auto SUCCESS
void regFnc(const std::string &func, const std::string &lib) override
void filterLib(const std::string &)
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
void filterFnc(const std::string &)
void list() const override
StatusCode finalize() override