All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
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 
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 
StatusCode execute()
The action to be performed by the algorithm on an event.
Definition: Algorithm.cpp:92
Python Algorithm base class.
Definition: Algorithm.h:35