Public Member Functions | Public Attributes | List of all members
generic.models.PlotInfo.CanvasSummary._MethodWrapper Class Reference
Inheritance diagram for generic.models.PlotInfo.CanvasSummary._MethodWrapper:
object

Public Member Functions

def __init__ (self, required_method_names, wrapper=None)
 
def __call__ (self, h)
 

Public Attributes

 required_method_names
 
 wrapper
 
short int type
 
short int number
 
char name [SIZE_OF_OBJ_NAME]
 
cat_entry star
 

Detailed Description

Definition at line 102 of file PlotInfo.py.

Constructor & Destructor Documentation

def generic.models.PlotInfo.CanvasSummary._MethodWrapper.__init__ (   self,
  required_method_names,
  wrapper = None 
)

Definition at line 103 of file PlotInfo.py.

103  def __init__(self, required_method_names, wrapper = None):
104  self.required_method_names = [required_method_names,] if isinstance(required_method_names, basestring) else required_method_names
105  self.wrapper = wrapper
106 
107  if self.wrapper is None and len(self.required_method_names) != 1:
108  raise Exception("Can't auto-construct method wrapper with multiple or unspecified required methods: '%s'" % self.required_method_names)
109 
def __init__(self, required_method_names, wrapper=None)
Definition: PlotInfo.py:103
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66

Member Function Documentation

def generic.models.PlotInfo.CanvasSummary._MethodWrapper.__call__ (   self,
  h 
)

Definition at line 110 of file PlotInfo.py.

References next(), generic.models.PlotInfo.CanvasSummary._MethodWrapper.required_method_names, and generic.models.PlotInfo.CanvasSummary._MethodWrapper.wrapper.

110  def __call__(self, h):
111  if not all(hasattr(h, m) for m in self.required_method_names):
112  return None
113 
114  if self.wrapper is None:
115  return getattr(h, iter(self.required_method_names).next())()
116  else:
117  return self.wrapper(h)
118 
119  GETTERS = {
void next()
Definition: show_event.C:84

Member Data Documentation

char object::name
inherited
short int object::number
inherited

Definition at line 115 of file novas.h.

generic.models.PlotInfo.CanvasSummary._MethodWrapper.required_method_names
cat_entry object::star
inherited

Definition at line 117 of file novas.h.

short int object::type
inherited

Definition at line 114 of file novas.h.

generic.models.PlotInfo.CanvasSummary._MethodWrapper.wrapper

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