| The Gaudi Framework v32r1 (f65d50dc)

Public Member Functions | Public Attributes | List of all members
GaudiMP.GMPBase.TESSerializer Class Reference
Inheritance diagram for GaudiMP.GMPBase.TESSerializer:
[legend]
Collaboration diagram for GaudiMP.GMPBase.TESSerializer:
[legend]

## Public Member Functions
def | __init__ (self, gaudiTESSerializer, evtDataSvc, nodeType, nodeID, log)
def | Load (self, tbuf)
def | Dump (self)
def | Report (self)

## Public Attributes
| T
| evt
| buffersIn
| buffersOut
| nIn
| nOut
| tDump
| tLoad
| nodeType
| nodeID
| log

## Detailed Description

Definition at line 330 of file GMPBase.py.

## Constructor & Destructor Documentation

## ◆ __init__()

def GaudiMP.GMPBase.TESSerializer.__init__ | ( |  | self,
|  |  | gaudiTESSerializer,
|  |  | evtDataSvc,
|  |  | nodeType,
|  |  | nodeID,
|  |  | log
| ) |  |

Definition at line 331 of file GMPBase.py.

331 def __init__(self, gaudiTESSerializer, evtDataSvc, nodeType, nodeID, log):
332 self.T = gaudiTESSerializer
333 self.evt = evtDataSvc
334 self.buffersIn = []
335 self.buffersOut = []
336 self.nIn = 0
337 self.nOut = 0
338 self.tDump = 0.0
339 self.tLoad = 0.0
340 # logging
341 self.nodeType = nodeType
342 self.nodeID = nodeID
343 self.log = log
344

## Member Function Documentation

## ◆ Dump()

def GaudiMP.GMPBase.TESSerializer.Dump | ( |  | self | ) |

Definition at line 355 of file GMPBase.py.

355 def Dump(self):
356 t = time.time()
357 tb = TBufferFile(TBuffer.kWrite)
358 self.T.dumpBuffer(tb)
359 self.tDump += (time.time() - t)
360 self.nOut += 1
361 self.buffersOut.append(tb.Length())
362 return tb
363

## ◆ Load()

def GaudiMP.GMPBase.TESSerializer.Load | ( |  | self,
|  |  | tbuf
| ) |  |

Definition at line 345 of file GMPBase.py.

345 def Load(self, tbuf):
346 root = gbl.DataObject()
347 setOwnership(root, False)
348 self.evt.setRoot('/Event', root)
349 t = time.time()
350 self.T.loadBuffer(tbuf)
351 self.tLoad += (time.time() - t)
352 self.nIn += 1
353 self.buffersIn.append(tbuf.Length())
354
GaudiPython.Bindings.setOwnership
setOwnership
Definition: Bindings.py:87

## ◆ Report()

def GaudiMP.GMPBase.TESSerializer.Report | ( |  | self | ) |

Definition at line 364 of file GMPBase.py.

364 def Report(self):
365 evIn = "Events Loaded : %i" % (self.nIn)
366 evOut = "Events Dumped : %i" % (self.nOut)
367 din = sum(self.buffersIn)
368 dataIn = "Data Loaded : %i" % (din)
369 dataInMb = "Data Loaded (MB) : %5.2f Mb" % (din / MB)
370 if self.nIn:
371 avgIn = "Avg Buf Loaded : %5.2f Mb"\
372 % (din / (self.nIn * MB))
373 maxIn = "Max Buf Loaded : %5.2f Mb"\
374 % (max(self.buffersIn) / MB)
375 else:
376 avgIn = "Avg Buf Loaded : N/A"
377 maxIn = "Max Buf Loaded : N/A"
378 dout = sum(self.buffersOut)
379 dataOut = "Data Dumped : %i" % (dout)
380 dataOutMb = "Data Dumped (MB) : %5.2f Mb" % (dout / MB)
381 if self.nOut:
382 avgOut = "Avg Buf Dumped : %5.2f Mb"\
383 % (din / (self.nOut * MB))
384 maxOut = "Max Buf Dumped : %5.2f Mb"\
385 % (max(self.buffersOut) / MB)
386 else:
387 avgOut = "Avg Buf Dumped : N/A"
388 maxOut = "Max Buf Dumped : N/A"
389 dumpTime = "Total Dump Time : %5.2f" % (self.tDump)
390 loadTime = "Total Load Time : %5.2f" % (self.tLoad)
391
392 lines = evIn,\
393 evOut,\
394 dataIn,\
395 dataInMb,\
396 avgIn,\
397 maxIn,\
398 dataOut,\
399 dataOutMb,\
400 avgOut,\
401 maxOut,\
402 dumpTime,\
403 loadTime
404 self.log.name = "%s-%i TESSerializer" % (self.nodeType, self.nodeID)
405 for line in lines:
406 self.log.info(line)
407 self.log.name = "%s-%i" % (self.nodeType, self.nodeID)
408
409
410 # =============================================================================
411
412
max
EventIDBase max(const EventIDBase &lhs, const EventIDBase &rhs)
Definition: EventIDBase.h:215

## Member Data Documentation

## ◆ buffersIn

GaudiMP.GMPBase.TESSerializer.buffersIn

Definition at line 334 of file GMPBase.py.

## ◆ buffersOut

GaudiMP.GMPBase.TESSerializer.buffersOut

Definition at line 335 of file GMPBase.py.

## ◆ evt

GaudiMP.GMPBase.TESSerializer.evt

Definition at line 333 of file GMPBase.py.

## ◆ log

GaudiMP.GMPBase.TESSerializer.log

Definition at line 343 of file GMPBase.py.

## ◆ nIn

GaudiMP.GMPBase.TESSerializer.nIn

Definition at line 336 of file GMPBase.py.

## ◆ nodeID

GaudiMP.GMPBase.TESSerializer.nodeID

Definition at line 342 of file GMPBase.py.

## ◆ nodeType

GaudiMP.GMPBase.TESSerializer.nodeType

Definition at line 341 of file GMPBase.py.

## ◆ nOut

GaudiMP.GMPBase.TESSerializer.nOut

Definition at line 337 of file GMPBase.py.

## ◆ T

GaudiMP.GMPBase.TESSerializer.T

Definition at line 332 of file GMPBase.py.

## ◆ tDump

GaudiMP.GMPBase.TESSerializer.tDump

Definition at line 338 of file GMPBase.py.

## ◆ tLoad

GaudiMP.GMPBase.TESSerializer.tLoad

Definition at line 339 of file GMPBase.py.

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

- GaudiMP/python/GaudiMP/GMPBase.py