| The Gaudi Framework v27r1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

read_lhcb_event_file.py
Go to the documentation of this file.
1 #--------------------------------------------------
2 #Note that it is assumed the LHCb environment setup
3 #--------------------------------------------------
4 import gaudimodule,os
5 g = gaudimodule.AppMgr()
6
7 g.loaddict('EventDict')
8 #g.readOptions(os.environ['EVENTSYSROOT']+'/options/PoolDicts.opts')
9
10 sel = g.evtsel()
11 sel.open('rfio:/castor/cern.ch/lhcb/prod/00000080_00000001_5.oodst')
12 #sel.open('rfio:/castor/cern.ch/user/c/cattanem/Brunel/v23r0/Pool412400.dst',typ='POOL_ROOT')
13
14 evt = g.evtsvc()
15 his = g.histsvc()
16
17 h1 = his.book('h1','# of MCParticles', 40, 0, 5000)
18
19 class DumpAlg(gaudimodule.PyAlgorithm):
20 def execute(self):
21 evh = evt['Header']
22 mcps = evt['MC/Particles']
23 print 'event # = ',evh.evtNum()
24 h1.fill(mcps.size())
25
26 g.addAlgorithm(DumpAlg())
27 g.run(5)
28 print h1.contents()
29
read_lhcb_event_file.DumpAlg
Definition: read_lhcb_event_file.py:19
GaudiPython::PyAlgorithm::execute
StatusCode execute()
Definition: Algorithm.cpp:91
GaudiPython::PyAlgorithm
Python Algorithm base class.
Definition: Algorithm.h:32
GaudiPython.Bindings.AppMgr
Definition: Bindings.py:653