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

Classes

class  _ItemSemantics

Public Member Functions

 __init__ (self, cpp_type)
 merge (self, bb, aa)

Protected Attributes

 _type = next(GaudiConfig2.semantics.extract_template_args(handle_type))
str _isCond = 'CondHandle' in handle_type
str _mode = "R"

Static Private Attributes

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

Detailed Description

Treat VarHandleKeyArrays like arrays of strings

Definition at line 38 of file AtlasSemantics.py.

Constructor & Destructor Documentation

◆ __init__()

python.AtlasSemantics.VarHandleArraySematics.__init__ ( self,
cpp_type )

Definition at line 59 of file AtlasSemantics.py.

59 def __init__(self, cpp_type):
60 super().__init__(cpp_type, valueSem = self._ItemSemantics())
61
62 # Example for cpp_type:
63 # SG::HandleKeyArray<SG::ReadHandle<HiveDataObj>, SG::ReadHandleKey<HiveDataObj>,
64 # (Gaudi::DataHandle::Mode)4>
65 handle_type = next(GaudiConfig2.semantics.extract_template_args(cpp_type))
66 self._type = next(GaudiConfig2.semantics.extract_template_args(handle_type))
67 self._isCond = 'CondHandle' in handle_type
68
69 if handle_type.startswith("SG::ReadHandle"):
70 self._mode = "R"
71 elif handle_type.startswith("SG::WriteHandle"):
72 self._mode = "W"
73 else:
74 raise TypeError(f"C++ type {cpp_type} not supported")
75

Member Function Documentation

◆ merge()

python.AtlasSemantics.VarHandleArraySematics.merge ( self,
bb,
aa )

Definition at line 76 of file AtlasSemantics.py.

76 def merge(self,bb,aa):
77 for b in bb:
78 if b not in aa:
79 aa.append(b)
80 return aa
81
82
Definition merge.py:1

Member Data Documentation

◆ __handled_types__

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

Definition at line 42 of file AtlasSemantics.py.

◆ _isCond

str python.AtlasSemantics.VarHandleArraySematics._isCond = 'CondHandle' in handle_type
protected

Definition at line 67 of file AtlasSemantics.py.

◆ _mode

str python.AtlasSemantics.VarHandleArraySematics._mode = "R"
protected

Definition at line 70 of file AtlasSemantics.py.

◆ _type

python.AtlasSemantics.VarHandleArraySematics._type = next(GaudiConfig2.semantics.extract_template_args(handle_type))
protected

Definition at line 66 of file AtlasSemantics.py.


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