258 def SendFileRecords(self):
259
260
261
262
263
264
265
266
267
268
269
270 self.log.info("Sending FileRecords...")
271 lst = self.fsr.getHistoNames()
272
273
274 if not lst:
275 self.log.info("No FileRecords Data to send to Writer.")
276 self.q.put("END_FSR")
277 return SUCCESS
278
279
280 if "/FileRecords" in lst:
281 lst.remove("/FileRecords")
282
283 for l in lst:
284 o = self.fsr.retrieveObject(l)
285 if hasattr(o, "configureDirectAccess"):
286 o.configureDirectAccess()
287
288 if self._gmpc.nodeID == 0:
289 self.objectsOut.append((0, l, pickle.dumps(o)))
290 else:
291
292
293 if l == "/FileRecords/EventCountFSR":
294 tup = (self._gmpc.nodeID, l, pickle.dumps(o))
295 self.objectsOut.append(tup)
296 elif "KeyedContainer" in o.__class__.__name__:
297
298 nObjects = o.numberOfObjects()
299 if nObjects:
300 self.log.debug(f"Keyed Container {l} with {nObjects} objects")
301 tup = (self._gmpc.nodeID, l, pickle.dumps(o))
302 self.objectsOut.append(tup)
303 else:
304 self.log.info(f"Ignoring {o.__class__.__name__} in FSR")
305
306 self.log.debug("Done with FSR store, just to send to Writer.")
307
308 if self.objectsOut:
309 self.log.debug(f"{len(self.objectsOut)} FSR objects to Writer")
310 for ob in self.objectsOut:
311 self.log.debug(f"\t{ob[0]}")
312 self.q.put(self.objectsOut)
313 else:
314 self.log.info("Valid FSR Store, but no data to send to Writer")
315 self.log.info("SendFSR complete")
316 self.q.put("END_FSR")
317 return SUCCESS
318