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

Public Member Functions

 __init__ (self, name, **kw)
 getGaudiType (self)
 getType (self)
 setup (self)
 getDlls (self)
 msg (self)
 getHandle (self)
 __getstate__ (self)
 __setstate__ (self, state)
 merge (self, other)

Public Attributes

 OutputLevel = _get_prop_value (self, 'OutputLevel')
 special case of the OutputLevel: take the value from the svcMgr.MessageSvc if none already set by user

Private Attributes

 __dict__

Detailed Description

Definition at line 153 of file Configurables.py.

Constructor & Destructor Documentation

◆ __init__()

python.Configurables.CfgPyService.__init__ ( self,
name,
** kw )

Definition at line 154 of file Configurables.py.

154 def __init__( self, name, **kw ):
155 if isinstance(self, LegacyConfigurable):
156 _svc_base.__init__(self, name)
157 else:
158 _svc_base.__init__(self, name, **kw)
159 CfgPyComponent.__init__(self, name, **kw)
160

Member Function Documentation

◆ __getstate__()

python.Configurables.CfgPyComponent.__getstate__ ( self)
inherited

Definition at line 63 of file Configurables.py.

63 def __getstate__(self):
64 state = super().__getstate__()
65 state.update(self.__dict__)
66 return state
67

◆ __setstate__()

python.Configurables.CfgPyComponent.__setstate__ ( self,
state )
inherited

Definition at line 68 of file Configurables.py.

68 def __setstate__(self, state):
69 self.__dict__.update(state)
70 super().__setstate__(state)
71

◆ getDlls()

python.Configurables.CfgPyComponent.getDlls ( self)
inherited

Definition at line 52 of file Configurables.py.

52 def getDlls(self):
53 return 'AthenaPython'
54

◆ getGaudiType()

python.Configurables.CfgPyService.getGaudiType ( self)

Definition at line 161 of file Configurables.py.

161 def getGaudiType( self ): return 'Service'

◆ getHandle()

python.Configurables.CfgPyComponent.getHandle ( self)
inherited

Definition at line 60 of file Configurables.py.

60 def getHandle(self):
61 return None
62

◆ getType()

python.Configurables.CfgPyService.getType ( self)

Definition at line 162 of file Configurables.py.

162 def getType(self): return 'PyAthena::Svc'
163

◆ merge()

python.Configurables.CfgPyComponent.merge ( self,
other )
inherited
Basic merge for Python components.
Checks that all attributes/properties are identical.

Definition at line 91 of file Configurables.py.

91 def merge(self, other):
92 """Basic merge for Python components.
93 Checks that all attributes/properties are identical.
94 """
95 if self is other:
96 return self
97
98 if type(self) is not type(other):
99 raise TypeError(f"cannot merge instance of {type(other).__name__} into "
100 f"an instance of { type(self).__name__}")
101
102 if self.name != other.name:
103 raise ValueError(f"cannot merge configurables with different names ({self.name} and {other.name})")
104
105 for prop in other.__dict__:
106 if (hasattr(self, prop) and getattr(self, prop) == getattr(other, prop)):
107 continue
108 else:
109 raise ValueError(f"conflicting settings for property {prop} of {self.name}: "
110 f"{getattr(self,prop)} vs {getattr(other,prop)}")
111 return self
112
113
Definition merge.py:1

◆ msg()

python.Configurables.CfgPyComponent.msg ( self)
inherited

Definition at line 56 of file Configurables.py.

56 def msg(self):
57 import AthenaCommon.Logging as _L
58 return _L.logging.getLogger( self.getName() )
59
MsgStream & msg
Definition testRead.cxx:32

◆ setup()

python.Configurables.CfgPyService.setup ( self)

Reimplemented from python.Configurables.CfgPyComponent.

Definition at line 164 of file Configurables.py.

164 def setup(self):
165
166 from AthenaPython import PyAthena
167 setattr(PyAthena.services, self.getName(), self)
168
169
170 CfgPyComponent.setup(self)
171 if isinstance(self, LegacyConfigurable):
172 _svc_base.setup(self)
173
174
bool setup(asg::AnaToolHandle< Interface > &tool, const std::string &type, const std::vector< std::string > &config, const std::string &progressFile="")
mostly useful for athena, which will otherwise re-use the previous tool

Member Data Documentation

◆ __dict__

python.Configurables.CfgPyComponent.__dict__
privateinherited

Definition at line 65 of file Configurables.py.

◆ OutputLevel

python.Configurables.CfgPyComponent.OutputLevel = _get_prop_value (self, 'OutputLevel')
inherited

special case of the OutputLevel: take the value from the svcMgr.MessageSvc if none already set by user

Definition at line 81 of file Configurables.py.


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