2 #include "GaudiKernel/MsgStream.h"
3 #include "GaudiKernel/StatusCode.h"
13 std::transform(s.begin(), s.end(), s.begin(),
22 declareProperty(
"AbortOnError",
m_abort=
false);
23 declareProperty(
"SuppressCheck",
m_suppress=
false);
24 declareProperty(
"IgnoreDicts",
m_dict=
true);
109 (lib.compare(lib.length()-7, 7,
"Dict.so") == 0 ||
110 lib.compare(lib.length()-8, 8,
"Cling.so") == 0)) {
114 if (fnc ==
"_PyObject_GC_Malloc")
return;
116 if (fnc ==
"PyThread_get_thread_ident")
return;
117 if (fnc ==
"local")
return;
120 const string rlib = lib.substr(lib.rfind(
"/") + 1);
130 log <<
MSG::FATAL <<
"Unchecked StatusCode in " << fnc <<
" from lib "
135 string key = fnc + lib;
137 auto itr =
m_dat.find(key);
139 if (itr !=
m_dat.end()) {
140 itr->second.count += 1;
143 const string rlib = lib.substr(lib.rfind(
"/") + 1);
164 std::ostringstream os;
165 os <<
"Num | Function | Source Library" << endl;
166 os <<
"----+--------------------------------+-------------------"
167 <<
"-----------------------" << endl;
170 for(
const auto& itr :
m_dat) {
171 const auto& dat = itr.second;
174 os.setf(ios_base::right,ios_base::adjustfield);
179 os.setf(ios_base::left,ios_base::adjustfield);
183 os.setf(ios_base::left,ios_base::adjustfield);
191 log << os.str() <<
endmsg;
200 auto itr = std::find_if(
m_dat.begin(),
m_dat.end(),
201 [&](
const std::pair<std::string,StatCodeDat>& d) {
202 return d.second.fnc == str;
212 auto itr = std::find_if(
m_dat.begin(),
m_dat.end(),
213 [&](
const std::pair<std::string,StatCodeDat>& d) {
214 return d.second.lib == str;
225 auto loc = str.find(
"=");
226 if (loc == std::string::npos) {
230 string key = str.substr(0,loc);
231 string val = str.substr(loc+1);
235 if (key ==
"FCN" || key ==
"FNC") {
238 }
else if (key ==
"LIB") {
246 log <<
MSG::WARNING <<
"ignoring unknown token in Filter: " << str
Definition of the MsgStream class used to transmit messages.
StatusCode initialize() override
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
StatusCode reinitialize() override
bool isSuccess() const
Test for a status code of SUCCESS.
void list() const override
std::map< std::string, StatCodeDat > m_dat
BooleanProperty m_suppress
void parseFilter(const std::string &str, std::string &fnc, std::string &lib)
StatusCode initialize() override
auto end(reverse_wrapper< T > &w)
This class is used for returning status codes from appropriate routines.
#define DECLARE_COMPONENT(type)
std::set< std::string > m_filterfnc
const TYPE & value() const
explicit conversion
void regFnc(const std::string &func, const std::string &lib) override
StringArrayProperty m_pFilter
Base class used to extend a class implementing other interfaces.
StatusCodeSvc(const std::string &name, ISvcLocator *svc)
void filterLib(const std::string &)
void toupper(std::string &s)
void filterFnc(const std::string &)
StatusCode finalize() override
std::set< std::string > m_filterlib