18 for (
const auto& itr :
m_pFilter.value() ) {
55 const auto len = lib.
length();
56 if ( len >= 3 && lib.
compare( len - 3, 3,
".so" ) == 0 ) {
57 if ( ( len >= 7 && ( lib.
compare( len - 7, 4,
"Dict" ) == 0 || lib.
compare( len - 7, 4,
"Core" ) == 0 ) ) ||
58 ( len >= 8 && lib.
compare( len - 8, 5,
"Cling" ) == 0 ) ) {
61 }
else if ( lib.
rfind(
"Dict.so" ) != std::string::npos || lib.
rfind(
"Cling.so" ) != std::string::npos ||
62 lib.
rfind(
"Core.so" ) != std::string::npos ) {
67 if ( fnc ==
"_PyObject_GC_Malloc" )
return;
69 if ( fnc ==
"PyThread_get_thread_ident" )
return;
70 if ( fnc ==
"local" )
return;
76 fatal() <<
"Unchecked StatusCode in " << fnc <<
" from lib " << lib <<
endmsg;
83 decltype(
m_dat )::const_iterator itr =
m_dat.find( key );
84 if ( itr !=
m_dat.end() ) {
85 ++( itr->second.count );
106 for (
const auto& itr : dat_sorted ) {
107 const auto& dat = itr.second;
114 os.
setf( std::ios_base::right, std::ios_base::adjustfield );
119 os.
setf( std::ios_base::left, std::ios_base::adjustfield );
123 os.
setf( std::ios_base::left, std::ios_base::adjustfield );
129 info() <<
"listing all unchecked return codes:" <<
endmsg;
131 <<
"Num | Function | Source Library" <<
std::endl 132 <<
"----+--------------------------------+------------------------------------------" <<
std::endl 143 auto loc = str.
find(
"=" );
144 if ( loc == std::string::npos ) {
153 if ( key ==
"FCN" || key ==
"FNC" ) {
156 }
else if ( key ==
"LIB" ) {
163 warning() <<
"ignoring unknown token in Filter: " << str <<
endmsg;
StatusCode initialize() override
Gaudi::StateMachine::State m_state
Service state.
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
Gaudi::Property< bool > m_dict
StatusCode reinitialize() override
constexpr static const auto SUCCESS
void list() const override
bool failsFilter(const std::string &fnc, const std::string &lib) const
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
#define DECLARE_COMPONENT(type)
StatusCode initialize() override
This class is used for returning status codes from appropriate routines.
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
MsgStream & msgStream() const
Return an uninitialized MsgStream.
std::set< std::string > m_filterfnc
void parseFilter(const std::string &str, std::string &fnc, std::string &lib) const
void regFnc(const std::string &func, const std::string &lib) override
tbb::concurrent_unordered_map< std::string, StatCodeDat > m_dat
Gaudi::Property< bool > m_abort
Gaudi::Property< std::vector< std::string > > m_pFilter
void toupper(std::string &s)
MsgStream & fatal() const
shortcut for the method msgStream(MSG::FATAL)
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
StatusCode finalize() override
std::set< std::string > m_filterlib