Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/env python
from Gaudi.Configuration import *
##############################################################################
# Geometry Svc
##############################################################################
# geometry_option = "CepC_v4-onlyTracker.xml"
# geometry_option = "CepC_v4-onlyVXD.xml"
geometry_option = "CepC_v4-onlyECAL.xml"
if not os.getenv("DETCEPCV4ROOT"):
print("Can't find the geometry. Please setup envvar DETCEPCV4ROOT." )
sys.exit(-1)
geometry_path = os.path.join(os.getenv("DETCEPCV4ROOT"), "compact", geometry_option)
if not os.path.exists(geometry_path):
print("Can't find the compact geometry file: %s"%geometry_path)
sys.exit(-1)
from Configurables import GeoSvc
geosvc = GeoSvc("GeoSvc")
geosvc.compact = geometry_path
##############################################################################
# Event Data Svc
##############################################################################
from Configurables import K4DataSvc
dsvc = K4DataSvc("EventDataSvc", input="test-detsim10.root")
##############################################################################
# NTuple Svc
##############################################################################
from Configurables import NTupleSvc
ntsvc = NTupleSvc("NTupleSvc")
ntsvc.Output = ["MyTuples DATAFILE='result.root' OPT='NEW' TYP='ROOT'"]
##############################################################################
# DumpAlg
##############################################################################
from Configurables import DumpIDAlg
alg = DumpIDAlg("DumpAlg")
from Configurables import PodioInput
podioinput = PodioInput("PodioReader", collections=[
"EcalBarrelCollection"
])
# ApplicationMgr
from Configurables import ApplicationMgr
ApplicationMgr( TopAlg = [podioinput, alg],
EvtSel = 'NONE',
EvtMax = 10,
ExtSvc = [dsvc, ntsvc],
HistogramPersistency = "ROOT",
OutputLevel=DEBUG
)