| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

GaudiPython::Pythonizations Namespace Reference


Functions

def _loadDict
def _printHisto1D
def _contentsHisto1D
def _printHisto2D
def _printStatusCode
def _printBitReference
def _printFillStreamBroken
def _printFillStream
def _container__getitem__
def _container__len__
def _container__iter__
def _draw_aida_

Variables

list __all__ = [ ]
 gbl = PyCintex.gbl
 _loadDict_save = PyCintex.loadDict

Function Documentation

def GaudiPython::Pythonizations::_loadDict (   name  )  [private]

Definition at line 18 of file Pythonizations.py.

00018                    :
00019   import sys
00020   if sys.platform != 'win32' and name[:3] != 'lib' : name = 'lib'+name
00021   return _loadDict_save(name)
00022 PyCintex.loadDict = _loadDict
00023  
00024 #--- Adding extra functionality to C++ raw classes------------------------------------
def _printHisto1D(h) :

def GaudiPython::Pythonizations::_printHisto1D (   h  )  [private]

Definition at line 25 of file Pythonizations.py.

00025                      :
00026   x = h.axis()
00027   return  'Histogram 1D "%s" %d bins [%f,%f]' % (h.title(), x.bins(), x.lowerEdge(), x.upperEdge())
def _contentsHisto1D(h) :

def GaudiPython::Pythonizations::_contentsHisto1D (   h  )  [private]

Definition at line 28 of file Pythonizations.py.

00028                         :
00029   x = h.axis()
00030   return  map(h.binEntries, range(x.bins()))
def _printHisto2D(h) :

def GaudiPython::Pythonizations::_printHisto2D (   h  )  [private]

Definition at line 31 of file Pythonizations.py.

00031                      :
00032   x,y = h.xAxis(),h.yAxis()
00033   return  'Histogram 2D "%s" %d xbins [%f,%f], %d ybins [%f,%f]' % \
00034   (h.title(), x.bins(), x.lowerEdge(), x.upperEdge(), y.bins(), y.lowerEdge(), y.upperEdge() )
def _printStatusCode(s) :

def GaudiPython::Pythonizations::_printStatusCode (   s  )  [private]

Definition at line 35 of file Pythonizations.py.

00035                         :
00036   if s.isSuccess() : return 'SUCCESS'
00037   else             : return 'FAILURE'
def _printBitReference(b) :

def GaudiPython::Pythonizations::_printBitReference (   b  )  [private]

Definition at line 38 of file Pythonizations.py.

00038                           :
00039   return str(1==b.bool())
def _printFillStreamBroken(o) :

def GaudiPython::Pythonizations::_printFillStreamBroken (   o  )  [private]

Definition at line 40 of file Pythonizations.py.

00040                               :
00041   import ROOT                   # https://savannah.cern.ch/bugs/?28426
00042   s = ROOT.stringstream()
00043   o.fillStream(s)
00044   out = s.str()
00045   if out == '' :
00046     out = o.__class__.__name__ + ' object'
00047     if hasattr( o, 'hasKey') and o.hasKey() :
00048       out += ' key = '+ str(o.key())
00049   return out
def _printFillStream(o) :

def GaudiPython::Pythonizations::_printFillStream (   o  )  [private]

Definition at line 50 of file Pythonizations.py.

00050                         :
00051   if  o :
00052     s = gbl.stringstream()
00053     o.fillStream(s)
00054     out = s.str()
00055     if out == '' :
00056       out = o.__class__.__name__ + ' object'
00057       if hasattr( o, 'hasKey') and o.hasKey() :
00058         out += ' key = '+ str(o.key())
00059   else :
00060     out = o.__class__.__name__ + ' NULL object'
00061   return out
def _container__getitem__(self, k) :

def GaudiPython::Pythonizations::_container__getitem__ (   self,
  k 
) [private]

Definition at line 62 of file Pythonizations.py.

00062                                    :
00063   return self.containedObject(k)
def _container__len__(self) :

def GaudiPython::Pythonizations::_container__len__ (   self  )  [private]

Definition at line 64 of file Pythonizations.py.

00064                             :
00065   return self.numberOfObjects()
def _container__iter__(self) :

def GaudiPython::Pythonizations::_container__iter__ (   self  )  [private]

Definition at line 66 of file Pythonizations.py.

00066                              :
00067   if hasattr(self,'containedObjects') : sequential = self.containedObjects()
00068   else                                : sequential = self
00069   count = 0
00070   limit = self.__len__()
00071   while count < limit :
00072     yield sequential.__getitem__(count)
00073     count += 1
00074 
def _draw_aida_ ( self , *args ) :

def GaudiPython::Pythonizations::_draw_aida_ (   self,
  args 
) [private]

Draw AIDA histogram (through access to internal ROOT histogram

>>> aida = ...    # get the historgam 
>>> aida.Draw()

Definition at line 75 of file Pythonizations.py.

00075                                  :
00076   """
00077   Draw AIDA histogram (through access to internal ROOT histogram
00078 
00079   >>> aida = ...    # get the historgam 
00080   >>> aida.Draw()
00081   
00082   """
00083   _fun = PyCintex.gbl.Gaudi.Utils.Aida2ROOT.aida2root
00084   _root = _fun ( self ) 
00085   return _root.Draw( *args )
00086 
00087 gbl.AIDA.IHistogram1D.__repr__ = _printHisto1D
00088 gbl.AIDA.IHistogram1D.contents = _contentsHisto1D
00089 gbl.AIDA.IHistogram2D.__repr__ = _printHisto2D
for h in (  gbl.AIDA.IHistogram   ,


Variable Documentation

list GaudiPython::Pythonizations::__all__ = [ ] [static]

Definition at line 8 of file Pythonizations.py.

GaudiPython::Pythonizations::gbl = PyCintex.gbl [static]

Definition at line 11 of file Pythonizations.py.

GaudiPython::Pythonizations::_loadDict_save = PyCintex.loadDict [static]

Definition at line 17 of file Pythonizations.py.

| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 19:58:58 2011 for GaudiPython by doxygen 1.4.7