| # Gaudi Framework, version v22r0 |

Home |  | Generated: 9 Feb 2011

# GaudiMP::GMPBase::TESSerializer Class Reference

List of all members.

## 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 310 of file GMPBase.py.

## Member Function Documentation

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

Definition at line 311 of file GMPBase.py.

    00313                                                 :
    00314         self.T   = gaudiTESSerializer
    00315         self.evt = evtDataSvc
    00316         self.buffersIn  = []
    00317         self.buffersOut = []
    00318         self.nIn     = 0
    00319         self.nOut    = 0
    00320         self.tDump   = 0.0
    00321         self.tLoad   = 0.0
    00322         # logging
    00323         self.nodeType = nodeType
    00324         self.nodeID   = nodeID
            self.log      = log

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

Definition at line 334 of file GMPBase.py.

    00335                      :
    00336         t = time.time()
    00337         tb = TBufferFile( TBuffer.kWrite )
    00338         self.T.dumpBuffer(tb)
    00339         self.tDump += ( time.time()-t )
    00340         self.nOut  += 1
    00341         self.buffersOut.append( tb.Length() )
            return tb

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

Definition at line 325 of file GMPBase.py.

    00326                            :
    00327         root = gbl.DataObject()
    00328         setOwnership( root, False )
    00329         self.evt.setRoot( '/Event', root )
    00330         t = time.time()
    00331         self.T.loadBuffer( tbuf )
    00332         self.tLoad   += (time.time() - t)
    00333         self.nIn     += 1
            self.buffersIn.append( tbuf.Length() )

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

Definition at line 342 of file GMPBase.py.

    00343                        :
    00344         evIn       = "Events Loaded    : %i"%( self.nIn  )
    00345         evOut      = "Events Dumped    : %i"%( self.nOut )
    00346         din = sum( self.buffersIn )
    00347         dataIn     = "Data Loaded      : %i"%(din)
    00348         dataInMb   = "Data Loaded (MB) : %5.2f Mb"%(din/MB)
    00349         if self.nIn :
    00350             avgIn      = "Avg Buf Loaded   : %5.2f Mb"\
    00351                           %( din/(self.nIn*MB) )
    00352             maxIn      = "Max Buf Loaded   : %5.2f Mb"\
    00353                           %( max(self.buffersIn)/MB )
    00354         else :
    00355             avgIn      = "Avg Buf Loaded   : N/A"
    00356             maxIn      = "Max Buf Loaded   : N/A"
    00357         dout = sum( self.buffersOut )
    00358         dataOut    = "Data Dumped      : %i"%(dout)
    00359         dataOutMb  = "Data Dumped (MB) : %5.2f Mb"%(dout/MB)
    00360         if self.nOut :
    00361             avgOut     = "Avg Buf Dumped   : %5.2f Mb"\
    00362                           %( din/(self.nOut*MB) )
    00363             maxOut     = "Max Buf Dumped   : %5.2f Mb"\
    00364                           %( max(self.buffersOut)/MB )
    00365         else :
    00366             avgOut     = "Avg Buf Dumped   : N/A"
    00367             maxOut     = "Max Buf Dumped   : N/A"
    00368         dumpTime   = "Total Dump Time  : %5.2f"%( self.tDump )
    00369         loadTime   = "Total Load Time  : %5.2f"%( self.tLoad )
    00370
    00371         lines =  evIn     ,\
    00372                  evOut    ,\
    00373                  dataIn   ,\
    00374                  dataInMb ,\
    00375                  avgIn    ,\
    00376                  maxIn    ,\
    00377                  dataOut  ,\
    00378                  dataOutMb,\
    00379                  avgOut   ,\
    00380                  maxOut   ,\
    00381                  dumpTime ,\
    00382                  loadTime
    00383         self.log.name = "%s-%i TESSerializer"%(self.nodeType, self.nodeID)
    00384         for line in lines :
    00385             self.log.info( line )
    00386         self.log.name = "%s-%i"%(self.nodeType, self.nodeID)
    00387
    00388 # =============================================================================

## Member Data Documentation

GaudiMP::GMPBase::TESSerializer::buffersIn

Definition at line 314 of file GMPBase.py.

GaudiMP::GMPBase::TESSerializer::buffersOut

Definition at line 315 of file GMPBase.py.

GaudiMP::GMPBase::TESSerializer::evt

Definition at line 313 of file GMPBase.py.

GaudiMP::GMPBase::TESSerializer::log

Definition at line 323 of file GMPBase.py.

GaudiMP::GMPBase::TESSerializer::nIn

Definition at line 316 of file GMPBase.py.

GaudiMP::GMPBase::TESSerializer::nodeID

Definition at line 322 of file GMPBase.py.

GaudiMP::GMPBase::TESSerializer::nodeType

Definition at line 321 of file GMPBase.py.

GaudiMP::GMPBase::TESSerializer::nOut

Definition at line 317 of file GMPBase.py.

GaudiMP::GMPBase::TESSerializer::T

Definition at line 312 of file GMPBase.py.

GaudiMP::GMPBase::TESSerializer::tDump

Definition at line 318 of file GMPBase.py.

GaudiMP::GMPBase::TESSerializer::tLoad

Definition at line 319 of file GMPBase.py.

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

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

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines