The Gaudi Framework  v38r0 (2143aa4c)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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.Examples.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  app.ExtSvc = ["Gaudi::Monitoring::MessageSvcSink"]
54  return adjustLogLevels(
56  [app, msgSvc],
59  setFakeEvents(nevt),
60  histogramWriting(outfile),
61  )
62  )
GaudiExamples.TestConfig2.histogramWriting
def histogramWriting(filename)
Definition: TestConfig2.py:33
GaudiExamples.TestConfig2.configureTiming
def configureTiming()
Definition: TestConfig2.py:25
GaudiExamples.TestConfig2.setFakeEvents
def setFakeEvents(nevt)
Definition: TestConfig2.py:29
GaudiExamples.TestConfig2.main
def main(nevt=50000, outfile="histo-c2.root", OutputLevel=3)
Definition: TestConfig2.py:50
GaudiExamples.TestConfig2.adjustLogLevels
def adjustLogLevels(config)
Definition: TestConfig2.py:45
GaudiConfig2.mergeConfigs
def mergeConfigs(*configs)
Definition: __init__.py:51
GaudiExamples.TestConfig2.setUpAlgorithms
def setUpAlgorithms()
Definition: TestConfig2.py:15