ATLAS Offline Software
StoreGateHiveExample.py
Go to the documentation of this file.
1 #
2 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 #
4 
5 
10 
11 #--------------------------------------------------------------
12 # Event related parameters
13 #--------------------------------------------------------------
14 import AthenaCommon.AtlasUnixGeneratorJob
15 
16 theApp.MessageSvcType = "TBBMessageSvc"
17 
18 from AthenaServices.AthenaServicesConf import AthenaHiveEventLoopMgr
19 
20 svcMgr += AthenaHiveEventLoopMgr()
21 # svcMgr.AthenaHiveEventLoopMgr.OutputLevel = DEBUG
22 
23 theApp.EventLoop = "AthenaHiveEventLoopMgr"
24 
25 numStores = 1
26 
27 from StoreGate.StoreGateConf import SG__HiveMgrSvc
28 svcMgr += SG__HiveMgrSvc("EventDataSvc")
29 svcMgr.EventDataSvc.NSlots = numStores
30 
31 from AthenaCommon.AlgScheduler import AlgScheduler
32 AlgScheduler.OutputLevel( DEBUG )
33 AlgScheduler.ShowControlFlow( True )
34 AlgScheduler.ShowDataDependencies( True )
35 AlgScheduler.setThreadPoolSize( 1 )
36 
37 svcMgr += AthenaHiveEventLoopMgr()
38 svcMgr.AthenaHiveEventLoopMgr.WhiteboardSvc = "EventDataSvc"
39 svcMgr.AthenaHiveEventLoopMgr.OutputLevel = DEBUG
40 
41 from StoreGate.StoreGateConf import SG__HiveMgrSvc
42 svcMgr += SG__HiveMgrSvc("EventDataSvc")
43 svcMgr.EventDataSvc.NSlots = numStores
44 svcMgr.EventDataSvc.OutputLevel = DEBUG
45 
46 from StoreGate.StoreGateConf import StoreGateSvc
47 svcMgr += StoreGateSvc()
48 svcMgr.StoreGateSvc.OutputLevel = VERBOSE
49 svcMgr.StoreGateSvc.Dump = True
50 
51 from StoreGate.StoreGateConf import SGImplSvc
52 svcMgr += SGImplSvc("SGImplSvc")
53 svcMgr.SGImplSvc.OutputLevel = VERBOSE
54 
55 
56 # dummy event loop
57 #theApp.EvtSel = "NONE"
58 # Number of events to be processed (default is 10)
59 theApp.EvtMax = 10
60 
61 
62 #--------------------------------------------------------------
63 # Private Application Configuration options
64 #--------------------------------------------------------------
65 from AthenaCommon.AlgSequence import AlgSequence
66 topSeq = AlgSequence()
67 
68 topSeq += CfgMgr.WriteData()
69 topSeq += CfgMgr.ReadData(DataProducer = "WriteData")
70 
71 # setup output level
72 from AthenaCommon.AppMgr import ServiceMgr as svcMgr
73 if not hasattr (svcMgr, 'StoreGateSvc'):
74  svcMgr += CfgMgr.StoreGateSvc()
75 #svcMgr.StoreGateSvc.OutputLevel = VERBOSE
76 #svcMgr.StoreGateSvc.Dump = False #True will dump data store contents
77 
78 svcMgr.MessageSvc.useColors = True
79 #svcMgr.MessageSvc.OutputLevel = Lvl.DEBUG
80 
81 
82 #==============================================================
83 #
84 # End of AthExStoreGateExample Job options file
85 #
86 
python.AlgSequence.AlgSequence
AlgSequence
Definition: PhysicsAnalysis/D3PDTools/AnaAlgorithm/python/AlgSequence.py:7
Atlas.StoreGateSvc
StoreGateSvc
Definition: Atlas.UnixStandardJob.py:25