ATLAS Offline Software
Public Member Functions | Static Private Attributes | List of all members
python.AtlasSemantics.PublicHandleSemantics Class Reference
Inheritance diagram for python.AtlasSemantics.PublicHandleSemantics:
Collaboration diagram for python.AtlasSemantics.PublicHandleSemantics:

Public Member Functions

def __init__ (self, cpp_type)
 
def default (self, value)
 
def store (self, value)
 

Static Private Attributes

tuple __handled_types__ = ("PublicToolHandle","ServiceHandle")
 

Detailed Description

ServiceHandles (and the deprecated PublicToolHandles) are assigned as strings

Definition at line 120 of file AtlasSemantics.py.

Constructor & Destructor Documentation

◆ __init__()

def python.AtlasSemantics.PublicHandleSemantics.__init__ (   self,
  cpp_type 
)

Definition at line 126 of file AtlasSemantics.py.

126  def __init__(self,cpp_type):
127  super(PublicHandleSemantics, self).__init__(cpp_type)
128 

Member Function Documentation

◆ default()

def python.AtlasSemantics.PublicHandleSemantics.default (   self,
  value 
)

Definition at line 129 of file AtlasSemantics.py.

129  def default(self,value):
130  return value.typeAndName
131 

◆ store()

def python.AtlasSemantics.PublicHandleSemantics.store (   self,
  value 
)

Definition at line 132 of file AtlasSemantics.py.

132  def store(self,value):
133  if isinstance(value,str): #Assume the string is correct and the tool/svc alreayd in the CA ...
134  return value
135 
136  if value is None:
137  return ""
138 
139  if not hasattr(value,"__component_type__"):
140  raise TypeError("Got {}, expected Tool or Service in assignment to {}".format(type(value),self.name))
141 
142  if value.__component_type__ not in ('Service','AlgTool'):
143  raise TypeError('{} expected, got {!r} in assignemnt to {}'.\
144  format(value.__component_type__,value, self.name))
145 
146  #It would be great if at this point we could verify that the service was
147  #ineed added to the ComponentAccumulator. Latest, do that when bootstapping
148  #the application
149 
150  return "{}/{}".format(value.__cpp_type__,value.name)
151 

Member Data Documentation

◆ __handled_types__

tuple python.AtlasSemantics.PublicHandleSemantics.__handled_types__ = ("PublicToolHandle","ServiceHandle")
staticprivate

Definition at line 124 of file AtlasSemantics.py.


The documentation for this class was generated from the following file:
store
StoreGateSvc * store
Definition: fbtTestBasics.cxx:69
vtune_athena.format
format
Definition: vtune_athena.py:14
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
python.CaloScaleNoiseConfig.default
default
Definition: CaloScaleNoiseConfig.py:79