105def 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