A python representation of a serialised EDM collection
Definition at line 25 of file hltResultMT.py.
◆ __init__()
def python.hltResultMT.EDMCollection.__init__ |
( |
|
self, |
|
|
|
name_vec, |
|
|
|
size_words, |
|
|
|
words = None |
|
) |
| |
Definition at line 28 of file hltResultMT.py.
28 def __init__(self, name_vec, size_words, words=None):
29 self.name_persistent = name_vec[0]
30 self.name_key = name_vec[1]
31 self.size_words = size_words
32 self.size_bytes = size_words*4
◆ __str__()
def python.hltResultMT.EDMCollection.__str__ |
( |
|
self | ) |
|
Definition at line 36 of file hltResultMT.py.
37 return '{:s}, Size: {:d} bytes'.
format(self.name(), self.size_bytes)
◆ deserialise()
def python.hltResultMT.EDMCollection.deserialise |
( |
|
self | ) |
|
Definition at line 59 of file hltResultMT.py.
61 log.error(
'No payload stored, cannot deserialise')
69 from ctypes
import c_uint
72 cwords = [c_uint(w)
for w
in self.words]
73 bwords = [struct.pack(
'@I',cw.value)
for cw
in cwords]
74 bwords_merged = b
''.
join(bwords)
75 bwords_array = array.array(
'b', bwords_merged)
78 cltype = ROOT.RootType.ByNameNoQuiet(self.name_persistent)
79 buffer = ROOT.TBufferFile(ROOT.TBuffer.kRead, len(bwords_array), bwords_array,
False)
80 obj_ptr = buffer.ReadObjectAny(cltype.Class())
81 obj = cppyy.bind_object(obj_ptr, self.name_persistent)
◆ is_TP_container()
def python.hltResultMT.EDMCollection.is_TP_container |
( |
|
self | ) |
|
Definition at line 56 of file hltResultMT.py.
56 def is_TP_container(self):
57 return '_p' in self.name_persistent
◆ is_xAOD_aux_container()
def python.hltResultMT.EDMCollection.is_xAOD_aux_container |
( |
|
self | ) |
|
Definition at line 48 of file hltResultMT.py.
48 def is_xAOD_aux_container(self):
49 return self.name_persistent.startswith(
'xAOD')
and self.name_key.endswith(
'Aux.')
◆ is_xAOD_decoration()
def python.hltResultMT.EDMCollection.is_xAOD_decoration |
( |
|
self | ) |
|
Definition at line 51 of file hltResultMT.py.
51 def is_xAOD_decoration(self):
52 return 'vector' in self.name_persistent
and \
53 not self.is_xAOD_interface_container()
and \
54 not self.is_xAOD_aux_container()
◆ is_xAOD_interface_container()
def python.hltResultMT.EDMCollection.is_xAOD_interface_container |
( |
|
self | ) |
|
Definition at line 45 of file hltResultMT.py.
45 def is_xAOD_interface_container(self):
46 return self.name_persistent.startswith(
'xAOD')
and not self.name_key.endswith(
'Aux.')
◆ name()
def python.hltResultMT.EDMCollection.name |
( |
|
self | ) |
|
Definition at line 39 of file hltResultMT.py.
41 return '{:s}#{:s}'.
format(self.name_persistent, self.name_key)
43 return '{:s}#{:s}{:s}'.
format(self.name_persistent, self.parent.name_key, self.name_key)
◆ name_key
python.hltResultMT.EDMCollection.name_key |
◆ name_persistent
python.hltResultMT.EDMCollection.name_persistent |
◆ parent
python.hltResultMT.EDMCollection.parent |
◆ size_bytes
python.hltResultMT.EDMCollection.size_bytes |
◆ size_words
python.hltResultMT.EDMCollection.size_words |
◆ words
python.hltResultMT.EDMCollection.words |
The documentation for this class was generated from the following file: