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

Public Member Functions

def __init__ (self, cpp_type)
 
def store (self, value)
 
def default (self, value)
 
def merge (self, bb, aa)
 

Static Private Attributes

tuple __handled_types__ = ("PublicToolHandleArray","ServiceHandleArray")
 

Detailed Description

Semantics for arrays of string-based pointers to components defined elsewhere

Definition at line 152 of file AtlasSemantics.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 157 of file AtlasSemantics.py.

157  def __init__(self,cpp_type):
158  super(PublicHandleArraySemantics, self).__init__(cpp_type)
159 

Member Function Documentation

◆ default()

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

Definition at line 185 of file AtlasSemantics.py.

185  def default(self, value):
186  return copy.copy(value)
187 
188 

◆ merge()

def python.AtlasSemantics.PublicHandleArraySemantics.merge (   self,
  bb,
  aa 
)

Definition at line 189 of file AtlasSemantics.py.

189  def merge(self,bb,aa):
190  for b in bb:
191  if b not in aa:
192  aa.append(b)
193  return aa
194  #union=set(a) | set(b)
195  #return union
196 
197 

◆ store()

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

Definition at line 160 of file AtlasSemantics.py.

160  def store(self, value):
161  if not isinstance(value,Sequence) and not isinstance(value,set):
162  value=[value,]
163 
164  newValue=[]
165  for v in value:
166  if isinstance(v,GaudiConfig2._configurables.Configurable):
167  if v.__component_type__ not in ('Service','AlgTool'):
168  raise TypeError('{} expected, got {!r} in assignemnt to {}'.\
169  format(value.__component_type__,v, self.name))
170  else:
171  newValue.append("{}/{}".format(v.__cpp_type__,v.name))
172 
173  elif isinstance(v,(PublicToolHandle,ServiceHandle)):
174  newValue.append("{}/{}".format(v.getType(),v.getName()))
175 
176  elif isinstance(v,str):
177  #Check if component is known ...
178  newValue.append(v)
179  pass
180  else:
181  raise TypeError('Configurable expected, got {!r} in assignment to {}'.\
182  format(v,self.name))
183  return newValue
184 

Member Data Documentation

◆ __handled_types__

tuple python.AtlasSemantics.PublicHandleArraySemantics.__handled_types__ = ("PublicToolHandleArray","ServiceHandleArray")
staticprivate

Definition at line 156 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.utility.LHE.merge
def merge(input_file_pattern, output_file)
Merge many input LHE files into a single output file.
Definition: LHE.py:17
python.CaloScaleNoiseConfig.default
default
Definition: CaloScaleNoiseConfig.py:79