Gaudi Framework, version v25r1p1

Home   Generated: Mon Mar 24 2014
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
StatusCode.cpp
Go to the documentation of this file.
1 #define GAUDIKERNEL_STATUSCODE_CPP 1
2 
4 #include "GaudiKernel/System.h"
11 #include <fstream>
12 #include <iostream>
13 #include <sstream>
14 #include <stdlib.h>
15 #include <exception>
16 
17 bool StatusCode::s_checking(false);
18 
20  s_checking = true;
21 }
22 
24  s_checking = false;
25 }
26 
28  static IssueSeverity dummy;
29  if (m_severity) return *m_severity;
30  else return dummy;
31 }
32 
34  if(UNLIKELY(s_checking)) {
35 
36  if (!m_checked && !GaudiException::s_proc && !std::uncaught_exception() ) {
37 
39 
40  SmartIF<IStatusCodeSvc> scs(Gaudi::svcLocator()->service("StatusCodeSvc"));
41 
42  const size_t depth = 21;
43  void* addresses[depth];
44 
45  std::string lib, fnc;
46  void* addr = 0;
48  if (System::backTrace(addresses, depth)) {
49 
50  if (System::getStackLevel(addresses[2], addr, fnc, lib)) {
51 
52  if (scs) {
53  scs->regFnc(fnc,lib);
54  } else {
55  if (msg) {
56  MsgStream log(msg,"StatusCode");
57  log << MSG::WARNING << "Unchecked in " << fnc << " " << lib << endmsg;
58  } else {
59  std::cout << MSG::WARNING << "Unchecked in " << fnc << " " << lib << std::endl;
60  }
61  }
62 
63  }
64 
65  }
66  }
67  }
68 }
69 

Generated at Mon Mar 24 2014 18:33:11 for Gaudi Framework, version v25r1p1 by Doxygen version 1.8.2 written by Dimitri van Heesch, © 1997-2004