The Gaudi Framework  master (37c0b60a)
TestConfig2.py
Go to the documentation of this file.
1 
11 from GaudiConfig2 import Configurables as C
12 from GaudiConfig2 import mergeConfigs
13 
14 
16  algorithms = [
17  C.Gaudi.TestSuite.Counter.GaudiHistoAlgorithm(
18  "SimpleCounterHistos", OutputLevel=3
19  ),
20  ]
21  app = C.ApplicationMgr(TopAlg=algorithms)
22  return algorithms + [app]
23 
24 
26  return [C.AuditorSvc("AuditorSvc", Auditors=["ChronoAuditor"])]
27 
28 
29 def setFakeEvents(nevt):
30  return [C.ApplicationMgr(EvtMax=nevt, EvtSel="NONE")]
31 
32 
33 def histogramWriting(filename):
34  return [
35  C.ApplicationMgr(HistogramPersistency="ROOT"),
36  C.RootHistCnv.PersSvc("RootHistSvc", OutputFile=filename),
37  C.HistogramSvc(
38  "HistogramDataSvc",
39  OutputLevel=2,
40  ),
41  C.Gaudi.Histograming.Sink.Root(),
42  ]
43 
44 
45 def adjustLogLevels(config):
46  config["ApplicationMgr"].TopAlg[0].OutputLevel = 2
47  return config
48 
49 
50 def main(nevt=50000, outfile="histo-c2.root", OutputLevel=3):
51  msgSvc = C.MessageSvc(OutputLevel=3)
52  app = C.ApplicationMgr(MessageSvcType=msgSvc)
53  msgSvcSink = C.Gaudi.Monitoring.MessageSvcSink(
54  HistoStringsWidth=40, NamesToSave=["Prof.*", "Gauss.*"]
55  )
56  app.ExtSvc = [msgSvcSink]
57  return adjustLogLevels(
59  [app, msgSvc, msgSvcSink],
62  setFakeEvents(nevt),
63  histogramWriting(outfile),
64  )
65  )
TestConfig2.setUpAlgorithms
def setUpAlgorithms()
Definition: TestConfig2.py:15
TestConfig2.configureTiming
def configureTiming()
Definition: TestConfig2.py:25
TestConfig2.histogramWriting
def histogramWriting(filename)
Definition: TestConfig2.py:33
GaudiConfig2.mergeConfigs
def mergeConfigs(*configs)
Definition: __init__.py:51
TestConfig2.setFakeEvents
def setFakeEvents(nevt)
Definition: TestConfig2.py:29
TestConfig2.main
def main(nevt=50000, outfile="histo-c2.root", OutputLevel=3)
Definition: TestConfig2.py:50
TestConfig2.adjustLogLevels
def adjustLogLevels(config)
Definition: TestConfig2.py:45