Public Member Functions | Public Attributes | List of all members
wirecell.util.wires.info.BoundingBox Class Reference
Inheritance diagram for wirecell.util.wires.info.BoundingBox:

Public Member Functions

def __init__ (self)
 
def __call__ (self, p)
 
def center (self)
 

Public Attributes

 minp
 
 maxp
 

Detailed Description

Definition at line 45 of file info.py.

Constructor & Destructor Documentation

def wirecell.util.wires.info.BoundingBox.__init__ (   self)

Definition at line 46 of file info.py.

Member Function Documentation

def wirecell.util.wires.info.BoundingBox.__call__ (   self,
  p 
)

Definition at line 50 of file info.py.

50  def __call__(self, p):
51  if self.minp is None:
52  self.minp = dict(p)
53  self.maxp = dict(p)
54  return
55 
56  for c,v in self.minp.items():
57  if p[c] < v:
58  self.minp[c] = p[c]
59 
60  for c,v in self.maxp.items():
61  if p[c] > v:
62  self.maxp[c] = p[c]
63 
def wirecell.util.wires.info.BoundingBox.center (   self)

Definition at line 64 of file info.py.

64  def center(self):
65  return {c:0.5*(self.minp[c]+self.maxp[c]) for c in "xyz"}
66 

Member Data Documentation

wirecell.util.wires.info.BoundingBox.maxp

Definition at line 48 of file info.py.

wirecell.util.wires.info.BoundingBox.minp

Definition at line 47 of file info.py.


The documentation for this class was generated from the following file: