2 #include "GaudiKernel/MsgStream.h"
3 #include "GaudiKernel/StatusCode.h"
13 std::transform(s.begin(), s.end(), s.begin(),
46 std::vector<std::string>::const_iterator itr;
86 if (
m_dat.size() > 0) {
116 (lib.compare(lib.length()-7, 7,
"Dict.so") == 0 ||
117 lib.compare(lib.length()-8, 8,
"Cling.so") == 0)) {
121 if (fnc ==
"_PyObject_GC_Malloc")
return;
123 if (fnc ==
"PyThread_get_thread_ident")
return;
124 if (fnc ==
"local")
return;
127 const string rlib = lib.substr(lib.rfind(
"/") + 1);
137 log <<
MSG::FATAL <<
"Unchecked StatusCode in " << fnc <<
" from lib "
142 string key = fnc + lib;
144 map<string,StatCodeDat>::iterator itr =
m_dat.find(key);
146 if (itr !=
m_dat.end()) {
147 itr->second.count += 1;
150 const string rlib = lib.substr(lib.rfind(
"/") + 1);
170 map<string,StatCodeDat>::const_iterator itr;
172 #if defined (__GNUC__) && ( __GNUC__ <= 2 )
175 std::ostringstream os;
178 os <<
"Num | Function | Source Library" << endl;
179 os <<
"----+--------------------------------+-------------------"
180 <<
"-----------------------" << endl;
183 for(itr =
m_dat.begin(); itr !=
m_dat.end(); ++itr ) {
187 os.setf(ios_base::right,ios_base::adjustfield);
192 os.setf(ios_base::left,ios_base::adjustfield);
196 os.setf(ios_base::left,ios_base::adjustfield);
204 log << os.str() <<
endmsg;
213 std::map<std::string, StatCodeDat>::iterator itr;
214 for (itr =
m_dat.begin(); itr !=
m_dat.end(); ++itr ) {
215 if (itr->second.fnc == str) {
228 std::map<std::string, StatCodeDat>::iterator itr;
229 for (itr =
m_dat.begin(); itr !=
m_dat.end(); ++itr ) {
230 if (itr->second.lib == str) {
245 string::size_type loc = str.find(
"=");
246 if (loc == std::string::npos) {
251 key = str.substr(0,loc);
252 val = str.substr(loc+1,str.length()-loc-1);
256 if (key ==
"FCN" || key ==
"FNC") {
259 }
else if (key ==
"LIB") {
267 log <<
MSG::WARNING <<
"ignoring unknown token in Filter: " << str
Definition of the MsgStream class used to transmit messages.
virtual void regFnc(const std::string &func, const std::string &lib)
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Gaudi::StateMachine::State m_state
Service state.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
bool isSuccess() const
Test for a status code of SUCCESS.
virtual void list() const
std::map< std::string, StatCodeDat > m_dat
BooleanProperty m_suppress
void parseFilter(const std::string &str, std::string &fnc, std::string &lib)
#define DECLARE_COMPONENT(type)
This class is used for returning status codes from appropriate routines.
virtual StatusCode finalize()
Finalize (from INITIALIZED to CONFIGURED).
std::set< std::string > m_filterfnc
const TYPE & value() const
explicit conversion
virtual const std::string & name() const
Retrieve name of the service.
StringArrayProperty m_pFilter
virtual StatusCode initialize()
Initialization (from CONFIGURED to INITIALIZED).
virtual StatusCode initialize()
Initialization (from CONFIGURED to INITIALIZED).
virtual StatusCode reinitialize()
Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED).
StatusCodeSvc(const std::string &name, ISvcLocator *svc)
void filterLib(const std::string &)
Templated class to add the standard messaging functionalities.
Property * declareProperty(const std::string &name, T &property, const std::string &doc="none") const
Declare the named property.
void toupper(std::string &s)
void filterFnc(const std::string &)
MSG::Level msgLevel() const
get the output level from the embedded MsgStream
std::set< std::string > m_filterlib