The Gaudi Framework  v36r16 (ea80daf8)
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.GaudiHistoAlgorithm("SimpleHistos", HistoPrint=True, OutputLevel=3),
18  ]
19  app = C.ApplicationMgr(TopAlg=algorithms)
20  return algorithms + [app]
21 
22 
24  return [C.AuditorSvc("AuditorSvc", Auditors=["ChronoAuditor"])]
25 
26 
27 def setFakeEvents(nevt):
28  return [C.ApplicationMgr(EvtMax=nevt, EvtSel="NONE")]
29 
30 
31 def histogramWriting(filename):
32  return [
33  C.ApplicationMgr(HistogramPersistency="ROOT"),
34  C.RootHistCnv.PersSvc("RootHistSvc", OutputFile=filename),
35  C.HistogramSvc(
36  "HistogramDataSvc",
37  OutputLevel=2,
38  Input=["InFile DATAFILE='../data/input.hbook' TYP='HBOOK'"],
39  ),
40  ]
41 
42 
43 def adjustLogLevels(config):
44  config["ApplicationMgr"].TopAlg[0].OutputLevel = 2
45  return config
46 
47 
48 def main(nevt=50000, outfile="histo-c2.root", OutputLevel=3):
49  msgSvc = C.MessageSvc(OutputLevel=3)
50  app = C.ApplicationMgr(MessageSvcType=msgSvc)
51  app.ExtSvc = ["Gaudi::Monitoring::MessageSvcSink"]
52  return adjustLogLevels(
54  [app, msgSvc],
57  setFakeEvents(nevt),
58  histogramWriting(outfile),
59  )
60  )
GaudiExamples.TestConfig2.histogramWriting
def histogramWriting(filename)
Definition: TestConfig2.py:31
GaudiExamples.TestConfig2.configureTiming
def configureTiming()
Definition: TestConfig2.py:23
GaudiExamples.TestConfig2.setFakeEvents
def setFakeEvents(nevt)
Definition: TestConfig2.py:27
GaudiExamples.TestConfig2.main
def main(nevt=50000, outfile="histo-c2.root", OutputLevel=3)
Definition: TestConfig2.py:48
GaudiExamples.TestConfig2.adjustLogLevels
def adjustLogLevels(config)
Definition: TestConfig2.py:43
GaudiConfig2.mergeConfigs
def mergeConfigs(*configs)
Definition: __init__.py:51
GaudiExamples.TestConfig2.setUpAlgorithms
def setUpAlgorithms()
Definition: TestConfig2.py:15