/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Public Attributes | Static Private Attributes
GenDecay::data::PrettyPrint Class Reference

List of all members.

Public Member Functions

def __init__
def tab
def __str__

Public Attributes

 iso
 depth

Static Private Attributes

string _tab = ' '

Detailed Description

Definition at line 130 of file data.py.


Constructor & Destructor Documentation

def GenDecay::data::PrettyPrint::__init__ (   self,
  iso,
  depth = 0 
)

Definition at line 134 of file data.py.

00135                                   :
00136         self.iso = iso
00137         self.depth = depth
00138         return


Member Function Documentation

def GenDecay::data::PrettyPrint::tab (   self)

Definition at line 139 of file data.py.

00139                  : return PrettyPrint._tab*self.depth
00140 
def GenDecay::data::PrettyPrint::__str__ (   self)

Definition at line 141 of file data.py.

00142                      :
00143         import decay
00144         ret = [self.tab()+str(self.iso)]
00145 
00146         iso2process = []
00147         for t in self.iso.transitions: # assume only be non-GammaDecay
00148 
00149             # Add this transition
00150             #print self.tab()+str(t)
00151             ret.append(self.tab()+str(t))
00152 
00153             # if daughter not stable
00154             if t.final.transitions: 
00155                 ft = t.final.transitions[0] 
00156                 # and if daugther decays by gamma
00157                 if type(ft.radiation) == decay.GammaDecay: 
00158                     # save string rep and ground state for later processing
00159                     ret.append(self.tab()+PrettyPrint._tab+str(ft))
00160                     if not ft.final in iso2process:
00161                         iso2process.append(ft.final)
00162                     continue
00163 
00164             # otherwise, save for recursion
00165             if not t.final in iso2process: 
00166                 iso2process.append(t.final)
00167             continue
00168         for iso in iso2process:
00169             pp = PrettyPrint(iso,self.depth+1)
00170             ret.append(str(pp))
00171 
00172         return '\n'.join(ret)
00173                        
00174 


Member Data Documentation

string GenDecay::data::PrettyPrint::_tab = ' ' [static, private]

Definition at line 132 of file data.py.

Definition at line 134 of file data.py.

Definition at line 134 of file data.py.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 10:21:06 for GenDecay by doxygen 1.7.4