| # Gaudi Framework, version v25r0 |

Home |  | Generated: Mon Feb 17 2014

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

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

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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__
def | Load
def | Dump
def | Report

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

## Detailed Description

Definition at line 314 of file GMPBase.py.

## Constructor & Destructor Documentation

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

Definition at line 316 of file GMPBase.py.

316
317 nodeType, nodeID, log ) :
318 self.T = gaudiTESSerializer
319 self.evt = evtDataSvc
320 self.buffersIn = []
321 self.buffersOut = []
322 self.nIn = 0
323 self.nOut = 0
324 self.tDump = 0.0
325 self.tLoad = 0.0
326 # logging
327 self.nodeType = nodeType
328 self.nodeID = nodeID
self.log = log

## Member Function Documentation

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

Definition at line 338 of file GMPBase.py.

338
339 def Dump( self ) :
340 t = time.time()
341 tb = TBufferFile( TBuffer.kWrite )
342 self.T.dumpBuffer(tb)
343 self.tDump += ( time.time()-t )
344 self.nOut += 1
345 self.buffersOut.append( tb.Length() )
return tb

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

Definition at line 329 of file GMPBase.py.

329
330 def Load( self, tbuf ) :
331 root = gbl.DataObject()
332 setOwnership( root, False )
333 self.evt.setRoot( '/Event', root )
334 t = time.time()
335 self.T.loadBuffer( tbuf )
336 self.tLoad += (time.time() - t)
337 self.nIn += 1
self.buffersIn.append( tbuf.Length() )

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

Definition at line 346 of file GMPBase.py.

346
347 def Report( self ) :
348 evIn = "Events Loaded : %i"%( self.nIn )
349 evOut = "Events Dumped : %i"%( self.nOut )
350 din = sum( self.buffersIn )
351 dataIn = "Data Loaded : %i"%(din)
352 dataInMb = "Data Loaded (MB) : %5.2f Mb"%(din/MB)
353 if self.nIn :
354 avgIn = "Avg Buf Loaded : %5.2f Mb"\
355 %( din/(self.nIn*MB) )
356 maxIn = "Max Buf Loaded : %5.2f Mb"\
357 %( max(self.buffersIn)/MB )
358 else :
359 avgIn = "Avg Buf Loaded : N/A"
360 maxIn = "Max Buf Loaded : N/A"
361 dout = sum( self.buffersOut )
362 dataOut = "Data Dumped : %i"%(dout)
363 dataOutMb = "Data Dumped (MB) : %5.2f Mb"%(dout/MB)
364 if self.nOut :
365 avgOut = "Avg Buf Dumped : %5.2f Mb"\
366 %( din/(self.nOut*MB) )
367 maxOut = "Max Buf Dumped : %5.2f Mb"\
368 %( max(self.buffersOut)/MB )
369 else :
370 avgOut = "Avg Buf Dumped : N/A"
371 maxOut = "Max Buf Dumped : N/A"
372 dumpTime = "Total Dump Time : %5.2f"%( self.tDump )
373 loadTime = "Total Load Time : %5.2f"%( self.tLoad )
374
375 lines = evIn ,\
376 evOut ,\
377 dataIn ,\
378 dataInMb ,\
379 avgIn ,\
380 maxIn ,\
381 dataOut ,\
382 dataOutMb,\
383 avgOut ,\
384 maxOut ,\
385 dumpTime ,\
386 loadTime
387 self.log.name = "%s-%i TESSerializer"%(self.nodeType, self.nodeID)
388 for line in lines :
389 self.log.info( line )
390 self.log.name = "%s-%i"%(self.nodeType, self.nodeID)
391
392 # =============================================================================

## Member Data Documentation

GaudiMP.GMPBase.TESSerializer.buffersIn

Definition at line 319 of file GMPBase.py.

GaudiMP.GMPBase.TESSerializer.buffersOut

Definition at line 320 of file GMPBase.py.

GaudiMP.GMPBase.TESSerializer.evt

Definition at line 318 of file GMPBase.py.

GaudiMP.GMPBase.TESSerializer.log

Definition at line 328 of file GMPBase.py.

GaudiMP.GMPBase.TESSerializer.nIn

Definition at line 321 of file GMPBase.py.

GaudiMP.GMPBase.TESSerializer.nodeID

Definition at line 327 of file GMPBase.py.

GaudiMP.GMPBase.TESSerializer.nodeType

Definition at line 326 of file GMPBase.py.

GaudiMP.GMPBase.TESSerializer.nOut

Definition at line 322 of file GMPBase.py.

GaudiMP.GMPBase.TESSerializer.T

Definition at line 317 of file GMPBase.py.

GaudiMP.GMPBase.TESSerializer.tDump

Definition at line 323 of file GMPBase.py.

GaudiMP.GMPBase.TESSerializer.tLoad

Definition at line 324 of file GMPBase.py.

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v25r0/GaudiMP/python/GaudiMP/GMPBase.py