The Gaudi Framework
v26r1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
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
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
GaudiPython
examples
read_lhcb_event_file.py
Generated on Mon Feb 16 2015 11:56:57 for The Gaudi Framework by
1.8.2