LSSTApplications  16.0-1-gce273f5+15,16.0-1-gf77f410+8,16.0-10-g230e10e+8,16.0-10-g5a5abec+4,16.0-10-gc1446dd+8,16.0-11-g5cf5345,16.0-12-g1dc09ba+2,16.0-12-g726f8f3+6,16.0-13-g4c33ca5+8,16.0-13-g5f6c0b1+8,16.0-13-gd9b1b71+8,16.0-14-g71e547a+4,16.0-17-g0bdc215,16.0-17-g6a7bfb3b+8,16.0-18-g95848a16+2,16.0-2-g0febb12+12,16.0-2-g839ba83+46,16.0-2-g9d5294e+35,16.0-3-g404ea43+7,16.0-3-gbc759ec+6,16.0-3-gcfd6c53+33,16.0-4-g03cf288+24,16.0-4-g13a27c5+10,16.0-4-g2cc461c+3,16.0-4-g5f3a788+11,16.0-4-g8a0f11a+30,16.0-4-ga3eb747+1,16.0-43-gaa65a4573+4,16.0-5-g1991253+8,16.0-5-g865efd9+8,16.0-5-gb3f8a4b+40,16.0-5-gd0f1235+4,16.0-6-g316b399+8,16.0-6-gf0acd13+27,16.0-6-gf9cb114+9,16.0-7-ga8e1655+4,16.0-8-g23bbf3f+1,16.0-8-g4dec96c+21,16.0-8-gfd407c0,w.2018.39
LSSTDataManagementBasePackage
backtrace.cc
Go to the documentation of this file.
1 #include "pybind11/pybind11.h"
2 
3 #include "lsst/utils/Backtrace.h"
4 
5 namespace py = pybind11;
6 
7 namespace lsst {
8 namespace utils {
9 
10 PYBIND11_MODULE(backtrace, mod) {
11  Backtrace &backtrace = Backtrace::get();
12 
13  // Trick to tell the compiler backtrace is used and should not be
14  // optimized away, as well as convenient way to check if backtrace
15  // is enabled.
16  mod.def("isEnabled", [&backtrace]() -> bool { return backtrace.isEnabled(); });
17 }
18 
19 } // utils
20 } // lsst
PYBIND11_MODULE(backtrace, mod)
Definition: backtrace.cc:10
A base class for image defects.
Definition: cameraGeom.dox:3
Singleton, enables automatic backtraces on the following signals:
Definition: Backtrace.h:42
bool const isEnabled() const noexcept
Definition: Backtrace.h:56
static Backtrace & get() noexcept
Get a reference to the singleton.
Definition: Backtrace.h:51