| # Gaudi Framework, version v21r7 |

Home |  | Generated: 22 Jan 2010

# Test::PhysAnalAlg Class Reference

List of all members.

## Public Member Functions
def | initialize
def | execute
def | finalize
## Public Attributes
| evt
| his
| h1
| h2

## Detailed Description

Definition at line 50 of file Test.py.

## Member Function Documentation

def Test::PhysAnalAlg::initialize | ( |  | self | ) |

Definition at line 51 of file Test.py.

    00051                       :
    00052     self.evt = gaudi.DataSvc(g.service('EventDataSvc'))
    00053     self.his = gaudi.HistoSvc(g.service('HistogramDataSvc'))
    00054     print 'Initializing User Analysis...'
    00055     self.h1 = self.his.book('myhisto1', 'Histogram 1D for tests', 20, 0., 40.)
    00056     self.h2 = self.his.book('myhisto2', 'Histogram 2D for test2', 20, 0., 40., 20, 0., 10.)
    00057     print '....User Analysis Initialized'
    00058     return 1
      def execute(self):

def Test::PhysAnalAlg::execute | ( |  | self | ) |

Definition at line 59 of file Test.py.

    00059                    :
    00060     tks = self.evt.object('MyTracks')
    00061     print 'MyTracks collection contains '  + `len(tks)` + ' Tracks'
    00062     for t in tks :
    00063       self.h1.fill( math.sqrt(t.px*t.px + t.py*t.py + t.pz*t.pz), 1)
    00064       self.h2.fill( t.px, t.py )
    00065     return 1
      def finalize(self):

def Test::PhysAnalAlg::finalize | ( |  | self | ) |

Definition at line 66 of file Test.py.

    00066                     :
    00067     print 'Finalizing User Analysis...'
    00068     print self.h1
    00069     print self.h1.entries()
    00070     print self.h2
    00071     print '....User Analysis Finalized'
    00072     return 1
    00073
    print '**************Testing Python Algorithms ********************'

## Member Data Documentation

Test::PhysAnalAlg::evt

Definition at line 52 of file Test.py.

Test::PhysAnalAlg::his

Definition at line 53 of file Test.py.

Test::PhysAnalAlg::h1

Definition at line 55 of file Test.py.

Test::PhysAnalAlg::h2

Definition at line 56 of file Test.py.

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v21r7/GaudiPython/home/Test.py