ATLAS Offline Software
Loading...
Searching...
No Matches
python.MTJobOptCfg.PerfMonMTSvc Class Reference
Inheritance diagram for python.MTJobOptCfg.PerfMonMTSvc:
Collaboration diagram for python.MTJobOptCfg.PerfMonMTSvc:

Public Member Functions

 __init__ (self, name="PerfMonMTSvc", **kwargs)
 setDefaults (cls, handle)

Detailed Description

Definition at line 7 of file MTJobOptCfg.py.

Constructor & Destructor Documentation

◆ __init__()

python.MTJobOptCfg.PerfMonMTSvc.__init__ ( self,
name = "PerfMonMTSvc",
** kwargs )

Definition at line 9 of file MTJobOptCfg.py.

9 def __init__(self, name = "PerfMonMTSvc", **kwargs):
10
11 kwargs['name'] = name
12 super( PerfMonMTSvc, self ).__init__( **kwargs )
13
14 return
15

Member Function Documentation

◆ setDefaults()

python.MTJobOptCfg.PerfMonMTSvc.setDefaults ( cls,
handle )

Definition at line 16 of file MTJobOptCfg.py.

16 def setDefaults(cls, handle):
17
18
19 from PerfMonComps.PerfMonFlags import jobproperties
20
21
22 if not jobproperties.PerfMonFlags.doMonitoringMT():
23 return
24
25
26 if not isinstance(handle, PerfMonMTSvc):
27 return
28
29
30 from AthenaCommon.AppMgr import theApp
31 theApp.AuditAlgorithms = True
32 theApp.AuditTools = True
33 theApp.AuditServices = True
34
35 from AthenaCommon.AppMgr import ServiceMgr as svcMgr
36
37 if hasattr(handle, "getFullJobOptName") :
38 handleName = handle.getFullJobOptName()
39 if handleName not in theApp.CreateSvc:
40 # Be the very first service to be initialized
41 theApp.CreateSvc = [ handleName ] + theApp.CreateSvc
42
43
44 handle.jsonFileName = jobproperties.PerfMonFlags.OutputJSON()
45
46
47 import os,psutil
48 handle.wallTimeOffset = psutil.Process(os.getpid()).create_time() * 1000
49
50
51 from AthenaCommon.ConcurrencyFlags import jobproperties as jp
52 handle.numberOfThreads = max(1,jp.ConcurrencyFlags.NumThreads())
53 handle.numberOfSlots = max(1,jp.ConcurrencyFlags.NumConcurrentEvents())
54
55
56 if not hasattr(svcMgr, 'AuditorSvc'):
57 from GaudiCommonSvc.GaudiCommonSvcConf import AuditorSvc
58 svcMgr += AuditorSvc()
59
60
61 if jobproperties.PerfMonFlags.doFullMonMT():
62 handle.doComponentLevelMonitoring = True
63
64 return
65
#define max(a, b)
Definition cfImp.cxx:41

The documentation for this class was generated from the following file: