LSSTApplications
10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
home
lsstsw
stack
Linux64
ip_diffim
11.0+1
python
lsst
gdb
ip
diffim
printers.py
Go to the documentation of this file.
1
import
gdb
2
import
re, sys
3
4
try
:
5
import
gdb.printing
6
7
# example from meas_alg
8
class
CRPixelPrinter
(object):
9
"Print a CRPixel"
10
def
__init__
(self, val):
11
self.
val
= val
12
def
to_string
(self):
13
return
"{id=%d (%d, %d)}"
% (self.
val
[
"id"
], self.
val
[
"col"
], self.
val
[
"row"
])
14
15
printers = []
16
17
def
register
(obj):
18
"Register my pretty-printers with objfile Obj."
19
20
if
obj
is
None
:
21
obj = gdb
22
23
for
p
in
printers:
24
gdb.printing.register_pretty_printer(obj, p)
25
26
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
27
28
def
build_ip_diffim_dictionary
():
29
printer = gdb.printing.RegexpCollectionPrettyPrinter(
"ip_diffim"
)
30
31
# example from meas_alg
32
#printer.add_printer('lsst::meas::algorithms::CRPixel',
33
# '^lsst::meas::algorithms::CRPixel', CRPixelPrinter)
34
35
return
printer
36
37
printers.append(
build_ip_diffim_dictionary
())
38
39
except
ImportError:
40
def
register
(*args, **kwargs):
41
print
>> sys.stderr,
"Your version of gdb is too old to load the ip.diffim python pretty printers"
42
pass
43
44
pass
45
lsst.gdb.ip.diffim.printers.CRPixelPrinter.val
val
Definition:
printers.py:11
lsst.gdb.ip.diffim.printers.register
def register
Definition:
printers.py:17
lsst.gdb.ip.diffim.printers.CRPixelPrinter
Definition:
printers.py:8
lsst.gdb.ip.diffim.printers.CRPixelPrinter.__init__
def __init__
Definition:
printers.py:10
lsst.gdb.ip.diffim.printers.build_ip_diffim_dictionary
def build_ip_diffim_dictionary
Definition:
printers.py:28
lsst.gdb.ip.diffim.printers.CRPixelPrinter.to_string
def to_string
Definition:
printers.py:12
Generated on Thu Sep 24 2015 02:29:16 for LSSTApplications by
1.8.5