LSSTApplications  18.0.0+53,19.0.0,19.0.0+1,19.0.0+15,19.0.0+16,19.0.0+18,19.0.0+23,19.0.0+3,19.0.0-1-g20d9b18+9,19.0.0-1-g425ff20,19.0.0-1-g5549ca4,19.0.0-1-g580fafe+9,19.0.0-1-g6fe20d0+2,19.0.0-1-g8c57eb9+9,19.0.0-1-gbfe0924,19.0.0-1-gdc0e4a7+14,19.0.0-1-ge272bc4+9,19.0.0-1-ge3aa853+1,19.0.0-14-gbb28fe44,19.0.0-16-g8258e2a,19.0.0-2-g0d9f9cd+16,19.0.0-2-g260436e,19.0.0-2-g9b11441+3,19.0.0-2-gd955cfd+22,19.0.0-3-g6513920,19.0.0-3-gc4f6e04,19.0.0-4-g41ffa1d+2,19.0.0-4-g725f80e+18,19.0.0-4-g75300c1e,19.0.0-4-ga8eba22,19.0.0-5-g0745e3f,19.0.0-6-g6637c4fb6,19.0.0-6-gb6b8b0a,19.0.0-7-gea0a0fe+5,w.2020.03
LSSTDataManagementBasePackage
printers.py
Go to the documentation of this file.
1 import gdb
2 import sys
3 
4 try:
5  import gdb.printing
6 
8  "Print a CRPixel"
9 
10  def __init__(self, val):
11  self.val = val
12 
13  def to_string(self):
14  return "{id=%d (%d, %d)}" % (self.val["id"], self.val["col"], self.val["row"])
15 
16  printers = []
17 
18  def register(obj):
19  "Register my pretty-printers with objfile Obj."
20 
21  if obj is None:
22  obj = gdb
23 
24  for p in printers:
25  gdb.printing.register_pretty_printer(obj, p)
26 
28  printer = gdb.printing.RegexpCollectionPrettyPrinter("meas_algorithms")
29 
30  printer.add_printer('lsst::meas::algorithms::CRPixel',
31  '^lsst::meas::algorithms::CRPixel', CRPixelPrinter)
32  return printer
33 
34  printers.append(build_meas_algorithms_dictionary())
35 
36 except ImportError as e:
37  def register(*args, exception=e, **kwargs):
38  print("Your version of gdb is too old to load the meas.algorithms python pretty printers: %s" %
39  (exception,), file=sys.stderr)
40  pass
41 
42  pass