The Gaudi Framework  master (37c0b60a)
FullExperiment Namespace Reference

Functions

def config (evtslots=12, threads=10)
 

Function Documentation

◆ config()

def FullExperiment.config (   evtslots = 12,
  threads = 10 
)

Definition at line 14 of file FullExperiment.py.

14 def config(evtslots=12, threads=10):
15  from Configurables import (
16  ApplicationMgr,
17  AvalancheSchedulerSvc,
18  HiveSlimEventLoopMgr,
19  HiveWhiteBoard,
20  RandomGenSvc,
21  )
22  from Configurables import Gaudi__Example__TinyExperiment__CheckerAlg as CheckerAlg
23  from Configurables import (
24  Gaudi__Example__TinyExperiment__DigitizationAlg as DigitizationAlg,
25  )
26  from Configurables import (
27  Gaudi__Example__TinyExperiment__GeneratorAlg as GeneratorAlg,
28  )
29  from Configurables import (
30  Gaudi__Example__TinyExperiment__SimulationAlg as SimulationAlg,
31  )
32  from Configurables import Gaudi__Example__TinyExperiment__TrackingAlg as TrackingAlg
33  from Configurables import Gaudi__Monitoring__MessageSvcSink as MessageSvcSink
34 
35  evtslots = 12
36  threads = 10
37 
38  # infrastructure and services
39  RandomGenSvc(RandomSeed=1234)
40  whiteboard = HiveWhiteBoard("EventDataSvc", EventSlots=evtslots)
41  scheduler = AvalancheSchedulerSvc(ThreadPoolSize=threads)
42  slimeventloopmgr = HiveSlimEventLoopMgr(SchedulerName=scheduler.name())
43 
44  # - Algorithms
45  gen = GeneratorAlg("GeneratorAlg", NbTracksToGenerate=10)
46  sim = SimulationAlg(
47  "SimulationAlg", NbHitsPerTrack=15, MCTracksLocation=gen.MCTracksLocation
48  )
49  digi = DigitizationAlg(
50  "DigitizationAlg", SigmaNoise=0.1, MCHitsLocation=sim.MCHitsLocation
51  )
52  track = TrackingAlg(
53  "TrackingAlg", NumberBins=100, Sensibility=6, HitsLocation=digi.HitsLocation
54  )
55  check = CheckerAlg(
56  "CheckerAlg", DeltaThetaMax=0.01, TracksLocation=track.TracksLocation
57  )
58 
59  # this printout is useful to check that the type information is passed to python correctly
60  for configurable in [gen, sim, digi, track, check]:
61  print(configurable)
62  # this is to make sure the output is actually printed
63  sys.stdout.flush()
64 
65  # Application setup
67  ExtSvc=[MessageSvcSink(), whiteboard],
68  TopAlg=[gen, sim, digi, track, check],
69  EvtMax=10000,
70  EvtSel="NONE",
71  EventLoop=slimeventloopmgr,
72  )
FullExperiment.config
def config(evtslots=12, threads=10)
Definition: FullExperiment.py:14
AvalancheSchedulerSvc
Definition: AvalancheSchedulerSvc.h:114
HiveSlimEventLoopMgr
Definition: HiveSlimEventLoopMgr.h:32
ApplicationMgr
Definition: ApplicationMgr.h:57
HiveWhiteBoard
Definition: HiveWhiteBoard.cpp:128