| The Gaudi Framework v30r0 (c919700c)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

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

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

Definition at line 332 of file GMPBase.py.

332 nodeType, nodeID, log):
333 self.T = gaudiTESSerializer
334 self.evt = evtDataSvc
335 self.buffersIn = []
336 self.buffersOut = []
337 self.nIn = 0
338 self.nOut = 0
339 self.tDump = 0.0
340 self.tLoad = 0.0
341 # logging
342 self.nodeType = nodeType
343 self.nodeID = nodeID
344 self.log = log
345
GaudiMP.GMPBase.TESSerializer.tLoad
tLoad
Definition: GMPBase.py:340
GaudiMP.GMPBase.TESSerializer.log
log
Definition: GMPBase.py:344
GaudiMP.GMPBase.TESSerializer.buffersOut
buffersOut
Definition: GMPBase.py:336
GaudiMP.GMPBase.TESSerializer.evt
evt
Definition: GMPBase.py:334
GaudiMP.GMPBase.TESSerializer.tDump
tDump
Definition: GMPBase.py:339
GaudiMP.GMPBase.TESSerializer.nodeID
nodeID
Definition: GMPBase.py:343
GaudiMP.GMPBase.TESSerializer.T
T
Definition: GMPBase.py:333
GaudiMP.GMPBase.TESSerializer.nIn
nIn
Definition: GMPBase.py:337
GaudiMP.GMPBase.TESSerializer.nodeType
nodeType
Definition: GMPBase.py:342
GaudiMP.GMPBase.TESSerializer.buffersIn
buffersIn
Definition: GMPBase.py:335
GaudiMP.GMPBase.TESSerializer.nOut
nOut
Definition: GMPBase.py:338

## Member Function Documentation

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

Definition at line 356 of file GMPBase.py.

356 def Dump(self):
357 t = time.time()
358 tb = TBufferFile(TBuffer.kWrite)
359 self.T.dumpBuffer(tb)
360 self.tDump += (time.time() - t)
361 self.nOut += 1
362 self.buffersOut.append(tb.Length())
363 return tb
364
GaudiMP.GMPBase.TESSerializer.tDump
tDump
Definition: GMPBase.py:339
GaudiMP.GMPBase.TESSerializer.Dump
def Dump(self)
Definition: GMPBase.py:356
GaudiMP.GMPBase.TESSerializer.nOut
nOut
Definition: GMPBase.py:338

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

Definition at line 346 of file GMPBase.py.

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

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

Definition at line 365 of file GMPBase.py.

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

## Member Data Documentation

GaudiMP.GMPBase.TESSerializer.buffersIn

Definition at line 335 of file GMPBase.py.

GaudiMP.GMPBase.TESSerializer.buffersOut

Definition at line 336 of file GMPBase.py.

GaudiMP.GMPBase.TESSerializer.evt

Definition at line 334 of file GMPBase.py.

GaudiMP.GMPBase.TESSerializer.log

Definition at line 344 of file GMPBase.py.

GaudiMP.GMPBase.TESSerializer.nIn

Definition at line 337 of file GMPBase.py.

GaudiMP.GMPBase.TESSerializer.nodeID

Definition at line 343 of file GMPBase.py.

GaudiMP.GMPBase.TESSerializer.nodeType

Definition at line 342 of file GMPBase.py.

GaudiMP.GMPBase.TESSerializer.nOut

Definition at line 338 of file GMPBase.py.

GaudiMP.GMPBase.TESSerializer.T

Definition at line 333 of file GMPBase.py.

GaudiMP.GMPBase.TESSerializer.tDump

Definition at line 339 of file GMPBase.py.

GaudiMP.GMPBase.TESSerializer.tLoad

Definition at line 340 of file GMPBase.py.

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

- GaudiMP/python/GaudiMP/GMPBase.py