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

Public Member Functions

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

Private Attributes

 _type
 
 _isCond
 
 _mode
 

Static Private Attributes

tuple __handled_types__ = (re.compile(r"SG::.*HandleKey<.*>$"),)
 

Detailed Description

Semantics for all data handle keys (Read, Write, Decor, Cond).

Definition at line 8 of file AtlasSemantics.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 14 of file AtlasSemantics.py.

14  def __init__(self, cpp_type):
15  super().__init__(cpp_type)
16  # Deduce actual handle type
17  self._type = next(GaudiConfig2.semantics.extract_template_args(cpp_type))
18  self._isCond = 'CondHandle' in cpp_type
19 
20  if cpp_type.startswith("SG::Read"):
21  self._mode = "R"
22  elif cpp_type.startswith("SG::Write"):
23  self._mode = "W"
24  else:
25  raise TypeError(f"C++ type {cpp_type} not supported")
26 

Member Function Documentation

◆ store()

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

Definition at line 27 of file AtlasSemantics.py.

27  def store(self, value):
28  if isinstance(value, DataHandle):
29  v = value.Path
30  elif isinstance(value, str):
31  v = value
32  else:
33  raise TypeError(f"cannot assign {value!r} ({type(value)}) to {self.name}"
34  ", expected string or DataHandle")
35  return DataHandle(v, self._mode, self._type, self._isCond)
36 
37 

Member Data Documentation

◆ __handled_types__

tuple python.AtlasSemantics.VarHandleKeySemantics.__handled_types__ = (re.compile(r"SG::.*HandleKey<.*>$"),)
staticprivate

Definition at line 12 of file AtlasSemantics.py.

◆ _isCond

python.AtlasSemantics.VarHandleKeySemantics._isCond
private

Definition at line 18 of file AtlasSemantics.py.

◆ _mode

python.AtlasSemantics.VarHandleKeySemantics._mode
private

Definition at line 21 of file AtlasSemantics.py.

◆ _type

python.AtlasSemantics.VarHandleKeySemantics._type
private

Definition at line 17 of file AtlasSemantics.py.


The documentation for this class was generated from the following file:
SGTest::store
TestStore store
Definition: TestStore.cxx:23
python.processes.powheg.ZZj_MiNNLO.ZZj_MiNNLO.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZj_MiNNLO.py:18
fillPileUpNoiseLumi.next
next
Definition: fillPileUpNoiseLumi.py:52
DataHandle
an iterator over instances of a given type in StoreGateSvc. It d-casts and caches locally the pointed...
Definition: DataHandle.h:43