LSSTApplications  21.0.0+37efb4748c,21.0.0+d529cf1a41,21.0.0-1-g763706f+6421b4843a,21.0.0-1-ga51b5d4+6432c6fd8d,21.0.0-12-gb58d4cc3+949a467db4,21.0.0-2-g103fe59+aca4f75afe,21.0.0-2-g1367e85+181fee7d9e,21.0.0-2-g2909d54+37efb4748c,21.0.0-2-g35ce6d5+6421b4843a,21.0.0-2-g45278ab+d529cf1a41,21.0.0-2-g4bc9b9f+08d353aae0,21.0.0-2-g5242d73+181fee7d9e,21.0.0-2-g54e2caa+61c423f472,21.0.0-2-g5dd23de+8d1b0dada6,21.0.0-2-g66bcc37+6421b4843a,21.0.0-2-g7f82c8f+4ec738cb2a,21.0.0-2-g8dde007+ad96df9df1,21.0.0-2-g8f08a60+4fac22bdb7,21.0.0-2-g973f35b+6dae26221f,21.0.0-2-ga326454+4ec738cb2a,21.0.0-2-ga63a54e+d52114195a,21.0.0-2-ga885a99+c1363b8d99,21.0.0-2-gc738bc1+c663aa589a,21.0.0-2-gde069b7+44dbdb3492,21.0.0-2-ge17e5af+181fee7d9e,21.0.0-2-ge712728+5916d5b72f,21.0.0-2-gecfae73+727fd727a7,21.0.0-2-gfc62afb+181fee7d9e,21.0.0-3-g4c5b185+e92e89f28a,21.0.0-3-g5051ac2+d529cf1a41,21.0.0-3-gaa929c8+54eb6ec8b5,21.0.0-3-gd222c45+88b21af515,21.0.0-3-gf22bc3e+ca784bd997,21.0.0-4-g051ac7e+54eb6ec8b5,21.0.0-4-g42917e2+7988b1f7d3,21.0.0-6-g2b8c1f54+e7fb5877da,21.0.0-6-ge3f375325+ce03d725a7,21.0.0-9-g0393deb+2a5fe077cf,w.2020.50
LSSTDataManagementBasePackage
printers.py
Go to the documentation of this file.
1 
2 import gdb
3 import sys
4 
5 try:
6  import gdb.printing
7 
8  # example from meas_alg
10  "Print a CRPixel"
11 
12  def __init__(self, val):
13  self.val = val
14 
15  def to_string(self):
16  return "{id=%d (%d, %d)}" % (self.val["id"], self.val["col"], self.val["row"])
17 
18  printers = []
19 
20  def register(obj):
21  "Register my pretty-printers with objfile Obj."
22 
23  if obj is None:
24  obj = gdb
25 
26  for p in printers:
27  gdb.printing.register_pretty_printer(obj, p)
28 
30  printer = gdb.printing.RegexpCollectionPrettyPrinter("ip_diffim")
31 
32  # example from meas_alg
33  # printer.add_printer('lsst::meas::algorithms::CRPixel',
34  # '^lsst::meas::algorithms::CRPixel', CRPixelPrinter)
35 
36  return printer
37 
38  printers.append(build_ip_diffim_dictionary())
39 
40 except ImportError:
41  def register(*args, **kwargs):
42  print("Your version of gdb is too old to load the ip.diffim python pretty printers", file=sys.stderr)
43  pass
44 
45  pass
lsst.gdb.ip.diffim.printers.CRPixelPrinter.val
val
Definition: printers.py:13
lsst.gdb.ip.diffim.printers.CRPixelPrinter.__init__
def __init__(self, val)
Definition: printers.py:12
lsst.gdb.ip.diffim.printers.CRPixelPrinter
Definition: printers.py:9
object
lsst.gdb.ip.diffim.printers.register
def register(obj)
Definition: printers.py:20
lsst.gdb.ip.diffim.printers.build_ip_diffim_dictionary
def build_ip_diffim_dictionary()
Definition: printers.py:29
lsst.gdb.ip.diffim.printers.CRPixelPrinter.to_string
def to_string(self)
Definition: printers.py:15