ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
PyPoolBrowser.EDMItem Class Reference
Inheritance diagram for PyPoolBrowser.EDMItem:
Collaboration diagram for PyPoolBrowser.EDMItem:

Public Member Functions

def __init__ (self, name, ref, expandable, classKey=None)
 
def GetText (self)
 
def IsExpandable (self)
 
def GetIconName (self)
 
def OnDoubleClick (self)
 
def GetSubList (self)
 

Public Attributes

 name
 
 ref
 
 expandable
 
 classKey
 

Detailed Description

Definition at line 15 of file PyPoolBrowser.py.

Constructor & Destructor Documentation

◆ __init__()

def PyPoolBrowser.EDMItem.__init__ (   self,
  name,
  ref,
  expandable,
  classKey = None 
)

Definition at line 20 of file PyPoolBrowser.py.

20  def __init__ (self, name, ref, expandable, classKey=None):
21  self.name = name
22  self.ref = ref
23  self.expandable = expandable
24  self.classKey = classKey
25 

Member Function Documentation

◆ GetIconName()

def PyPoolBrowser.EDMItem.GetIconName (   self)

Definition at line 32 of file PyPoolBrowser.py.

32  def GetIconName(self):
33  if not self.IsExpandable():
34  return "python" # XXX wish there was a "file" icon
35 

◆ GetSubList()

def PyPoolBrowser.EDMItem.GetSubList (   self)

Reimplemented in PyPoolBrowser.RootItem.

Definition at line 52 of file PyPoolBrowser.py.

52  def GetSubList (self):
53  sublist = []
54  # if a vector-like class
55  if hasattr(self.ref,'size') and hasattr(self.ref,'__getitem__'):
56  # use the fist one
57  if self.ref.size() != 0:
58  item = EDMItem ('%s constituents' % self.ref.size(),self.ref[0],True,self.classKey)
59  sublist.append(item)
60  return sublist
61  #others
62  else:
63  attrs=dir(self.ref)
64  attrs.sort()
65  for attr in attrs:
66  # private
67  if re.search("\A_",attr):
68  continue
69  # member
70  if re.search("\Am_",attr):
71  continue
72  # method
73  attrRef = getattr(self.ref,attr)
74  item = EDMItem (attr,attrRef,False,self.classKey)
75  sublist.append(item)
76  return sublist
77 
78 # Root Item

◆ GetText()

def PyPoolBrowser.EDMItem.GetText (   self)

Definition at line 26 of file PyPoolBrowser.py.

26  def GetText (self):
27  return self.name
28 

◆ IsExpandable()

def PyPoolBrowser.EDMItem.IsExpandable (   self)

Definition at line 29 of file PyPoolBrowser.py.

29  def IsExpandable (self):
30  return self.expandable
31 

◆ OnDoubleClick()

def PyPoolBrowser.EDMItem.OnDoubleClick (   self)

Definition at line 37 of file PyPoolBrowser.py.

37  def OnDoubleClick(self):
38  # not a leaf
39  if self.IsExpandable():
40  return
41  # doesn't belong to a class
42  if self.classKey == None:
43  return
44  # draw histogram
45  x = eval ('PyKernel.plot ("%s#%s", "$x.%s()")' % (objList[self.classKey], self.classKey, self.name))
46  # sleep is needed to draw up canvas
47  time.sleep(1)
48  # return is also needed. see PyKernel.plot
49  return x
50 

Member Data Documentation

◆ classKey

PyPoolBrowser.EDMItem.classKey

Definition at line 24 of file PyPoolBrowser.py.

◆ expandable

PyPoolBrowser.EDMItem.expandable

Definition at line 23 of file PyPoolBrowser.py.

◆ name

PyPoolBrowser.EDMItem.name

Definition at line 21 of file PyPoolBrowser.py.

◆ ref

PyPoolBrowser.EDMItem.ref

Definition at line 22 of file PyPoolBrowser.py.


The documentation for this class was generated from the following file:
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
beamspotman.dir
string dir
Definition: beamspotman.py:623
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18