ATLAS Offline Software
Public Member Functions | Public Attributes | Static Public Attributes | Private Attributes | List of all members
python.Treereader.Treereader Class Reference
Inheritance diagram for python.Treereader.Treereader:
Collaboration diagram for python.Treereader.Treereader:

Public Member Functions

def __init__ (*self)
 
def real_init (self, tree, parent=None, subpattern=None)
 
def __getattr__ (self, attr)
 
def Notify (self)
 
def subreader (self, subpattern)
 
def GetEntry (self, i)
 

Public Attributes

 parent
 

Static Public Attributes

tuple leaftypes = (int, float, complex)
 

Private Attributes

 _tree
 
 _subpattern
 
 _subreaders
 
 __dict__
 

Detailed Description

Definition at line 4 of file Treereader.py.

Constructor & Destructor Documentation

◆ __init__()

def python.Treereader.Treereader.__init__ ( self)

Definition at line 11 of file Treereader.py.

11  def __init__ (*self):
12  raise Exception ("Use treereader() rather than creating Treereader directly.")
13 

Member Function Documentation

◆ __getattr__()

def python.Treereader.Treereader.__getattr__ (   self,
  attr 
)

Definition at line 23 of file Treereader.py.

23  def __getattr__ (self, attr):
24  if attr[0] == '_':
25  raise AttributeError
26  if self._subpattern:
27  lname = self._subpattern % attr
28  else:
29  lname = attr
30  ret = getattr (self._tree, lname)
31  if (isinstance (ret, Treereader.leaftypes) or
32  str(type(ret)) == "<type 'buffer'>"):
33  def getter (self, tree = self._tree, lname = lname):
34  return getattr (tree, lname)
35  setattr (self.__class__, attr, property (getter))
36  else:
37  setattr (self, attr, ret)
38  return ret
39 

◆ GetEntry()

def python.Treereader.Treereader.GetEntry (   self,
  i 
)

Definition at line 60 of file Treereader.py.

60  def GetEntry (self, i):
61  return self._tree.GetEntry (i)
62 
63 

◆ Notify()

def python.Treereader.Treereader.Notify (   self)

Definition at line 40 of file Treereader.py.

40  def Notify (self):
41  newdict = { '_tree' : self._tree,
42  '_subpattern' : self._subpattern,
43  '_subreaders' : self._subreaders}
44  for (k, v) in self.__dict__.items():
45  if isinstance (v, Treereader):
46  newdict[k] = v
47  self.__dict__ = newdict
48  #print 'notify!', self.__dict__
49  for s in self._subreaders:
50  s.Notify()
51  return
52 
53 

◆ real_init()

def python.Treereader.Treereader.real_init (   self,
  tree,
  parent = None,
  subpattern = None 
)

Definition at line 14 of file Treereader.py.

14  def real_init (self, tree, parent = None, subpattern = None):
15  self.parent = parent
16  self._tree = tree
17  self._subpattern = subpattern
18  self._subreaders = []
19  if self._subpattern is None:
20  tree.SetNotify (self)
21  return
22 

◆ subreader()

def python.Treereader.Treereader.subreader (   self,
  subpattern 
)

Definition at line 54 of file Treereader.py.

54  def subreader (self, subpattern):
55  sub = treereader (self._tree, self, subpattern)
56  self._subreaders.append (sub)
57  return sub
58 
59 

Member Data Documentation

◆ __dict__

python.Treereader.Treereader.__dict__
private

Definition at line 47 of file Treereader.py.

◆ _subpattern

python.Treereader.Treereader._subpattern
private

Definition at line 17 of file Treereader.py.

◆ _subreaders

python.Treereader.Treereader._subreaders
private

Definition at line 18 of file Treereader.py.

◆ _tree

python.Treereader.Treereader._tree
private

Definition at line 16 of file Treereader.py.

◆ leaftypes

tuple python.Treereader.Treereader.leaftypes = (int, float, complex)
static

Definition at line 5 of file Treereader.py.

◆ parent

python.Treereader.Treereader.parent

Definition at line 15 of file Treereader.py.


The documentation for this class was generated from the following file:
TrigJetMonitorAlgorithm.items
items
Definition: TrigJetMonitorAlgorithm.py:79
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
str
Definition: BTagTrackIpAccessor.cxx:11