ATLAS Offline Software
Classes | Functions | Variables
python.hltResultMT Namespace Reference

Classes

class  EDMCollection
 

Functions

def get_collection_name (raw_data_words)
 
def get_collection_payload (raw_data_words)
 
def get_collections (rob, skip_payload=False)
 

Variables

 log
 
 _string_serialiser
 
 SizeWord
 
 CLIDOffset
 
 NameLengthOffset
 
 NameOffset
 

Function Documentation

◆ get_collection_name()

def python.hltResultMT.get_collection_name (   raw_data_words)
Extract type+name words from the full collection raw data and convert to string

Definition at line 85 of file hltResultMT.py.

85 def get_collection_name(raw_data_words):
86  '''Extract type+name words from the full collection raw data and convert to string'''
87 
88  # Use Python bindings of C++ StringSerialiser to deserialise collection type and name.
89  # Doing the tuple-conversion here has a big performance impact. Probably this could be
90  # further improved if the eformat had better support for u32slice iterators.
91 
92  nw = raw_data_words[NameLengthOffset]
93  name_words = tuple(raw_data_words[NameOffset:NameOffset+nw])
94  return _string_serialiser.deserialize(name_words)
95 
96 

◆ get_collection_payload()

def python.hltResultMT.get_collection_payload (   raw_data_words)
Extract the serialised collection payload from the full collection raw data

Definition at line 97 of file hltResultMT.py.

97 def get_collection_payload(raw_data_words):
98  '''Extract the serialised collection payload from the full collection raw data'''
99 
100  name_size = raw_data_words[NameLengthOffset]
101  payload_start = NameOffset + name_size + 1
102  return raw_data_words[payload_start:]
103 
104 

◆ get_collections()

def python.hltResultMT.get_collections (   rob,
  skip_payload = False 
)
Extract a list of EDMCollection objects from the HLT ROBFragment.
If skip_payload=True, only the information about type, name and size
are kept but the payload is discarded to improve performance.

Definition at line 105 of file hltResultMT.py.

105 def get_collections(rob, skip_payload=False):
106  '''
107  Extract a list of EDMCollection objects from the HLT ROBFragment.
108  If skip_payload=True, only the information about type, name and size
109  are kept but the payload is discarded to improve performance.
110  '''
111 
112  start = SizeWord
113  collections = []
114  last_aux_cont = None
115  rod_size = len(rob.rod_data())
116  while start < rod_size:
117  size = rob.rod_data()[start+SizeWord]
118  coll_name = get_collection_name(rob.rod_data()[start:start+size])
119  words = None if skip_payload else get_collection_payload(rob.rod_data()[start:start+size])
120  coll = EDMCollection(coll_name, size, words)
121  if coll.is_xAOD_aux_container():
122  last_aux_cont = coll
123  if coll.is_xAOD_decoration():
124  coll.parent = last_aux_cont
125  collections.append(coll)
126  start += size
127  return collections

Variable Documentation

◆ _string_serialiser

python.hltResultMT._string_serialiser
private

Definition at line 16 of file hltResultMT.py.

◆ CLIDOffset

python.hltResultMT.CLIDOffset

Definition at line 20 of file hltResultMT.py.

◆ log

python.hltResultMT.log

Definition at line 13 of file hltResultMT.py.

◆ NameLengthOffset

python.hltResultMT.NameLengthOffset

Definition at line 21 of file hltResultMT.py.

◆ NameOffset

python.hltResultMT.NameOffset

Definition at line 22 of file hltResultMT.py.

◆ SizeWord

python.hltResultMT.SizeWord

Definition at line 19 of file hltResultMT.py.

python.hltResultMT.get_collections
def get_collections(rob, skip_payload=False)
Definition: hltResultMT.py:105
python.hltResultMT.get_collection_name
def get_collection_name(raw_data_words)
Definition: hltResultMT.py:85
python.hltResultMT.get_collection_payload
def get_collection_payload(raw_data_words)
Definition: hltResultMT.py:97